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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:57:27+00:00 2026-06-01T19:57:27+00:00

I just know this is simple and in about 30 minutes time, I’ll hate

  • 0

I just know this is simple and in about 30 minutes time, I’ll hate myself…

I have a splashscreen which consists of a static image which fills the screen. So I simply set the background attribute of whatever root view I use in my layout.

The image has a blank area over which I need to place an “I accept” button. To deal with different resolutions, I must position it using a percentage of the display height – 58% is the spot.

I can’t use layout_weight because that sizes the button and absolutelayout (setting the y position in code) is deprecated.

How can I achieve this? I don’t care what viewgroup is the parent and I’m fine with having “blank” views filling up space.

I am aiming to do this entirely in layout XML to keep my code clean…

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-01T19:57:29+00:00Added an answer on June 1, 2026 at 7:57 pm

    You say you can’t use layout_weight, but that’s your only option if you want to do it purely in XML. I don’t understand why you think you can’t use it anyway. Here’s an example of how you might do it:

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/splash"
        android:orientation="vertical" >
    
       <View
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="58" />
    
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="42" >
    
                <!-- Place buttons here -->
    
        </LinearLayout>
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this is simple, I just can't recall the best way to do
I know this is going to be something simple that I'm just missing somehow,
This is probably quite simple, but I just don't know how to do this...
I know this sounds confusing: I have just built some basic prev/next pagination for
I know this is probably a simple question but my mind just isn't working
I know this is probably one of those you just have to try it
I just read about web sockets and written this simple client side java script.
I don't know how to explain this correctly but just some sample for you
I know this has been asked thousands of times but I just can't find
i know this is kinda retarded but I just can't figure it out. I'm

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.