Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6380343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:15:22+00:00 2026-05-25T02:15:22+00:00

I have a custom dialog. I use the following code to create it in

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:15:23+00:00Added an answer on May 25, 2026 at 2:15 am

    You just need to wrap up your controls described in R.layout.dialog_photo_gallery to your RotateLinearLayout

    something like that:

    <com.xxx.RotateLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                           android:layout_width="fill_parent"
                           android:layout_height="fill_parent">
     <Gallery android:id="@+id/galProducts
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"/>
    </com.xxx.RotateLinearLayout>
    

    And then:

    public class MyDialog extends AlertDialog {
        public MyDialog(Context context) {
            super(context);
            LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            View view = inflater.inflate(R.layout.dialog_photo_gallery, null);
            setView(view);
            galProducts = (Gallery) view.findViewById(R.id.galProducts);       
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my WPF application I have a lot of custom dialog boxes that pop
I have a standard jQuery UI dialog. Inside that dialog, I have a custom
I am trying to get the custom dialog to close on button press //set
I have custom page and id of list item. How can i show sharepoint
Here is the my code for the Dialog With ListView and here i also
To batch upload many files, there is one section of CSharp WPF code that
I have 12 dialogs on one page. I only want them to open if
At the moment I have a widget which, when the user clicks on it,
I have an app with a list view that downloads images on the fly.
What I wish to do is, after creating a dialog box with DoModal() and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.