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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:59:25+00:00 2026-05-15T16:59:25+00:00

I need to have a video preview(on a Surface) and a TextView and a

  • 0

I need to have a video preview(on a Surface) and a TextView and a few buttons(at the bottom of the screen)

Currently, my preview’s height is large but it’s narrow and at the far left at the screen and the TextView is not visible.

The buttons are placed at the bottom as I require.

How do I make the preview’s width large as well and the TextView visible?

Here is my layout:

 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<TextView  
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:text="Android Recorder"
/>
<SurfaceView android:id="@+id/camsurface"       
 android:layout_width="fill_parent" 
 android:layout_height="0px"
 android:layout_weight="1" />

 <TextView  
 android:id="@+id/recording_time"
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:text=" 00:00"
/>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>

<Button android:id="@+id/btn_settings" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:text="Settings"/>

 <Button android:id="@+id/btn_record" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:text="Record" /> 

  • 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-15T16:59:25+00:00Added an answer on May 15, 2026 at 4:59 pm

    Your “preview is very small” is very small because you have it set for 140px square, hard-wired in your layout.

    Either take advantage of android:layout_weight with LinearLayout, or use RelativeLayout, to make your SurfaceView take as much space as is available.

    For example, here is a layout with a Button at the bottom and a WebView filling up all remaining space:

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        >
        <WebView android:id="@+id/webkit"
            android:layout_width="fill_parent" 
            android:layout_height="0px"
            android:layout_weight="1"
        />
        <Button android:id="@+id/helpcast"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="View Helpcast"
        />
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a YouTube's player in the webpage. I need to change the video
Using asp.net, I need to generate a snapshot of an youtube video. I have
I have a few models that need to have custom find conditions placed on
i have a input tag which is non editable, but some times i need
We have need for a rating system in a project we are working on,
I have need to select a number of 'master' rows from a table, also
I need to have a summary field in each page of the report and
I need to have a thread signal another if the user wishes to interrupt
I need to have a script read the files coming in and check information
I need to have a working web browser in a fullscreen Direct3D application. For

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.