vendredi 22 mai 2015

android Checkbox is not visible

I am creating four settings options with check boxes. I am using black background. I set true on check boxes in both java and xml. But still checkboxes are not visible. Here is my xml code:

<FrameLayout xmlns:android="http://ift.tt/nIICcg"
    xmlns:tools="http://ift.tt/LrGmb4" android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#000000"
    tools:context="com.example.angstle.sipdemo.ChangeSettings">
<FrameLayout
    android:layout_width="match_parent"
    android:layout_height="70dp"
    android:background="#000000">
  <TextView
      android:layout_width="wrap_content"
      android:layout_height="match_parent"
      android:gravity="center_vertical"
      android:paddingLeft="10dp"
      android:layout_gravity="left"
      android:text="Always Available"
      android:textSize="20sp"
      />
  <CheckBox
      android:layout_height="30dp"
      android:layout_width="30dp"
      android:layout_gravity="center_vertical|end"
      android:id="@+id/chk_avail_all" />
      </FrameLayout>
    <LinearLayout
        android:layout_height="1dp"
        android:layout_width="match_parent"
        android:background="#2a2a2a"
        android:layout_marginTop="70dp"/>
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="70dp"
        android:background="#000000"
        android:layout_marginTop="71dp">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:gravity="center_vertical|start"
            android:paddingLeft="10dp"
            android:layout_gravity="left"
            android:text="Available on wifi "
            android:textSize="20sp"
             />
        <CheckBox
            android:layout_height="30dp"
            android:layout_width="30dp"
            android:layout_gravity="center_vertical|end"
            android:id="@+id/chk_wifi_avail"
            android:checked="true"/>
    </FrameLayout>
    <LinearLayout
        android:layout_height="1dp"
        android:layout_width="match_parent"
        android:background="#2a2a2a"
        android:layout_marginTop="141dp"/>
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="70dp"
        android:background="#000000"
        android:layout_marginTop="142dp">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:gravity="center_vertical"
            android:paddingLeft="10dp"
            android:layout_gravity="left"

            android:text="Availble on mobile data"
            android:textSize="20sp"
           />
        <CheckBox
            android:layout_height="30dp"
            android:layout_width="30dp"
            android:layout_gravity="center_vertical|end"
            android:checked="true"
            android:id="@+id/chk_avail_mobile_data"/>
    </FrameLayout>
    <LinearLayout
        android:layout_height="1dp"
        android:layout_width="match_parent"
        android:background="#2a2a2a"
        android:layout_marginTop="212dp"/>
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="70dp"
        android:background="#000000"
        android:layout_marginTop="213dp">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:gravity="center_vertical"
            android:paddingLeft="10dp"
            android:layout_gravity="left"
            android:text="Available for outgoing only"
            android:textSize="20sp"
             />
        <CheckBox
            android:layout_height="30dp"
            android:layout_width="30dp"
            android:layout_gravity="center_vertical|end"
            android:id="@+id/chk_avail_out_only"
            />
    </FrameLayout>
    <LinearLayout
        android:layout_height="1dp"
        android:layout_width="match_parent"
        android:background="#2a2a2a"
        android:layout_marginTop="283dp"/>
</FrameLayout>

My question is, What I did wrong in this code? Why these checkboxes are not visible?

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire