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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:30:59+00:00 2026-05-23T00:30:59+00:00

I am trying to organize my view with the following view widgets – TextView

  • 0

I am trying to organize my view with the following view widgets –

  • TextView (should fill the width of the screen and has a specific height)
  • Custom View Drawn using Draw() (fill the width and should start after the above textview and fill the screen)

I am trying to write a board game and hence the custom view drawn.

My problem is what is best Layout to use for this?

Can I use a TableLayout and have these two views as one column each? I thought that would do the trick but which ever layout I use for the Custom View just does not fill the screen even though the tablerow I am drawing it in fills the screen.

I hope I was able to explain myself properly. Any pointers are greatly appreciated.

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

        <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/tl_question"
            android:layout_width="fill_parent" 
            android:layout_height="wrap_content" 
            android:shrinkColumns="1"
            android:stretchColumns="2">

            <TableRow>
                <TextView
                    android:id="@+id/question"
                    android:layout_width="wrap_content"
                    android:textSize="30sp"
                    android:textColor="#ffFFFFFF"   
                    android:layout_gravity="center_vertical"
                    android:paddingBottom="9dip"
                    android:layout_marginLeft="3dip"
                    android:layout_marginRight="2dip"/>
            </TableRow>

            <TableRow>
                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:layout_gravity="center_vertical" >
                    <com.ac.gui.CustomView
                        android:id="@+id/custom_board"
                        android:layout_width="fill_parent"
                        android:layout_height="fill_parent"
                        android:keepScreenOn="true" />
                </LinearLayout>
            </TableRow>
        </TableLayout>

</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-23T00:31:00+00:00Added an answer on May 23, 2026 at 12:31 am

    Try using this

    <?xml version="1.0" encoding="utf-8"?>
        <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/root_layout"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
    
    
                <TextView
                    android:id="@+id/question"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:textSize="30sp"
                    android:text="ASDFASDF"
                    android:textColor="#ffFFFFFF"   
                    android:layout_gravity="center_vertical"
                    android:paddingBottom="9dip"
                    android:layout_marginLeft="3dip"
                    android:layout_marginRight="2dip"/>
    
               <com.ac.gui.CustomView
    
                android:layout_below="@+id/question"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent" />
    
    </RelativeLayout>
    

    I tested a different layout in place of yours and it works fine. It should work with yours as well.

    RelativeLayout allows you to position items, well, relative to one another.
    You’ll notice the attribute “layout_below” on your custom view where i specify the ID of the view to place it under.

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

Sidebar

Related Questions

I am trying to organize my theme folder, which has node theming overrides for
I am trying to organize a Zip Archive into an array so that I
I have a bunch of divs I'm trying to organize here. The ones I'm
I have Python nested list that I'm trying to organize and eventually count number
I'm trying to jump through some hoops to organize data in a special way.
I am trying to find some information how to organize permissions for silverlight application
I'm trying to organize my code flexible. So my application makes heavy use of
I'm trying to organize my workspace and want my intermediate objects to be put
I've been kinda stuck in trying to organize data and bind them to a
I'm trying to figure out how to organize many (around 50+) maven2 projects, so

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.