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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:26:36+00:00 2026-06-08T05:26:36+00:00

My app consists off buttons on a screen with some text. Its really simple

  • 0

My app consists off buttons on a screen with some text. Its really simple as that’s all it needs to be.

But when I test my app in different virtual phones it looks different. Now as I’m not using images I’m assuming that as long as my images are in the drawable folder and not all accommodated in different drawable-** folders that they won’t be an issue.

But how do I code the XML to fit all SMARTPHONE screens.

XML:

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/textView1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:padding="@dimen/padding_medium"
        android:text="@string/welsh_libs"
        android:textColor="#FF0066"
        android:textSize="30dip"
        android:textStyle="bold"
        tools:context=".WelshLibraries" />

</LinearLayout>

<LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical" >

    <Button
        android:id="@+id/button2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="18dp"
        android:background="#6088A1"
        android:textColor="#FFFFFF"
        android:text="@string/news" />

    <Button
        android:id="@+id/button3"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="18dp"
        android:background="#50C0E9"
        android:textColor="#000000"
        android:text="@string/find_lib" />

    <Button
        android:id="@+id/button4"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="18dp"
        android:background="#6088A1"
        android:textColor="#FFFFFF"
        android:text="@string/free_res" />

    <Button
        android:id="@+id/button5"
        android:layout_width="285dp"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="18dp"
        android:background="#50C0E9"
        android:text="@string/ask_lib"
        android:textColor="#000000" />

    <Button
        android:id="@+id/button6"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="18dp"
        android:background="#6088A1"
        android:text="@string/find_book"
        android:textColor="#FFFFFF" />

    <Button
        android:id="@+id/button7"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="18dp"
        android:background="#50C0E9"
        android:text="@string/register"
        android:textColor="#000000" />

    <Button
        android:id="@+id/button8"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="18dp"
        android:background="#6088A1"
        android:text="@string/login"
        android:textColor="#FFFFFF" />

</LinearLayout>

<ImageView
    android:id="@+id/image1"
    android:layout_width="190dp"
    android:layout_height="0dip"
    android:layout_marginBottom="5dp"
    android:layout_marginLeft="70dp"
    android:layout_weight="1"
    android:contentDescription="@string/desc"
    android:src="@drawable/waglogo"
    android:visibility="visible" />

I’m using dp’s as the measurement unit but I understand to be the only units possible to use so I know its not like designing a website with pxs, ems and %s available.

Any help or links people can provide would be much appreciated.
Thanks,
Dan

P.S. I’m also looking for a way to scroll down if I want to add more buttons below the 8 present when the app loads. Any ideas?

  • 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-08T05:26:38+00:00Added an answer on June 8, 2026 at 5:26 am

    See the official Android Developers site, if you have not done that already. It has an article about supporting different screens: http://developer.android.com/guide/practices/screens_support.html.

    Also surround with a ScrollView your LinearLayout containing the buttons if you want to scroll the buttons. Something like this:

    <LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical" >
    
    <TextView
        android:id="@+id/textView1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:padding="@dimen/padding_medium"
        android:text="@string/welsh_libs"
        android:textColor="#FF0066"
        android:textSize="30dip"
        android:textStyle="bold"
        tools:context=".WelshLibraries" />
    
       </LinearLayout>
    
    <ScrollView
       android:layout_width="wrap_content"
       android:layout_height="wrap_content">
    
    <LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical" >
    
    <Button
        android:id="@+id/button2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="18dp"
        android:background="#6088A1"
        android:textColor="#FFFFFF"
        android:text="@string/news" />
    
    <Button
        android:id="@+id/button3"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="18dp"
        android:background="#50C0E9"
        android:textColor="#000000"
        android:text="@string/find_lib" />
    
    <Button
        android:id="@+id/button4"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="18dp"
        android:background="#6088A1"
        android:textColor="#FFFFFF"
        android:text="@string/free_res" />
    
    <Button
        android:id="@+id/button5"
        android:layout_width="285dp"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="18dp"
        android:background="#50C0E9"
        android:text="@string/ask_lib"
        android:textColor="#000000" />
    
    <Button
        android:id="@+id/button6"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="18dp"
        android:background="#6088A1"
        android:text="@string/find_book"
        android:textColor="#FFFFFF" />
    
    <Button
        android:id="@+id/button7"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="18dp"
        android:background="#50C0E9"
        android:text="@string/register"
        android:textColor="#000000" />
    
    <Button
        android:id="@+id/button8"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_marginLeft="18dp"
        android:background="#6088A1"
        android:text="@string/login"
        android:textColor="#FFFFFF" />
    
     </LinearLayout>
    
     </ScrollView>
    
    <ImageView
    android:id="@+id/image1"
    android:layout_width="190dp"
    android:layout_height="0dip"
    android:layout_marginBottom="5dp"
    android:layout_marginLeft="70dp"
    android:layout_weight="1"
    android:contentDescription="@string/desc"
    android:src="@drawable/waglogo"
    android:visibility="visible" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right so I have a simple app that consists of a calendar a Set
In my Android app, I have some data that needs to be synced daily
I want to build an string/text manipulation app that: An app consists of a
Would really appreciate some help with this. I have an app which consists of
I have an App that consists of multiple activities. All activities have to access
To put it simple, there's a simple java swing app that consists of JFrame
I'm creating an app that uses ActionBarSherlock. The app consists of three tabs, and
I am building an app that consists of actionbar with tabs, and each tab
My project consists of an app that links to two static libraries. Each of
I have an app that so far consists of two Activities: The Main Menu

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.