w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
CheckBox appear as larger than its normal size
   <?xml version="1.0" encoding="utf-8"?>                 
                               
    <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:layout_margin="20dip"
    android:background="@android:color/transparent"
    android:gravity="center"
    android:orientation="vertical" >

 <LinearLayout
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:background="@drawable/rounded_bg_provide_shadow"
 android:padding="@dimen/padding_small" >

 <LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@drawable/dialog_back_gradient"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/textView1_hiddenactivity"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:paddingLeft="10dip"
        android:paddingRight="10dip"
        android:paddingTop="10dip"
        android:text="You have disabled Mobile Data in the settings.An app
is trying to use it.Do you want to allow?"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textColor="#40342c" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#000000"
        android:orientation="vertical"
        android:padding="10dip" >

        <CheckBox
            android:id="@+id/checkBox1"
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:background="#ffffff"
            android:clickable="false"
            android:text="Ashis Sharma " />
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="5dip" >

        <TextView
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="1.0" />

        <Button
            android:id="@+id/enable_data_yes"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/small_ok_selector" />

        <Button
            android:id="@+id/enable_data_no"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="10dip"
            android:background="@drawable/small_cancel_selector" />

        <TextView
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="1.0" />
    </LinearLayout>
    </LinearLayout>
    </LinearLayout>

Try this in check box give your size manually..





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.