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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:04:47+00:00 2026-06-08T23:04:47+00:00

So I have an xml layout im using and it has two main elements,

  • 0

So I have an xml layout im using and it has two main elements, a framelayout that houses a camera preview, and a imageview. The image view is supposed to be visible over the framelayout and it is until the camerapreview is turned on then it gets pushed behind it. What am i doing wrong?

I’ve done a lot of testing removing elements from the layout and rebuilding and i cant seem to fix the cause of the error, i believe the cause must be somewhere in the code.

  • 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-08T23:04:48+00:00Added an answer on June 8, 2026 at 11:04 pm

    I think is supposed to get push behind it because is a RelativeLayout. I think you should use a LinearLayout. Also the attribute android:layout_weight="1" is an invalid parameter in RelativeLayout.

    You can try and force the image view to align top:

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="390dip" 
        android:layout_marginTop="25dip">        
    
        <ImageView
            android:id="@+id/imageView1"
            android:layout_width="300dip"
            android:layout_height="305dip"
            android:background="#00000000"
            android:layout_alignParentTop="true"
            android:src="@drawable/try_3"
            android:visibility="visible" 
            android:layout_marginLeft="10dip"/>
    
        <FrameLayout
            android:id="@+id/previewframe1"
            android:layout_width="320dip"
            android:layout_height="310dip"
            android:layout_alignParentTop="true"
             >
        </FrameLayout>
    
    </RelativeLayout>
    

    Hope that helps.

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

Sidebar

Related Questions

I have a XML layout which has two edit text fields, one for title
Right I have a main layout defined, that has a frame, a table in
I have a layout that has a listview and imagebutton: <?xml version=1.0 encoding=utf-8?> <RelativeLayout
I have designed the screen using this relative layout. <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android
I have an XML layout that defines a TextView box 50px x 320px who
This is maddening. I have the following XML layout: <FrameLayout android:layout_width=fill_parent android:layout_height=wrap_content android:background=@drawable/shadow android:focusable=true
I have an activity using an xml layout where a WebView is embedded. I
Context: I have a TableLayout (created using XML), which has one TableRow, which has
I have a table row setup using relative layout. It has 2 TextView both
I have an XML layout and want to add my own custom SurfaceView to

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.