How can I have a layout where there is a view occupying most of the top of the screen and a bottom bar below it in the bottom of the screen without setting size for top view directly?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
You can set the top View’s
android:layout_weightset to “1”, then you can set your bottom View’s height and the top View will take up all remaining space. For example:(Of course, if there is content in the bottom View, you can just set the height to “wrap_content” and have it set its own size based on its contents.)