Android - Update ListView not Working -
I'm trying to update a ListView on Android. I insert new items in the list and then notifyDataSetChanged () Calling and nothing happens! And I'm using runOnUIThread, which should work right?
This is my code:
@Override // This is where I am creating ListView with my custom adapter. Creature Protected Zero (Intrastance saved from bundle) {super.onCreate (SavedInstanceState); . Globals.getInstance () readWarehouse (this); Toast. Make text (this, "E:" + Globals.Just Instance (). GetWarehouse (). GetJointNames (). Length, toast .LENGTH_LONG). Show (); SetContentView (R.layout.activity_main); Adapters = new customist (Main activity. These, Globals.tastinstance). GetWarehouse ()); List = (ListView) findViewById (R.id.list); List.setAdapter (adapter); }
Then I edit the content of this appeller on other activity .. I am adding more stuff .. And I am back to this activity and then I refresh the list I call this method to do .. but nothing is happy .. Here is the code where I refresh:
@ override protected regeneration at zero () {super.onResume (); RunOnUiThread (New Runnabel) {@Override Public Zero () () ((BaseEdapter) list.getAdapter ()). NotifyDataSetChanged ();}}); Toast. Make text (this, "On resume triggered .. and the list is not being refreshed .. even after the call made before informing ..", toast.lnnggh_LOG). Show (); }
Can anyone help me? I am solving the problem by dynamically adding layouts to many new rows and items.
Using Layout Inflighter
This is not the best solution, but I know that I have full control over the layout :)
Thanks anyway;)
Comments
Post a Comment