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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:00:53+00:00 2026-06-01T05:00:53+00:00

I have the following layout: <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=fill_parent android:background=@drawable/aussie_bg_big > <ImageView android:id=@+id/titleImage android:layout_width=wrap_content

  • 0

I have the following layout:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/aussie_bg_big" >

<ImageView
    android:id="@+id/titleImage"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_centerHorizontal="true"
    android:contentDescription="@null"
    android:src="@drawable/aussie_title_small" />

<ImageView
    android:id="@+id/clearButtonOutput"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_above="@+id/titleImage"
    android:layout_alignParentRight="true"
    android:contentDescription="@null"
    android:src="@drawable/aussie_clear" />

<EditText
    android:id="@+id/OutputText"
    android:layout_width="fill_parent"
    android:layout_height="100dp"
    android:layout_above="@+id/clearButtonOutput"
    android:layout_alignParentLeft="true"
    android:background="@drawable/textbox"
    android:ems="10"
    android:gravity="top"
    android:inputType="textMultiLine"
    android:textColor="#ffffff" />

<ImageView
    android:id="@+id/translateButton"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_above="@+id/OutputText"
    android:layout_centerHorizontal="true"
    android:clickable="true"
    android:contentDescription="@null"
    android:src="@drawable/translatebuttonselector" />

<ImageView
    android:id="@+id/ClearButton"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_above="@+id/translateButton"
    android:layout_alignParentRight="true"
    android:contentDescription="@null"
    android:src="@drawable/aussie_clear" />

<EditText
    android:id="@+id/InputText"
    android:layout_width="fill_parent"
    android:layout_height="100dp"
    android:layout_above="@+id/ClearButton"
    android:layout_alignParentLeft="true"
    android:background="@drawable/textbox"
    android:ems="10"
    android:gravity="top"
    android:inputType="textMultiLine"
    android:singleLine="false"
    android:textColor="#ffffff" />

What I’d like to do is:

-> Keep the “imageBottom” imageview on the BOTTOM of the activity at all times, centered horizontally.

-> Keep the “imageCenter” imageview on the center of the activity at all times, centered horizontally.

-> Keep “imageBelowInputText” imageview below the InputText edittext which is located ABOVE imageCenter, aligned to the right.

-> Keep “imageBelowOutputText” imageview below the OutputText edittext which is located BETWEEN imageCenter and imageBottom, aligned to the right.

It works fine so far but I’d also like for the edittext views to occupy ALL of the remaining space EQUALLY. Providing different versions of the layout for small, normal, large, x-large screens worked fine, considering I hardcoded each edittext’s size in dpi. However, on some layouts, it still looks a bit wrong and misplaced (misaligned). That’s why I’m looking for a solution to place the ImageViews accordingly first, and then let the two EditTexts take all the remaining space EQUALLY (important).

So far, I couldn’t think of a 100% correct solution. Can you help me out? Thanks!

  • 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-01T05:00:55+00:00Added an answer on June 1, 2026 at 5:00 am

    Notice the two edittexts have their layout_height set to “0dp” and layout_weight set to “1”
    XML

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/LinearLayout1"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:paddingTop="15dp"
        android:orientation="vertical" >
    
        <EditText
            android:id="@+id/editText1"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1" />
    
        <Button
            android:id="@+id/button1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="right"
            android:text="Clear" />
    
        <Button
            android:id="@+id/button2"
            android:layout_width="wrap_content"
            android:layout_height="100dp"
            android:layout_gravity="center"
            android:text="Bear" />
    
        <EditText
            android:id="@+id/editText1"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1" />
    
        <Button
            android:id="@+id/button2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="right"
            android:text="Clear" />
    
        <Button
            android:id="@+id/button2"
            android:layout_width="wrap_content"
            android:layout_height="100dp"
            android:layout_gravity="center"
            android:text="Speaking Aussie" />
    
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following Custom Component: <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=@dimen/bottom_actionbar_item_height android:orientation=horizontal android:gravity=center> <Button android:id=@+id/btnLogin
I have the following layout: <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=fill_parent> <GridView android:id=@+id/grid
I have the following layout buttons.xml <?xml version=1.0 encoding=UTF-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/buttonsLayout android:layout_width=fill_parent android:layout_height=wrap_content
I have the following layout defined in XML: <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_height=wrap_content
I have the following the layout file <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android xmlns:app=http://schemas.android.com/apk/res/com.company android:layout_width=fill_parent
I have the following XML layout for a ListActivity. <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android
I have the following layout: <?xml version=1.0 encoding=utf-8?> <RelativeLayout android:id=@+navigate/RLayout android:layout_width=fill_parent android:layout_height=fill_parent android:background=#ABABAB xmlns:android=http://schemas.android.com/apk/res/android
I have used the following in android manifest. <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android xmlns:ads=http://schemas.android.com/apk/lib/com.google.ads
I have the following layout in place <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:orientation=vertical android:layout_width=fill_parent
I have the following XML layout file, HELPME.XML <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent

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.