database - Android: changing tab must refresh my listview of the db -


I have an app created with a tab host. I would have to refresh my list view (the second tab) when I click this scene, which includes DB data, it is clear that it needs to be up to date (because I update, enter, delete the whole app ... How can I do this?

In the square called by the on-crate tab

  super.onCreate (savedInstanceState); setContentView (R.layout.bookmarks); Last Database information = new database (this); last timer t = new timer (); info.open (); Cursor data = info.getData (); last list view list view 1 = (list view) searchVBIID (R.DistList_mia); string [] from = new string [] {"contenuto"}; for int [] = New int [] {android.R.id.text1}; Simplecorporter adapter adapter = New SimpleCarry Adapter (this, Android.R.List.aspx, from simple_list_item_1, data, from); CatalogView 1 .Setapter (adapter);   

and this tab category ("the cursed class is bookmarked")

  super.onCreate (savedInstanceState); setContentView (R.layout.tabs); TabHost TabHost = getTabHost (); // Tab per caption TabSpec lettoretab = tabHost.newTabSpec ("Letter"); LetterTab.Setinder Cator ("Letter", getResources (). GetDrawable (R.drawable.lettore)); Intimate LetterIntent = New Intent (This, Latermore, Class); Lettoretab.setContent (lettoreIntent); // Tabspec bookmarkstab = tabHost.newTabSpec ("bookmark") per bookmark tab; Bookmarkstab.setIndicator ("bookmark", getResources (). GetDrawable (R.drawable.bookmarks)); Intent bookmarksIntent = new intent (this, Bookmarks.class); Bookmarkstab.setContent (bookmarksIntent); // Tab per tab create TabSpec createtabs = tabHost.newTabSpec ("create"); Createtabs.setIndicator ("Create", getResources (). GetDrawable (R.drawable.create)); Create Intent Intent = New Intent (This, Create.class); Createtabs.setContent (createIntent); // tab per feed tab cpike feed tab = tabhost.nuteabspc ("feed"); Feedtabs.setIndicator ("feed", getResources (). GetDrawable (R.drawable.feed)); Intention feedIntent = new intent (this, feeds.class); Feedtabs.setContent (feedIntent); // Tabs per ActionMobileUp TabCPC ActionMobilePeptab = TabHost NEETApps ("app"); Actionmobileapptabs.setIndicator ("app", getResources (). GetDrawable (R.drawable.actionmobileapp)); Intent ActionMobilePopent = New Intent (This, Action MobelPap. Class); Actionmobileapptabs.setContent (actionmobileappIntent); // Aggiungo i tabs tabHost.addTab (lettoretab); TabHost.addTab (bookmarkstab); TabHost.addTab (createtabs); TabHost.addTab (feedtabs); TabHost.addTab (actionmobileapptabs);   

I tried to remember the code in the resume but no success was found ...

  TabHost tabHost = getTabHost (); Intent = intent (new, int); Intent.addFlags (Intent.FLAG_ACTIVITY_CLEAR_TOP); TabHost.TabSpec spec = tabHost.newTabSpec ("Tab" + Label ID); View tabindicator = layoutinterpretator.fr (this) .inflat (rlayouttab_indicator, getTabWidget (), false); TextView title = (TextView) tab indicator.FindvibIID (RIDTatal); Title.setText (labelId); Image view icon = (image view) tab indicator.findvibid (rid.con); Icon.setImageResource (drawableId); Spec.setIndicator (tabIndicator); Spec.setContent; TabHost.addTab (idea);   



Comments