I have a page with 2 page, Viewpager
, I fill out a form Swipe on the page and in the expandableList
, I am using a custom adapter below.
I've included expandable listview
and another button inside a layout.
When I swipe on this new page, I see an empty layout with the button, the expandable list never appears
I have checked and ReturnGroupCount is returning a size equal to the size of the array list
data, so this is not the problem of data being empty.
On further analysis, I thought that getGroupView
as well as getChildView
is never called, for debugging those methods Add some log statements, they are never printed. Although the constructor is being called, same getGroupCoun
is returning the right values. Is my implementation correct?
Public class FareStageExpandableListAdapter BaseExpandableListAdapter {Private context reference; Private LayoutsInfoLtter; Private Array List & Lieutenant; Tripitines & gt; Information; Personal SimpleDataFormat Formatter; Private Editing Test Fairfield; Private text view title text; Private textview child text; Public FareStageExpandableListAdapter (Reference Reference, ArrayList & lt; TripTimings & gt; Data) {Log D. ("FareStageExADapter", "Constructor"); This.context = context; This.inflater = (Layout Influenor) reference .getSystemService (References LAOUT_INFLATER_SERVICE); This.data = data; This.formatter = New SimpleDateFormat ("HH: mm"); } @ Override Public Integrucent () {return data.size (); } @ Override Public In Big ChildConnect (Int. Group Position) {Return Data. Size () - 1 - Groupposition; } @OverWide Public Object Gate Group (Input Group Group) {return data.get (groupPosition); } @OverWide Public Objects Hosbild (Int Group Group, Intimate Child Position) {Return Data. Gate (Groupposition + child position); } @ Override Public Long Hot Group IID (Int. Group Position) {Return Data. Get (groupposition) .hashCode (); } @ Override Public Long Match ChildID (Int Group Group, Intimate Child Position) {Return Data.Gate (Groupposition + child position). Hashkod () + 5; } @ Override Public Boolean Hastel IDS () {// Tudo Auto-Generated Method Stub Returns True; } @ Override Public View: getGroupView (Ent groupposition, Boolean extension, see convertview view, view group guardian) {Trimmins parent = data. Get (groupposition); If (convertView == empty) {convertView = inflater.inflate (R.layout.fareadd_expanded_parent, parentView, incorrect); } HeaderText = ((TextView) ConvertviewFindvibid (RIDOrigintext)); Log D. ("Setting Header Text", parent.getStop (). GetStop_name ()); HeaderText.setText (parent.getStop () getStop_name ().); Return Convertview; } @ Override public see getChildView (Ent groupposition, int child position, Boolean establishment, View Convertview, View Group Child Voyage) {Last Triitims Children = Data. Gate (Groupposition + child status); If (convertView == empty) {convertView = inflater.inflate (R.layout.fareadd_expanded_child, childView, incorrect); } ChildText = ((TextView ConvergedDestinationText)); Log D. ("Setting Up Child Text", child.getStop (). GetStop_name ()); ChildText.setText (child.getStop () getStop_name ().); Return Convertview; } @ Override Public Boolean is ChildSclaimable (Int Group Position, Int Body Position) {// Tudo Auto-Generated Method Stub Return False; } }
This is when you fall asleep Are deprived There is nothing wrong with the code, except that the adapter has never been added to expandable list view
No comments:
Post a Comment