Skip to content

Commit

Permalink
Remove Hardcoding from Xml file
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsbirsingh committed May 14, 2018
1 parent c331e89 commit 3c6bb80
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
41 changes: 21 additions & 20 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
android:inputType="textCapWords"/>
<View
android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_height="@dimen/two"
android:layout_marginTop="@dimen/oneFour"
android:background="#c0c0c0"/>
android:background="@color/white"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -85,9 +85,9 @@
</RadioGroup>
<View
android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_height="@dimen/two"
android:layout_marginTop="@dimen/oneFour"
android:background="#c0c0c0"/>
android:background="@color/white"/>
<!--Second Question-->
<TextView
android:layout_width="wrap_content"
Expand Down Expand Up @@ -140,9 +140,9 @@
</RadioGroup>
<View
android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_height="@dimen/two"
android:layout_marginTop="@dimen/oneFour"
android:background="#c0c0c0"/>
android:background="@color/white"/>
<!--Third Question-->
<TextView
android:layout_width="wrap_content"
Expand Down Expand Up @@ -196,9 +196,9 @@
</RadioGroup>
<View
android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_height="@dimen/two"
android:layout_marginTop="@dimen/oneFour"
android:background="#c0c0c0"/>
android:background="@color/white"/>
<!--Fourth Question-->
<TextView
android:layout_width="wrap_content"
Expand Down Expand Up @@ -251,9 +251,9 @@
</RadioGroup>
<View
android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_height="@dimen/two"
android:layout_marginTop="@dimen/oneFour"
android:background="#c0c0c0"/>
android:background="@color/white"/>
<!--Fifth Question-->
<TextView
android:layout_width="wrap_content"
Expand Down Expand Up @@ -306,9 +306,10 @@
</RadioGroup>
<View
android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_height="@dimen/two"
android:layout_marginTop="@dimen/oneFour"
android:background="#c0c0c0"/>
android:background="@color/white"/>
<!--Sixth Question-->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -364,9 +365,9 @@
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_height="@dimen/two"
android:layout_marginTop="@dimen/oneFour"
android:background="#c0c0c0"/>
android:background="@color/white"/>
<!--Seventh Question-->
<TextView
android:layout_width="wrap_content"
Expand Down Expand Up @@ -419,9 +420,9 @@
</RadioGroup>
<View
android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_height="@dimen/two"
android:layout_marginTop="@dimen/oneFour"
android:background="#c0c0c0"/>
android:background="@color/white"/>
<!--Eight Question-->
<TextView
android:layout_width="wrap_content"
Expand Down Expand Up @@ -474,9 +475,9 @@
</RadioGroup>
<View
android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_height="@dimen/two"
android:layout_marginTop="@dimen/oneFour"
android:background="#c0c0c0"/>
android:background="@color/white"/>
<!--NIne Question-->
<TextView
android:layout_width="wrap_content"
Expand All @@ -498,9 +499,9 @@
android:inputType="textCapWords"/>
<View
android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_height="@dimen/two"
android:layout_marginTop="@dimen/oneFour"
android:background="#c0c0c0"/>
android:background="@color/white"/>
<!--10 Question-->
<TextView
android:layout_width="wrap_content"
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="ol">#FF4003</color>
<color name="white">#c0c0c0</color>

</resources>

0 comments on commit 3c6bb80

Please sign in to comment.