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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:04:00+00:00 2026-05-16T10:04:00+00:00

I have a horizontal LinearLayout. This LinearLayout has a checkbox next to another LinearLayout.

  • 0

I have a horizontal LinearLayout. This LinearLayout has a checkbox next to another LinearLayout. The layout width/height of the checkbox is wrap_content, whereas the inner LinearLayout is fill_parent/wrap_content. The layout_weight of the inner LinearLayout is set to 1.

I’ve tried to add some android:padding around the checkbox to give some space around it, but no padding is given. I’ve also tried android:paddingLeft/Right/etc. How do I get some padding around my checkbox?

Note: I have an inner LinearLayout because I will be adding more TextViews

<?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="?android:attr/listPreferredItemHeight">
    <CheckBox
        android:id="@+id/mycheck"
        android:text=""
        android:layout_width="30dip"
        android:layout_height="wrap_content"
        android:gravity="center_vertical"
        android:focusable="false"
        android:background="@drawable/checkbox_background"
        android:button="@drawable/checkbox"
    />
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_weight="1"
        android:layout_height="wrap_content">
        <TextView
            android:id="@+id/mytext"
            android:layout_width="fill_parent"
            android:layout_weight="1"
            android:gravity="center_vertical"
            android:layout_height="wrap_content"
            android:lines="1"
            android:textColor="@color/white"
            android:textSize="10sp"
            android:textStyle="italic"
        />
    </LinearLayout>
</LinearLayout>
  • 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-16T10:04:00+00:00Added an answer on May 16, 2026 at 10:04 am

    Try setting layout_marginLeft property of the second layout

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

Sidebar

Related Questions

I have this layout: <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:orientation=horizontal android:layout_width=fill_parent android:layout_height=fill_parent android:background=#222222 android:gravity=center_horizontal android:layout_gravity=center_horizontal android:paddingBottom=5dp> <SeekBar
I have this as part of my layout: <LinearLayout android:layout_width=fill_parent android:layout_height=0dip android:orientation=horizontal android:layout_weight=0.15> <TextView
this is the layout i have: <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=match_parent android:layout_height=match_parent android:orientation=horizontal android:minHeight=?android:attr/listPreferredItemHeight> <LinearLayout android:orientation=vertical
I have a main activity with this layout file: <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android
I have a horizontal linear layout with four image buttons. Each image button has
I have a fragment embedded in a layout. This fragment has a very simple
This has puzzled me for two days now. I have a LinearLayout like the
I want that button(child) will have 25% of full width of horizontal LinearLayout (its
I have a horizontal menu on a page like this <link rel=stylesheet type=text/css href=/classified/siteassets/css/mymenu.css
I have a horizontal animated menu that has a strange behavior because it works

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.