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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:57:38+00:00 2026-05-23T11:57:38+00:00

I wrote this XML code; <TableLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=20 > <TableRow android:layout_height=fill_parent android:layout_weight=10

  • 0

I wrote this XML code;

<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" 
android:layout_height="fill_parent"
android:layout_weight="20" 
>
<TableRow 
    android:layout_height="fill_parent"
    android:layout_weight="10" 
    android:layout_width="fill_parent">`enter code here`</TableRow>
<TableRow 
    android:layout_height="fill_parent"
    android:layout_width="fill_parent" 
    android:layout_weight="9">
    <Gallery 
    android:layout_height="fill_parent" 
    android:id="@+id/gallery"
    android:layout_width="fill_parent"
    android:layout_weight="1">
    </Gallery>
</TableRow>
<TableRow 
    android:orientation="vertical" 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_weight="1"
    > 
    <Button 
        android:id="@+id/Button1" 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        android:gravity="center"
        android:layout_weight="1"
        >
    </Button>
    <Button 
        android:id="@+id/Button2" 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        android:gravity="center"
        android:layout_weight="1">
    </Button>
    <Button 
        android:id="@+id/Button3" 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        android:gravity="center"
        android:layout_weight="1">
    </Button>
    <Button 
        android:id="@+id/Button4" 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        android:gravity="center"
        android:layout_weight="1">
    </Button>
</TableRow>

This code is shown like I want however when I run the code buttons size are changing with images size in gallery.How can I write the XML code independent from each other(gallery and buttons).
Thanks for Help

  • 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-23T11:57:39+00:00Added an answer on May 23, 2026 at 11:57 am

    I would recommend that you use 2 LinearLayouts, A vertical LinearLayout to hold the Gallery and a horizontal LinearLayout, which in turn contains the various buttons.

    Code:

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"
    android:orientation="vertical">
        <Gallery 
            android:layout_height="fill_parent" 
            android:id="@+id/gallery"
            android:layout_width="fill_parent"
            android:layout_weight="1">
        </Gallery>
        <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
            <Button 
                android:id="@+id/Button1" 
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" 
                android:gravity="center"
                android:layout_weight="1">
            </Button>
            <Button 
                android:id="@+id/Button2" 
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" 
                android:gravity="center"
                android:layout_weight="1">
            </Button>
            <Button 
                android:id="@+id/Button3" 
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" 
                android:gravity="center"
                android:layout_weight="1">
            </Button>
            <Button 
                android:id="@+id/Button4" 
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" 
                android:gravity="center"
                android:layout_weight="1">
            </Button>
        </LinearLayout>
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the xml code: <feed xml:base=https://test.net/ xmlns:d=http://schemas.microsoft.com/ado/2007/08/dataservices xmlns:m=http://schemas.microsoft.com/ado/2007/08/dataservices/metadata xmlns=http://www.w3.org/2005/Atom> <title type=text>CustomTable5</title> <id>https://eqmetest.table.core.windows.net/CustomTable5</id> <updated>2011-11-15T11:36:32Z</updated>
In my xml i have an edittext element like this <EditText android:id=@+id/hrvalue android:layout_width=wrap_content android:layout_height=wrap_content
I wrote this snippet of code and I assume len is tail-recursive, but a
I wrote this code I have these errors Cannot implicitly convert type x.Program.TreeNode' to
I wrote this tiny code: #include <stdio.h> int main() { size_t temp; temp =
I have one piece of Cocoa code I wrote that takes in an XML
I'm trying to write some xml by this piece of code docs = XmlReportGenerator()
I'm trying to write some xml by this piece of code docs = XmlReportGenerator()
In Oracle, you can write: update t set xml = updateXML(xml, '/a/b/text()', 'gaga') This
I wrote this function that's supposed to do StringPadRight("Hello", 10, "0") -> "Hello00000" .

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.