This is what i am trying to achieve But this is what i get when uploaded on phone.
It seems ok in android studio fragment design preview but when uploaded on phone checkboxes are not displayed :(.
Any better solutions?
Below is full xml code.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
xmlns:tools="http://ift.tt/LrGmb4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="false"
tools:context=".MainFragment">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoText="false"
android:text="@string/getnotif"
android:layout_below="@+id/linearLayout5"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp" />
<CheckBox
android:id="@+id/checkBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/textView"
android:layout_alignStart="@+id/textView"
android:layout_below="@+id/textView"
android:text="@string/mcall"
android:textSize="12sp" />
<CheckBox
android:id="@+id/checkBox2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textView"
android:layout_toEndOf="@+id/checkBox"
android:layout_toRightOf="@+id/checkBox"
android:text="@string/msms"
android:textSize="12sp" />
<Button
android:id="@+id/timePicker"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="00:00"
android:background="#3f51b5"
android:layout_alignTop="@+id/timePicker2"
android:layout_marginLeft="25dp"
android:layout_alignParentStart="true"
android:textColor="#ffffff" />
<Button
android:id="@+id/timePicker2"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="23:59"
android:background="#3f51b5"
android:layout_below="@+id/linearLayout4"
android:layout_alignParentLeft="false"
android:layout_alignParentStart="false"
android:layout_alignParentEnd="false"
android:layout_marginRight="25dp"
android:layout_alignParentRight="true"
android:textColor="#ffffff" />
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/timePicker"
android:layout_marginTop="20dp"
android:orientation="horizontal"
android:layout_alignParentEnd="true">
<TextView
android:id="@+id/textView8"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="0dp"
android:text="Days"
android:gravity="center" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/linearLayout"
android:orientation="horizontal"
android:layout_alignRight="@+id/linearLayout"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentEnd="true"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp">
<CheckBox
android:id="@+id/checkBox3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="false"
android:checked="false"
android:layout_weight="1"
android:text="@string/monday"
android:paddingLeft="-27dp"
android:paddingTop="40dp"
android:textSize="10dp" />
<CheckBox
android:id="@+id/checkBox4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="false"
android:layout_weight="1"
android:text="@string/tuesday"
android:paddingLeft="-26dp"
android:paddingTop="40dp"
android:textSize="10dp" />
<CheckBox
android:id="@+id/checkBox5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="false"
android:layout_weight="1"
android:text="@string/wednesday"
android:paddingLeft="-27dp"
android:paddingTop="40dp"
android:textSize="10dp" />
<CheckBox
android:id="@+id/checkBox6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="false"
android:layout_weight="1"
android:text="@string/thursday"
android:paddingLeft="-27dp"
android:paddingTop="40dp"
android:textSize="10dp" />
<CheckBox
android:id="@+id/checkBox7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="false"
android:layout_weight="1"
android:text="@string/friday"
android:paddingLeft="-24dp"
android:paddingTop="40dp"
android:textSize="10dp" />
<CheckBox
android:id="@+id/checkBox8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="false"
android:checked="false"
android:layout_weight="1"
android:text="@string/saturday"
android:paddingLeft="-25dp"
android:paddingTop="40dp"
android:textSize="10dp" />
<CheckBox
android:id="@+id/checkBox9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="false"
android:checked="false"
android:text="@string/sunday"
android:paddingLeft="-27dp"
android:paddingTop="40dp"
android:textSize="10dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:orientation="horizontal">
<Button
android:id="@+id/exitButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@drawable/button_state"
android:text="Exit"
android:layout_weight="0.5"
android:layout_marginRight="16dp"
android:textColor="#ffffff" />
<Button
android:id="@+id/saveButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@drawable/button_state"
android:text="Save"
android:layout_weight="0.5"
android:layout_marginLeft="16dp"
android:textColor="#ffffff" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="false"
android:layout_marginTop="20dp"
android:id="@+id/linearLayout4"
android:layout_alignParentEnd="false">
<TextView
android:id="@+id/textView7"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="@string/from"
android:layout_below="@+id/textView5"
android:layout_alignParentLeft="false"
android:layout_alignParentStart="false"
android:gravity="center"
android:layout_marginTop="20dp"
android:layout_marginLeft="25dp" />
<TextView
android:id="@+id/textView23"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="0dp"
android:text="Time"
android:gravity="center"
android:layout_weight="1" />
<TextView
android:id="@+id/textView6"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="@string/to"
android:layout_below="@+id/textView5"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:gravity="center"
android:layout_marginTop="20dp"
android:layout_marginRight="25dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout5"
android:layout_width="fill_parent"
android:layout_height="60dp"
android:orientation="horizontal"
android:layout_below="@+id/linearLayout2"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
</LinearLayout>
</RelativeLayout>
Aucun commentaire:
Enregistrer un commentaire