I have a custom dialog. I use the following code to create it in “onCreateDialog” method:
Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(this,
android.R.style.Theme_Light_NoTitleBar_Fullscreen));
LayoutInflater inflater = LayoutInflater.from(this);
final View productsView = inflater.inflate(
R.layout.dialog_photo_gallery,
null);
builder.setView(productsView);
galProducts = (Gallery) productsView.findViewById(R.id.galProducts);
...
I have used the link for creating a custom LinearLayout that supports rotation.
I want to use my custom LinearLayout class and set my resource layout to it? I do not want to declare my controls dynamically in the source code. I want to do something like this:
RotateLinearLayout myLayout= new RotateLinearLayout(this);
myLayout.setResourceView(R.layout.dialog_photo_gallery);
How can I do that?
How can I use AlertDialog.Builder and my RotateLinearLayout Simultaneously?
You just need to wrap up your controls described in R.layout.dialog_photo_gallery to your RotateLinearLayout
something like that:
And then: