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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:03:22+00:00 2026-05-27T09:03:22+00:00

I’ve got the following xml file: <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/linearLayout1 android:background=@android:color/transparent android:layout_marginTop=0px

  • 0

I’ve got the following xml file:

  <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/linearLayout1"
    android:background="@android:color/transparent"
    android:layout_marginTop="0px"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:weightSum="1"
    android:orientation="horizontal">
      <Button android:id="@+id/info"   android:text="Info" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom"></Button>
      <Button android:id="@+id/town"   android:text="Town" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom"></Button>
      <Button android:id="@+id/unit"   android:text="Unit" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom"></Button>
      <Button android:layout_height="wrap_content" android:text="EndTurn" android:id="@+id/endturn" android:layout_width="wrap_content" android:layout_gravity="bottom"></Button>
  </LinearLayout>

which provides the following result: http://i42.tinypic.com/otdkb4.png

Now I’ve got some questions about this:

  1. The top and bottom padding, how to get rid of it?
    I tried RelativeLayout, multiple layouts within each other, padding, margin, changing height nothing seem to affect it in any way.

  2. Is there a way to get the layout transparent? android:background seems to be the wrong one.

  3. Between the third and the fifth button is a bit more space (where the fourth button should be). I catch it the in the program and set it to invisible.

    unitButton.setVisibility(INVISIBLE);
    unitButton.setWidth(0);

Now the space between the two buttons is more than double of the normal range (between 1 and 2) Any idea on this? – Altough this is a minor problem

Thanks in advance.

  • 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-27T09:03:23+00:00Added an answer on May 27, 2026 at 9:03 am

    1: Is the layout presented in a Dialog? If so, that’ll give you some headaches. To get more control you should either create your own custom Dialog extension (as some dialog layout values are hardcoded), or display your layout in another way (a new activity on top, or using a framelayout perhaps)?

    2: To get a layout transparent, simply don’t give it a background-attribute. (Though, if you really are using a dialog, the dialog box is not transparent, and it is that which you see. You can also set it to be transparent by setting background to “#00000000” (which is what you do).

    3: A View with visibility as “invisible” is still measured, that means both its width/height as well as its margins and padding is displayed as empty space in your layout. Setting the visibility to “gone” instead will not measure it, and you won’t need the setWidth(0) either. (You can still display it later by setting it back to “visible”)

    Edit: removing the unused “weightSum” attribute might also be a good idea, as the view is now expecting its children to have a total weight of something other than 0.

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

Sidebar

Related Questions

We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm parsing an XML file, the creators of it stuck in a bunch social
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
i want to parse a xhtml file and display in UITableView. what is the
i got an object with contents of html markup in it, for example: string

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.