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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:12:18+00:00 2026-05-22T16:12:18+00:00

So I’m writing this app for image manipulation, and after the user chooses an

  • 0

So I’m writing this app for image manipulation, and after the user chooses an image from the gallery, I have an options page with several controls on top and a preview of the chosen image in the middle. There is also a ‘start’ button at the bottom, but if the image is high enough, the button gets covered up.

I considered resizing the image to a specific height that works, but that height would change on different devices. Ideally I’d like the image to take up as much space between the controls and button, but I just can’t figure out how to do that. I tried using a vertical tablelayout but that made no difference.

In this image, the emulator window is on the right.
The emulator is on the right.

Here’s my XML. A tad messy but here goes:

 <?xml version="1.0" encoding="utf-8"?>

 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linearLayout" android:orientation="vertical"
android:layout_height="wrap_content" android:padding="10px"
android:layout_width="fill_parent">
<TextView android:textSize="18px" android:text="GIF Options"
    android:id="@+id/textView3" android:layout_width="wrap_content"
    android:layout_height="wrap_content">
</TextView>

<TableLayout android:id="@+id/tableLayout"
    android:layout_width="fill_parent" android:layout_height="wrap_content"
    android:stretchColumns="1">

    <TableRow>
        <TextView android:layout_height="wrap_content" android:text="FPS:"
            android:id="@+id/TextView1"     android:layout_width="wrap_content"
            android:enabled="false" android:textSize="17px"></TextView>
        <EditText android:text="20" android:inputType="numberDecimal"
            android:id="@+id/EditTextFPS" android:numeric="decimal"
            android:singleLine="true" android:layout_height="wrap_content"
            android:layout_width="wrap_content" android:digits="2"
            android:width="50px"></EditText>
    </TableRow>
    <TableRow>
        <TextView android:layout_height="wrap_content" android:text="Frames:"
            android:id="@+id/TextView2" android:layout_width="wrap_content"
            android:enabled="false" android:textSize="17px"></TextView>

        <EditText android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:text="70"
            android:inputType="numberDecimal" android:id="@+id/EditTextFrames"
            android:numeric="decimal" android:singleLine="true" android:digits="2"></EditText>
    </TableRow>
    <TableRow>
        <TextView android:layout_height="wrap_content" android:text="Saturation Boost: "
            android:id="@+id/TextView2" android:layout_width="wrap_content"
            android:enabled="false" android:textSize="17px"></TextView>

        <SeekBar android:layout_height="wrap_content"
            android:layout_width="fill_parent" android:id="@+id/seekBar1"
            android:layout_alignParentLeft="true" android:max="10"></SeekBar>

    </TableRow>
</TableLayout>

<TextView android:layout_width="wrap_content"
    android:layout_height="wrap_content" android:id="@+id/textView4"
    android:layout_gravity="center" android:text="Chosen Image"
    android:textSize="16px"></TextView>
<ImageView android:layout_width="wrap_content" android:src="@drawable/icon"
    android:layout_gravity="center" android:id="@+id/optionspreview"
    android:isScrollContainer="true" android:layout_height="fill_parent"></ImageView>

<Button android:layout_height="wrap_content"
    android:layout_width="wrap_content" android:textSize="22px"
    android:id="@+id/startbutton" android:text="Start!"
    android:layout_alignParentBottom="true"
    android:layout_centerHorizontal="true" android:layout_gravity="center"></Button>

 </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-22T16:12:19+00:00Added an answer on May 22, 2026 at 4:12 pm

    You can do this by using a RelativeLayout.

    A oversimplified answer (since I don’t know your layout) would be to have all your top controls inside a layout (say layoutTop), all your button controls inside a layout (layoutBottom) and having your ImageView in the middle:

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
       android:id="@+id/layoutWrapper" 
       android:layout_width="fill_parent" 
       android:layout_height="fill_parent"
       >
    
       <LinearLayout
          android:id="@+id/layoutTop" 
          android:layout_width="fill_parent" 
          android:layout_height="wrap_content" 
          android:layout_alignParentTop="true"
       >
          <TextView 
             android:layout_width="wrap_content" 
             android:layout_height="wrap_content" 
             android:text="Sparta!!!"
          />
       </LinearLayout>
    
       <ImageView
           android:layout_width="wrap_content" 
           android:layout_height="wrap_content" 
           android:layout_below="@id/layoutTop"
           android:layout_above="@+id/layoutBottom"
           android:src="@drawable/empty_star" 
       />
    
       <LinearLayout
          android:id="@id/layoutBottom" 
          android:layout_width="fill_parent" 
          android:layout_height="wrap_content" 
          android:layout_alignParentBottom="true"
      >
          <TextView 
             android:layout_width="wrap_content" 
             android:layout_height="wrap_content" 
             android:text="Sparta!!!"
          />
      </LinearLayout>
    
    </RelativeLayout>
    

    The trick here is to notice how I created the id for layoutBottom. the “+” is not written when I am declaring the actual layout, but rather the first time it is used, i.e. in the ImageView.

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

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I am writing an app with both english and french support. The app requests
I have a bunch of posts stored in text files formatted in yaml/textile (from

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.