I have to create one reporting application, in which sane report format, adapter is used to generate reports layouts dynamically in view pager adapter.
switch (index) {
case 0:
return new sfg();
case 1:
return new Report1("1STREPORT");
case 2:
return new Report1("2NDREPORT");
case 3:
return new Report1("3RDREPORT");
case 4:
// Movies fragment activity
return new Report1("4THREPORT");
case 5:
return new Report1("5THREPORT");
case 6:
return new Report1("Numbers");
case 7:
return new report2("6THREPORT");
default:
return null;
}
In Report1 layout page contains two things, one Button and another is List View.
All the reports are displayed simultaneously.
I have to change the ListView item when I click on Button. I tried this:
public void btn_DetailedReport_Show(View view) {
FragmentActivity myActivity= (FragmentActivity)(view.getContext());
ListView lst1 = (ListView) view.findViewById(R.id.lst_abc); // lst_abc is the list box Name
but lst1
is not able to call this ListView. I tried with Tag also as suggested in one example.
How can I solve this issue?