B
ben56a
Ambitioniertes Mitglied
- 0
hallo,
folgender Code, funktioniert nicht, da "linearLay" immer NULL bleibt!
Kann mir jemand auf die Sprünge helfen?
Danke
folgender Code, funktioniert nicht, da "linearLay" immer NULL bleibt!
Kann mir jemand auf die Sprünge helfen?
Danke
Code:
public Object instantiateItem(View collection, int position) {
LinearLayout linearLay = null;
switch (position)
{
case 0:
linearLay = (LinearLayout) findViewById(R.layout.tabesuebersicht);
break;
case 1:
if(currentLocation.getAccount() == 1)
{
linearLay = (LinearLayout) findViewById(R.layout.premium);
}else
{
linearLay = (LinearLayout) findViewById(R.layout.basic);
}
break;
}
((ViewPager) collection).addView(linearLay, 0);
return linearLay;
}