android - Applying adapter to ListFragment -


I have a simple question as soon as we are able to apply the executor in writing in the following manner:

  getListView (). SetAdapter (new myadapter ());  

It also does not work for ListFragment.

Any updates can be made, as it is not different from quoting API references. Public void activation (bundled saved instenestate) {// TODO auto generated method stub super super on public class mylistfrag listFragment {@Override} On-activation (saved instenstate); ListView lv = getListView (); ArrayAdapter & LT; String & gt; Aa = new array adapter & lt; String & gt; (GetActivity (), android.R.layout.simple_list_item_1, (myfragshow) getActivity ()). Cents; Lv.setAdapter (aa); }} Provides myfragshow FragmentActivity {String st [] = {"a", "b", "C", "d", "e"} of the public class; @ Override Protected Zero Create (Bundle Arg0) {// Todo Auto-Generated Method Stub Super. Content (arg0); SetContentView (R.layout.myfragshow); }}

Enter image details here

Problem:

  GetListView ()  

When you are trying to call that method in your piece, it will not tell the list view context of your activity, the list view of your piece

Here:

  Get a list of activity view widgets.  

Use setListAdapter to set the adapter of the piece instead

Sample:

  setListAdapter (new mediator ());  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -