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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:53:57+00:00 2026-05-24T22:53:57+00:00

I run into the following issue: I have an activity which is set up

  • 0

I run into the following issue:

I have an activity which is set up in the landscape mode in this way:

this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

And here is my xml file:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal">
    <RelativeLayout android:layout_width="wrap_content"
    android:layout_height="fill_parent" 
    android:id="@+id/first"
    android:orientation="vertical"
    android:layout_weight="1.0">

    <SurfaceView android:layout_width="fill_parent"
android:layout_height="fill_parent" android:id="@+id/surface_camera" />
    </RelativeLayout>

 <RelativeLayout android:layout_width="180dp"
    android:layout_height="fill_parent"
     >
    <Button android:layout_width="fill_parent"
android:layout_height="320dip" 
android:id="@+id/btnPhoto"
android:text="Take Photo" 
android:layout_gravity="bottom|left" />

    </RelativeLayout>

</RelativeLayout>

And here is how the result looks like:

http://i56.tinypic.com/21103ld.png

What I want is that button to be set up at the bottom of the screen(!from my point of view).

But I don’t know how to achieve that.Thanks

EDIT1:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"
>

<SurfaceView android:layout_width="fill_parent"
android:layout_height="fill_parent" android:id="@+id/surface_camera" />

<RelativeLayout android:layout_width="180dp"
android:layout_height="fill_parent"
 >

<Button android:layout_width="fill_parent"
android:layout_height="320dip" 
android:id="@+id/btnPhoto"
android:layout_alignParentBottom="true"
android:text="Take Photo" 
android:layout_gravity="bottom|left" />

</RelativeLayout>

</RelativeLayout>

SOLUTION:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"
>

<SurfaceView android:layout_width="450dip"
android:layout_height="fill_parent" android:id="@+id/surface_camera" />

<RelativeLayout android:layout_width="180dp"
android:layout_toRightOf="@id/surface_camera"
android:layout_height="fill_parent"
 >

<Button android:layout_width="fill_parent"
android:layout_height="320dip" 
android:id="@+id/btnPhoto"
android:layout_alignParentBottom="true"
android:text="Take Photo" 
android:layout_gravity="bottom|right" />

</RelativeLayout>

</RelativeLayout>
  • 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-24T22:53:59+00:00Added an answer on May 24, 2026 at 10:53 pm

    EDIT
    Try this

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout android:layout_width="fill_parent"
    android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res    /android">
    <RelativeLayout android:layout_width="fill_parent"
        android:layout_height="200dip" android:id="@+id/first"
        android:orientation="vertical" android:layout_weight="1.0">
    
        <SurfaceView android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:id="@+id/surface_camera" />
    </RelativeLayout>
    
    <RelativeLayout android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:layout_below="@+id/first">
        <Button android:layout_width="fill_parent"
            android:layout_height="wrap_content" android:id="@+id/btnPhoto"
            android:text="Take Photo" android:layout_alignParentBottom="true" />
    
    </RelativeLayout>
    

    Try changing your layout like this,

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout android:layout_width="fill_parent"
    android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"
    >
    <RelativeLayout android:layout_width="wrap_content"
    android:layout_height="fill_parent" 
    android:id="@+id/first"
    android:orientation="vertical"
    android:layout_weight="1.0">
    
    <SurfaceView android:layout_width="fill_parent"
    android:layout_height="fill_parent" android:id="@+id/surface_camera" />
    </RelativeLayout>
     <RelativeLayout android:layout_width="180dp"
    android:layout_height="fill_parent"
    android:layout_below="@+id/first"
     >
    <Button android:layout_width="fill_parent"
    android:layout_height="320dip" 
    android:id="@+id/btnPhoto"
    
    android:text="Take Photo" 
    android:layout_gravity="bottom|left" />
    
    </RelativeLayout>
    

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

Sidebar

Related Questions

Im trying to understand maven profiles and have run into the following issue. This
I've run into a strange Internet Explorer 8 issue. I have the following Javascript:
I have following issue: I'm introducing new feature into application (run as Windows Service)
I have run into an odd casting issue while using generics. The following code
I have run into an issue regarding how to identify which user owns particular
I run into the following issue semi-regularly: I make changes to XAML or some
I am working on a web application and I have run into the following
With several forms of mine, I occasionally run into the following issue: I edit
I am running into the following issue which has really got me stumped: I
I have just recently run into an issue running an asp.net web app under

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.