How to display TabActivity in AlertDialog?
I know that it’s a little bit tricky, as we should run TabActivity as normal activity,
e.g.
Intent intent = new Intent(MyClass.this, Settings.class);
startActivity(intent);
where Settings – TabActvivity.
The only way I know it to set view for AlertDialog, but it will don’t work.
View view = (View) ((LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE))
.inflate(R.layout.settings, null);
new AlertDialog.Builder(this).setTitle("AlertDialog").setView(view).show();
Is there any way to show TabActivity in AlertDialog?
Thanks,
You’re sort of conflating the concept of Views and Activities here, but probably the easiest way to do what you want is to set your
TabActivity‘s theme toTheme.Dialogand start it, instead of using anAlertDialogand trying to wrap anActivityinside a popup inside anotherActivity. For your own sanity’s sake, don’t go down that road into Inception-type territory.