android - Tabs with Listview in fragments -
I'm starting in Android. There was a need for what I have been discussing here:
Now, I am using that project here
What do I need, list view One piece is to be added .. Another piece appears on the list when a particular item is clicked.
But I have a problem facing this. For example, I get an error using the setListAdapter (adapter) function. Plz help
public class AppTabAFirstFragment basefragration {private button mGotoButton; // Private string [] Characters = {"Shots", "SDS", "SDSS", "SDSD"}; @ Override Public View Crate View (LayoutInflator Inflator, View Group Container, Bundle Saved InstantState) {View View = inflater.inflate (R.layout.app_tab_a_first_screen, Container, Incorrect); MGotoButton = (button) view.findViewById (R.id.id_next_tab_a_button); MGotoButton.setOnClickListener (listener); // Arrayadapter & lt; String & gt; Adapter = new array adapter & lt; String & gt; (Inflator.Get Context ()), R. Late Ap_tab_d_fst_screen, characters); // setListAdapter (adapter); Return view; } In this way, it does not allow us to use the setListAdapter () function because I can not expand the ListActivity. I am all confused please help.
I did not check your link, but as I see you with a little code I think this problem may be:
You need to view your listview with the XML file (if you defined it there) and set the adapter on that object. For example: list view list = view (list view) view.findViewById (R.id.my_list_view); ListView.setAdapter (adapter);
Comments
Post a Comment