<com.ares.tabhost.TabPage android:id="@+id/textView4" android:text="Tab 2" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/background_states" customAttrs:TabHost_textColor="#C0F" //Need to pass MYACTIVITY.java customAttrs:TabHost_LinkToActivity="@src/MYACTIVITY.java" //if I pass @layout/someXMLfile - it works great! />
void createInnerActivity(ViewGroup container, Class<?> activityClass) { if (container.getChildCount() != 0) { container.removeViewAt(0); } android.app.ActivityGroup ag = new ActivityGroup(true); final Intent intent = new Intent(this, activityClass); final Window window =ag. getLocalActivityManager().startActivity(activityClass.toString(), intent); //Error occured (activities can't be added until the containing group has been created) container.addView(window.getDecorView(), new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT)); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)