I have a ListView
populated with some text ( phone models in my case, ex: Samsung A, B, C...) and an image ( loaded from URL using android-query ).
When a row is selected, a ViewPager
will be created along with 3 Tabs ( Specs, Info, Img ), both fragments Specs and Info are displaying a ListView
and the last fragment, Img is displaying a GridView
. I'm having no issues with the last fragment, but only with the first 2, as I don't know how to populate the ListView
so it will display the content for the selected row.
Is it possible to specify for each row a different string array?
If not, how can I achieve this:
As you can notice in this example, Samsung D, has more informations than the previous one.
This is the main ListView's ClickListener:
listView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Bundle bundle = new Bundle();
bundle.putInt("id", position);
TabStripAdapter newFragment = new TabStripAdapter();
newFragment.setArguments(bundle);
FragmentTransaction transaction = getFragmentManager().beginTransaction();
transaction.replace(R.id.frame_container, newFragment);
transaction.addToBackStack(null);
transaction.commit();
}
});
Sorry for my english.