I am working on widget, where for widget settings i am looking to provide a dialog for with tab fragment, the problem is dialog do not have action bar tabs, i have tried various lay out patterns, but none of them seems to work.
In the manifest, have made the activity
<activity android:theme="@android:style/Theme.Dialog" android:launchMode="singleInstance" android:name="WidgetConfigureActivity"></activity>
I am not sure, which layout to use exactly ViewPager, FragmentTabHost in the UI, basically not clear which layout to go for.
WidgetConfigureActivity extends
FragmentActivity
for now, the below is the code for it(code is taken from FragmentTabHost)FragmentTabHost mTabHost; @Override protected void onCreate(Bundle arg0) { super.onCreate(arg0); setContentView(R.layout.widget_configure_activity); mTabHost = (FragmentTabHost)findViewById(android.R.id.tabhost); mTabHost.setup(this, getSupportFragmentManager(), R.id.tabhost); //this above setup line gives error => (The method setup(Context, FragmentManager, int) in the type FragmentTabHost is not applicable for the arguments (WidgetConfigureActivity, FragmentManager, int)) mTabHost.addTab(mTabHost.newTabSpec("simple").setIndicator("Simple"), MyFragment.class, null); }
ViewPager is not that important, but how to have tabbed dialog with fragments is the question?
4.
How to make UI/layout NOT change even if apply Theme.Dialog
to my activity, all the font appear white in white background? (i have seen text by tilting the screen)