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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:14:42+00:00 2026-05-30T22:14:42+00:00

i’ve developed an android app, but sometimes users call me and tell me that

  • 0

i’ve developed an android app, but sometimes users call me and tell me that layout is incorrect to their device. The cause is that android runs on devices with different screen size and density. I try to cover all the type, but when i correct something, other things become incorrect. Damn! Is there a way to create just one layout with one folder of drawable and use something to scale layout in function of different screen size? Thank you!!
This is an example of my main xml layout:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent" android:background="@drawable/sfondo">
    <LinearLayout android:id="@+id/linearLayout2"
        android:layout_height="wrap_content" android:layout_width="match_parent"
        android:orientation="vertical">
        <LinearLayout android:id="@+id/linearLayout1"
            android:layout_height="fill_parent" android:weightSum="1"
            android:layout_width="fill_parent" android:orientation="horizontal">
            <ImageView android:layout_height="wrap_content" android:id="@+id/imageView1"
                android:src="@drawable/trovachiavi_contatti" android:layout_width="wrap_content"
                android:layout_marginTop="15dp" android:layout_marginLeft="20dp"></ImageView>
            <ImageButton android:id="@+id/infoButton"
                android:background="@null" android:layout_height="47dp"
                android:layout_marginLeft="5dip" android:layout_weight="0.25"
                android:layout_marginTop="15dip" android:src="@drawable/info_mini"
                android:layout_width="47dp">
            </ImageButton>
        </LinearLayout>
    </LinearLayout>
    <RelativeLayout
        android:id="@+id/relativeLayout1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >
        <LinearLayout
            android:id="@+id/layoutGif"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="vertical" >
            <trova.chiavi.sd.GIFView
            android:layout_gravity="center" 
            android:layout_height="220dp" android:layout_width="210dp" android:id="@+id/GIFSingle"
            android:layout_marginLeft="40dp"></trova.chiavi.sd.GIFView>
        </LinearLayout>
        <LinearLayout
            android:id="@+id/layoutBanner"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:orientation="vertical"
        >
            <TextView
                android:id="@+id/testoBanner"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Medium Text"
                android:layout_gravity="center"
                android:gravity="center"
                android:textAppearance="?android:attr/textAppearanceMedium" 
                android:layout_marginTop="10dp"
                android:textColor="@android:color/black"
                android:maxLines="2"/>

            <ImageView
                android:id="@+id/Banner"
                android:layout_width="match_parent"
                android:layout_height="144dp"
                android:layout_gravity="center"
                android:src="@drawable/box_codice" 
                android:layout_marginTop="5dp"
             />
        </LinearLayout>
    </RelativeLayout>
    <LinearLayout
        android:id="@+id/linearLayout3"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:layout_marginTop="1dp">
        <ImageButton
            android:id="@+id/avvia_cerca"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@null"
            android:src="@drawable/chiave"
            android:layout_gravity="center"/>
        <TextView
            android:id="@+id/testoRicercaSingle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textColor="@android:color/black" 
            android:layout_gravity="center"/>
    </LinearLayout>
</LinearLayout>
  • 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-30T22:14:43+00:00Added an answer on May 30, 2026 at 10:14 pm

    using layoutSum and layoutWeight you can resize all content with a percent. I work with linearlayout and this parameters and i do only one layout for every screen size !! 🙂

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

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am doing a simple coin flipping experiment for class that involves flipping a

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.