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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:05:50+00:00 2026-06-07T20:05:50+00:00

For an intro page, for an Android app, I want to make 9 buttons

  • 0

For an intro page, for an Android app, I want to make 9 buttons in this order:

[img1][img2][img3]
[img4][img5][img6]
[img7][img8][img9]

There is a whitespace between every image(10dp)

The problem, when I’m using LinearLayouts, there always is a white space. Same for a table.
I cannot use a GridLayout because the app needs to support Android 2.2

I hope you could help me!

P.S.
Here is an example of the code

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

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content" >

            <ImageView
                android:id="@+id/tl"
                android:layout_width="220dp"
                android:layout_height="220dp"
                android:src="@drawable/home_tl" />

            <ImageView
                android:id="@+id/ImageView05"
                android:layout_width="220dp"
                android:layout_height="220dp"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:src="@drawable/home_tc" />

            <ImageView
                android:id="@+id/ImageView06"
                android:layout_width="220dp"
                android:layout_height="220dp"
                android:src="@drawable/home_tr" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content" >

            <ImageView
                android:id="@+id/ImageView01"
                android:layout_width="220dp"
                android:layout_height="220dp"
                android:src="@drawable/home_ml" />

            <ImageView
                android:id="@+id/ImageView02"
                android:layout_width="220dp"
                android:layout_height="220dp"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:src="@drawable/home_mc" />

            <ImageView
                android:id="@+id/ImageView03"
                android:layout_width="220dp"
                android:layout_height="220dp"
                android:src="@drawable/home_mr" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content" >

            <ImageView
                android:id="@+id/imageView1"
                android:layout_width="220dp"
                android:layout_height="220dp"
                android:src="@drawable/home_bl" />

            <ImageView
                android:id="@+id/imageView2"
                android:layout_width="220dp"
                android:layout_height="220dp"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:src="@drawable/home_bc" />

            <ImageView
                android:id="@+id/imageView3"
                android:layout_width="220dp"
                android:layout_height="220dp"
                android:src="@drawable/home_br" />
        </LinearLayout>
    </LinearLayout>

The problem is that the images not fit in the screen. It must be suitable for every size (even for tablets 10.1)

Solved:
I added for every imageview android:adjustViewBounds="true" and used layout_weight="1"

  • 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-07T20:05:52+00:00Added an answer on June 7, 2026 at 8:05 pm

    try using LinearLayout with horizontal orientation and inside that,take 3 ImageButtons and keep the width of each as fill_parent and weight = 1,this will give equal width to all the 3 imageButton.

    for eg

    <LinearLayout
    android:orientaion="vertical"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    >
    
       <LinearLayout
       android:orientaion="horizontal"
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       >
        <ImageButton
        android:layout_width="fill_parent"
        android:weight="1"
        android:layout_height="wrap_content"
        />
        <ImageButton
        android:layout_width="fill_parent"
        android:weight="1"
        android:layout_height="wrap_content"
        />
        <ImageButton
        android:layout_width="fill_parent"
        android:weight="1"
        android:layout_height="wrap_content"
        />
    </LinearLayout>
    
    <LinearLayout
      android:orientaion="horizontal"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      >
          <ImageButton
          android:layout_width="fill_parent"
          android:weight="1"
          android:layout_height="wrap_content"
          />
          <ImageButton
          android:layout_width="fill_parent"
          android:weight="1"
          android:layout_height="wrap_content"
          />
          <ImageButton
          android:layout_width="fill_parent"
          android:weight="1"
          android:layout_height="wrap_content"
          />
       </LinearLayout>
    
       <LinearLayout
         android:orientaion="horizontal"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         >
          <ImageButton
          android:layout_width="fill_parent"
          android:weight="1"
          android:layout_height="wrap_content"
          />
          <ImageButton
          android:layout_width="fill_parent"
          android:weight="1"
          android:layout_height="wrap_content"
          />
          <ImageButton
          android:layout_width="fill_parent"
          android:weight="1"
          android:layout_height="wrap_content"
          />
      </LinearLayout>
    <LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make android home page background. I have imported a video file
I've written an iOS app that I want to port to android. This app
I want to get some text from a PHP page into an Android application.
I am writing a website intro page and really like the style on this
I have written an GWT app and a static Intro page that introduces the
I often found some backgrounds like this: http://knplabs.de/bundles/knpcorporate/images/bg-intro.png The whole page is: http://knplabs.de How
I was reading this documentation page, http://developer.android.com/reference/android/util/Log.html . The section here caught my eye:
Hi I'm very new to android development, and want to create an app with
i have a question, i have a index.php page that is the intro of
I have integrated Facebook into my Android App. When a user now posts 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.