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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:39:37+00:00 2026-06-05T03:39:37+00:00

I am so confused after reading Screen Compatibility Mode documentation . First of all,

  • 0

I am so confused after reading “Screen Compatibility Mode” documentation. First of all, I created two different sizes of the same image. Secondly, I created just one layout. Thirdly, I set 150dip to my image. Finally, I got correctly in my Galaxy SII(High Density) but I didn’t get correctly when I emulate a Tablet 10″(Medium density). See the distance to the right border in both devices.

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

<Button
    android:id="@+id/button1"
    android:layout_width="150dip"
    android:layout_height="150dip"
    android:text="DENSIDADE" />

<ImageView 
    android:id="@+id/image1"
    android:src="@drawable/mode_tapcolor"
    android:layout_width="150dip"
    android:layout_height="150dip" />

</LinearLayout>

Emulator of Tablet 10"
Samsung Galaxy SII

What should I do?

  • 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-05T03:39:38+00:00Added an answer on June 5, 2026 at 3:39 am

    You should create another folder value-xlarge in res to store dimension values. So the XML code should be:

    layout.xml:

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >
    
    <Button
        android:id="@+id/button1"
        android:layout_width="@dimen/default_width"
        android:layout_height="@dimen/default_height"
        android:text="DENSIDADE" />
    
    <ImageView 
        android:id="@+id/image1"
        android:src="@drawable/mode_tapcolor"
        android:layout_width="@dimen/default_width"
        android:layout_height="@dimen/default_height" />
    
    </LinearLayout>
    

    values/dimens.xml:

    <resources>
        <dimen name="default_width">75dip</dimen>
        <dimen name="default_height">75dip</dimen>
    </resources>
    

    values-xlarge/dimens.xml:

    <resources>
        <dimen name="default_width">150dip</dimen>
        <dimen name="default_height">150dip</dimen>
    </resources>
    

    So when apk is installed, it will use the right dimension values for the right device. The same goes for drawable, you can create drawable-xlarge to store images for tablet if you want.

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

Sidebar

Related Questions

I got so confused after reading the documentation. I've designed my app to run
I have created my first project (after several tutorials and reading the Android Developers
After reading the Android NDK documentation i am a bit confused on this issue.
I am totally confused after reading 2 different posts today. With the research I
After reading http://www.w3schools.com/tags/tag_noscript.asp confused about onclick event on noscript tag. Anybody knows the purpose?
After reading the wikipedia article on WPF architecture, I am a bit confused with
I'm trying out ASP.NET MVC, but, after reading a huge tutorial, I'm slightly confused.
Being confused again after reading about this anti-pattern and the many concerns about it
After reading RailsGuides , some answers here and other docs I am still confused
After reading quite few articles on deployment, i am bit confused about the procedure.

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.