custom view code is as follows:
Public LinkedList
Public void setYData (LinkedList
this. Labels=labels;
//null values}
Public LinkedList
The return labels.
}
In the Activity's onCreate method
LinkedList
Ylabel. Add (" 2006 ");
Ylabel. Add (" 2007 ");
Ylabel. Add (" 2008 ");
Ylabel. Add (" 2009 ");
Ylabel. Add (" 2010 ");
Ylabel. Add (" 2011 ");
Ylabel. Add (" 2012 ");
Ylabel. Add (" 2013 ");
Ylabel. Add (" 2014 ");
chartsView. SetYData (ylabel); //put a collection of Settings to customize the view after debugging, this is a value called
The problem is the activity of the "chartsView setYData (ylabel);" Is of value, jump into the custom view ". This labels=labels;" This sentence is null,
CodePudding user response:
These are you want to show to the layout of the above, that you do not have in the set addview, seem to be able to show itCodePudding user response:
I call the set method in the view class can realize the valueCodePudding user response:
Dynamically add? In the new view in the list can't you preach andCodePudding user response:
1. Check all calls setYData place ever have call2. You to debug this. Labels=labels should see method whether labels is empty, this, labels haven't perform
3. If it is in the custom view when used is null please call the setYData to first identify the debug