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 7066763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:07:11+00:00 2026-05-28T05:07:11+00:00

After creating a custom Dialog using a ListView and my own implementation of ListAdapter

  • 0

After creating a custom Dialog using a ListView and my own implementation of ListAdapter, I notice that the width of the dialog changes depending on the device screen size (and perhaps on other factors I’m not aware of).

I’d like to use a different layout for wider dialogs. What are some good ways to get the width of a Dialog, preferably before calling Dialog.show()?

  • 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-28T05:07:12+00:00Added an answer on May 28, 2026 at 5:07 am

    Take a look at the Supporting Multiple Screens guide.

    What you basicaly need to do is create a layout res folder for each screen size you intend to support:

    // layouts for various screen sizes
    res/layout/my_custom_dialog.xml             // normal screen size ("default")
    res/layout-small/my_custom_dialog.xml       // small screen size
    res/layout-large/my_custom_dialog.xml       // large screen size
    res/layout-xlarge/my_custom_dialog.xml      // extra large screen size
    res/layout-xlarge-land/my_custom_dialog.xml // extra large in landscape 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to change the custom pen colour attribute after creating it using
After creating a metaclass using Moose::Meta::Class->create , how do I instantiate a real Moose
I have such view that handles user registration. After creating new user i want
What I wish to do is, after creating a dialog box with DoModal() and
I'm creating custom control that contain multiple parts. Inside template creation I'm subscribing for
I am creating an application that sends SMS while after click on a button.
After creating settings for each dll , a .dll.config file is generated. If that
I have a T4 that is generating multiple .html files. After creating them all
After creating a custom view and assigning it to the navigationItem.titleView property it is
I like to custom edit the permission of users after creating or editing an

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.