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

  • SEARCH
  • Home
  • 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 8228757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:34:11+00:00 2026-06-07T16:34:11+00:00

I recently started creating apps for android and wanted to test layouts for different

  • 0

I recently started creating apps for android and wanted to test layouts for different screen sizes. Since I’ve got no android device I created to virtual ones with AVD:

  1. 240 dpi, No width or height specifications (for phones)
  2. 160 dpi, 800 x 1280 (for tablets)

Since I just finished a tutorial I just edited my app so that the directory looks like this:

res/
    layout/
        activity_main.xml

    layout-large/
        activity_main.xml

layout/activity_main.xml:

<?xml ...>
<LinearLayout ...>
    <Button
        android:text="@string/button_send"
        ... />
</LinearLayout>

layout-large/activity_main.xml:

<?xml ...>
<LinearLayout ...>
    <Button
        android:text="@string/button_send_large"
        ... />
</LinearLayout>

The two different string ressources contain different strings, so what I expected it to do is to display the one on large displays and the other on everything else. What it does is just using the .xml file from the “layout” folder on any device.

So I did some research and tried to rename “layout-large” to “layout-xlarge” and finally to “layout-sw600dp”. Didn’t work either.
Both devices run on Android 4.1.
And yes, I did make sure that eclipse launched the app on the correct device.

Question: What am I doing wrong?

  • 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-06-07T16:34:12+00:00Added an answer on June 7, 2026 at 4:34 pm

    Put followin

    <?xml ...>
    <LinearLayout ...>
        <Button
            android:text="@string/button_send"
            ... />
    </LinearLayout>
    

    in res/ layout/ activity_main.xml

    AND CREATE
    res/ layout-hdpi/ activity_main.xml

                         ^^^^
    

    Put followin

    <?xml ...>
    <LinearLayout ...>
        <Button
            android:text="@string/button_send_large"
            ... />
    </LinearLayout>
    

    in res/ layout-hdpi/ activity_main.xml

               ^^^^
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have recently started learning java for creating android apps. I have spent hours
I have recently started creating an iPhone application using Appcelerator's Titanium. Since the application
I recently started creating services layers and making declarations like: MyService myService = new
I've recently started creating some jQuery plugins and I'm finding it difficult to document
Iv'e recently started a new job as an ICT Technician and im creating an
I have recently started using the excellent Texter . I wanted to set up
I have recently started creating my own controls and I seem to have a
Our application has recently started creating (and not cleaning up) temp files at a
Recently, I started creating a program for the company I work for. Just as
I recently started creating a site where users will be able to join groups

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.