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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:23:01+00:00 2026-06-10T17:23:01+00:00

i want, that the first imagebutton fill the top place and the second imagebutton

  • 0

i want, that the first imagebutton fill the top place and the second imagebutton fill the bottom place. Did I forget something?

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<ImageButton
    android:id="@+id/imageButton1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:layout_alignParentTop="true"
    android:background="@color/white"
    android:src="@android:drawable/btn_star"
    android:layout_gravity="top" />

<ImageButton
    android:id="@+id/imageButton2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:background="@color/white"
    android:src="@android:drawable/btn_star"
    android:layout_gravity="bottom" />

</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-06-10T17:23:02+00:00Added an answer on June 10, 2026 at 5:23 pm

    The problem is that you need to use a RelativeLayout Try:

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >
    
    <ImageButton
        android:id="@+id/imageButton1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:background="#ffffff"
        android:src="@android:drawable/btn_star"
        android:layout_gravity="top" />
    
    <ImageButton
        android:id="@+id/imageButton2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:background="#ffffff"
        android:src="@android:drawable/btn_star"
        android:layout_gravity="bottom" />
    
    </RelativeLayout>
    

    enter image description here

    Hope that helps. Tell me if that is what you want to accomplish, or if you want both buttons to fill halve the height of the screen equally.

    If is then second option then try this:

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >
    
    <ImageButton
        android:id="@+id/imageButton1"
        android:layout_weight="1"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:background="#ffffff"
        android:src="@drawable/icon"
     />
    
    <ImageButton
        android:id="@+id/imageButton2"
        android:layout_weight="1"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:background="#ffffff"
        android:src="@drawable/icon"
     />
    
    </LinearLayout>
    

    Which would look like this:

    enter image description here

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

Sidebar

Related Questions

First I want to clearify that I mean by reverse engineering something like decompiling
look at this fiddle: http://jsfiddle.net/ugxNK/ I want that the first list element is in
I want to define that the first element will be of a specific type,
Suppose I want to find the longest subsequence such that first half of subsequence
I want to find the first element that has appeared in previous positions in
First of all i want to say that i have searched each and every
First of all i want to say that I'm still a beginner in ASP.NET
First thing i want to say that it's not an easy question to explain,
First off I want to say that I am not using threads or multiple
I have 2 pages that I want to show as instructions the first time

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.