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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:15:26+00:00 2026-06-19T00:15:26+00:00

Just a small issue with my layout that I have when running my app

  • 0

Just a small issue with my layout that I have when running my app on a smaller device such as a phone, on a tablet it renders fine. One of the buttons seems to be being ‘squeezed’ by the others and is rendered vertically.

Heres a screenshot of the problem area

enter image description here

my xml is as follows.

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

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_margin="8dp"
        android:orientation="vertical" >

        <ImageView
            android:id="@+id/imageView1"
            android:layout_width="78dp"
            android:layout_height="78dp"
            android:layout_alignParentTop="true" />

        <TextView
            android:id="@+id/txtEventNameTitle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Event Name"
            android:textSize="19dp"
            android:textStyle="bold"
            android:layout_below="@+id/imageView1" />

        <TextView
            android:id="@+id/txtEventName"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="16dp"
            android:layout_below="@+id/txtEventNameTitle" />

        <TextView
            android:id="@+id/txtEventDateTitle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Event Date"
            android:textSize="19dp"
            android:textStyle="bold" />

        <TextView
            android:id="@+id/txtEventDate"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="16dp" />

        <TextView
            android:id="@+id/txtEventTimeTitle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Event Time"
            android:textSize="19dp"
            android:textStyle="bold" />

        <TextView
            android:id="@+id/txtEventTime"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="16dp" />

        <TextView
            android:id="@+id/txtEventLocationTitle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Event Location"
            android:textSize="19dp"
            android:textStyle="bold" />

        <TextView
            android:id="@+id/txtEventLocation"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="16dp" />

        <TextView
            android:id="@+id/txtEventDetailsTitle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Event Details"
            android:textSize="19dp"
            android:textStyle="bold" />

        <TextView
            android:id="@+id/txtEventDetails"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="16dp" />

  <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:measureWithLargestChild="true"
        android:orientation="horizontal"
        >

     <Button
            android:id="@+id/btnAddToCal"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
                        android:layout_marginBottom="20dp"

            android:text="Add to Calendar" 
            android:layout_weight="1"/>

        <Button
            android:id="@+id/btnAddToMyEvents"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Add to my Events"
            android:layout_marginTop="20dp"

            android:layout_weight="1"
            android:layout_toRightOf="@+id/btnAddToCal"

            />

        <Button
            android:id="@+id/btnSendToTwitter"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Share"
            android:layout_marginTop="20dp"            
            android:layout_weight="1"
            android:minWidth="40dp"

            />
         <Button
            android:id="@+id/btnSendToMaps"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Get directions" 
                        android:layout_marginTop="20dp"

            android:layout_weight="1"
            android:layout_toRightOf="@+id/btnAddToMyEvents"

         />


   </LinearLayout>    

        <fragment
            android:id="@+id/map"
            android:layout_width="fill_parent"
            android:layout_height="300dp"
            class="com.google.android.gms.maps.SupportMapFragment"
            android:layout_marginBottom="10dp"
             />
    </LinearLayout>

</ScrollView>
  • 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-19T00:15:27+00:00Added an answer on June 19, 2026 at 12:15 am

    Change your code as below. You are not setting the weightSum as well as you are setting wrap_content to your buttons which is the problem making your buttons displaying in wrong way.

    <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:measureWithLargestChild="true"
            android:orientation="horizontal"
            android:weightSum="4">
     <Button
            android:id="@+id/btnAddToCal"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
                        android:layout_marginBottom="20dp"
    
            android:text="Add to Calendar" 
            android:layout_weight="1"/>
    
        <Button
            android:id="@+id/btnAddToMyEvents"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="Add to my Events"
            android:layout_marginTop="20dp"
    
            android:layout_weight="1"
            android:layout_toRightOf="@+id/btnAddToCal"
    
            />
    
        <Button
            android:id="@+id/btnSendToTwitter"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="Share"
            android:layout_marginTop="20dp"            
            android:layout_weight="1"
            android:minWidth="40dp"
    
            />
         <Button
            android:id="@+id/btnSendToMaps"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="Get directions" 
                        android:layout_marginTop="20dp"
    
            android:layout_weight="1"
            android:layout_toRightOf="@+id/btnAddToMyEvents"
    
         />
    </LinearLayout>   
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am just new to programming in Unix and have a small issue that
I have just written a small piece of code and it struck me that
I just started to using sass/scss and i have a small issue. Let's assume
I´ve just started using ASIHTTPRequest for iOs and I have a small issue with
Just a small question regarding joins. I have a table with around 30 fields
I'm learning JavaFX and this is just a small programming question. I have 3
I am making a small calculator (just for JavaScript learning) and I have two
I have written a small program just like hello the world , everything was
I've come across a small issue that I've been chewing on for a day
I have a small issue when I run into while using arraylists in Java.

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.