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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:16:37+00:00 2026-05-30T00:16:37+00:00

I am beginner to programming for android. First of all i need that my

  • 0

I am beginner to programming for android. First of all i need that my app will be supported by 2 devices phone (480×800) and tablet (1280×800).

I read this and tried to do step by step.
Supporting Multiple Screens

So i created folders with layouts:

res/layout/firstPage.xml//this is by default phone layout port and land
res/layout-sw720dp/firstPage.xml//this is tablet port layout
res/layout-sw720dp-land/firstPage.xml//this is tablet land layout

My xml looks like this:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_gravity="center_vertical"
    android:baselineAligned="false"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical" >

    <Button
        android:id="@+id/button1"
        android:text="@string/button1" />

    <Button
        android:id="@+id/button2"
        android:text="@string/button2" />

    <Button
        android:id="@+id/button3"
        android:text="@string/button3" />

</LinearLayout>

I don’t give more info about button because in every layout they are different.

In my AndroidManifest.xml i have this line:

<supports-screens android:anyDensity="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:largeScreens="true"/>

Maybe i don’t need to set true for others if i set tru to this anyDensity=”true”

So i think i did everything as i should. But when i wanted to test on tablet it shows me layout by default of phone.
So what i missed ?
Or i need to do some coding also ?

Edited:

I think i understand why…
Beginning with Android 3.2 (API level 13), the above size groups are deprecated and you should instead use the swdp configuration qualifier to define the smallest available width required by your layout resources.

My table is 3.1 so that why it didn’t find layout ?
But what to do if i want to support from 2.1 to 4 ?

  • 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-30T00:16:38+00:00Added an answer on May 30, 2026 at 12:16 am

    Sollution:

    You Should have to follow: Best Practise

    Try to use the different layout for different screen size:

    As like:

    res/layout/my_layout.xml         // layout for normal screen size ("default")res/layout-small/my_layout.xml       // layout for small screen size
    res/layout-large/my_layout.xml       // layout for large screen size
    res/layout-xlarge/my_layout.xml      // layout for extra large screen size
    res/layout-xlarge-land/my_layout.xml // layout for extra large in landscape orientation
    

    Use Different size of images as per the different Screen Size of device:

    As Like:

    res/drawable-mdpi/my_icon.png        // bitmap for medium density
    res/drawable-hdpi/my_icon.png        // bitmap for high density
    res/drawable-xhdpi/my_icon.png       // bitmap for extra high density
    

    Still if its not solve your problem then use the static size for the images for respective different layout.

    As per my point of view and the Document it self explain that you should have to follow certain steps to do this.

    Hope it will helps you. nd if not then let me know where you getting stop in managing layout.

    Thanks.

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

Sidebar

Related Questions

(note that I'm a total beginner in android programming) I have a class that
I'm a beginner in ruby and in programming as well and need help with
This is a topic that, as a beginner to PHP and programming, sort of
I am a beginner in Android programming. I want to build a simple application
I am a beginner in android programming. My Graduate project is about tracking a
First i am a beginner in programming in general, i am trying to create
I am a beginner in Android programming. I was going through the official tutorial
I am a beginner to android programming. So I am sorry if some of
I started learning android programming a couple of weeks ago. I am a beginner
I'm a beginner in Android development but not in programming itself. Anyway, this question

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.