Skip to content

Commit

Permalink
Refactored and linted XML files
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Saifullah Khan committed Aug 8, 2018
1 parent f3b5580 commit c63a594
Show file tree
Hide file tree
Showing 16 changed files with 96 additions and 88 deletions.
26 changes: 20 additions & 6 deletions app/src/main/AndroidManifest.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,33 @@
android:supportsRtl="true"
android:theme="@style/AppTheme">

<meta-data android:name="com.google.android.gms.games.APP_ID"
<meta-data
android:name="com.google.android.gms.games.APP_ID"
android:value="@string/app_id" />

<activity android:name=".scenes.LaunchScreen" android:screenOrientation="portrait" >
<activity
android:name=".scenes.LaunchScreen"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".scenes.CounterDrawer" android:screenOrientation="portrait" />
<activity android:name=".scenes.ActiveCounter" android:screenOrientation="portrait" android:parentActivityName=".scenes.CounterDrawer" />
<activity android:name=".scenes.CreateCounter" android:screenOrientation="portrait" android:parentActivityName=".scenes.CounterDrawer" />
</application>

<activity
android:name=".scenes.CounterDrawer"
android:screenOrientation="portrait" />

<activity
android:name=".scenes.ActiveCounter"
android:parentActivityName=".scenes.CounterDrawer"
android:screenOrientation="portrait" />

<activity
android:name=".scenes.CreateCounter"
android:parentActivityName=".scenes.CounterDrawer"
android:screenOrientation="portrait" />

</application>
</manifest>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/list_row.xml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="100dp" />
<solid android:color="@color/colorPrimary" />
<solid android:color="?attr/colorPrimary" />
</shape>
9 changes: 4 additions & 5 deletions app/src/main/res/layout/counter.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,24 @@
android:id="@+id/donut_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="4dp"
custom:donut_finished_color="#000"
custom:donut_finished_color="@color/black"
custom:donut_finished_stroke_width="10dp"
custom:donut_max="33"
custom:donut_progress="15"
custom:donut_text=""
custom:donut_unfinished_color="@android:color/darker_gray"
custom:donut_unfinished_color="@color/gray"
custom:donut_unfinished_stroke_width="10dp" />

<com.github.lzyzsd.circleprogress.CircleProgress
android:id="@+id/circle_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="15dp"
custom:circle_finished_color="@color/colorAccent"
custom:circle_finished_color="?attr/colorAccent"
custom:circle_max="33"
custom:circle_progress="15"
custom:circle_suffix_text=""
custom:circle_unfinished_color="#000" />
custom:circle_unfinished_color="@color/black" />

<TextView
android:id="@+id/finished"
Expand Down
52 changes: 25 additions & 27 deletions app/src/main/res/layout/counter_create.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,69 +4,67 @@
android:id="@+id/add_counter"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="pk.aspirasoft.tasbih.scenes.CreateCounter">
tools:context=".scenes.CreateCounter">

<android.support.v7.widget.Toolbar
android:id="@+id/actionBar"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:background="@color/colorPrimaryDark"
android:elevation="4dp"
android:layout_alignParentTop="true">

</android.support.v7.widget.Toolbar>
android:layout_height="?actionBarSize"
android:layout_alignParentTop="true"
android:background="?attr/colorPrimaryDark"
android:elevation="4dp" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:padding="10dp"
android:layout_below="@+id/actionBar"
android:background="@color/white"
android:orientation="vertical"
android:background="#fff">
android:padding="10dp">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#fff"
android:textColor="#000"
android:text="@string/label_name"
android:background="@color/white"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="5dp"/>
android:paddingTop="5dp"
android:text="@string/label_name"
android:textColor="@color/black" />

<EditText
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:hint="@string/label_name_description"
android:maxLines="1"
android:background="#fff"
android:textColor="#000"
android:textColorHint="#555"
android:inputType="text"
android:padding="5dp"/>
android:maxLines="1"
android:padding="5dp"
android:textColor="@color/black"
android:textColorHint="@color/gray" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#fff"
android:textColor="#000"
android:text="@string/label_memo"
android:background="@color/white"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="15dp"/>
android:paddingTop="15dp"
android:text="@string/label_memo"
android:textColor="@color/black" />

<EditText
android:id="@+id/description"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="@color/white"
android:gravity="top"
android:hint="@string/label_memo_description"
android:inputType="textMultiLine"
android:gravity="top"
android:background="#fff"
android:textColor="#000"
android:textColorHint="#555"
android:padding="5dp"/>
android:padding="5dp"
android:textColor="@color/black"
android:textColorHint="@color/gray" />

</LinearLayout>

Expand Down
12 changes: 5 additions & 7 deletions app/src/main/res/layout/counter_details.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@
xmlns:ads="http://schemas.android.com/apk/res-auto"
xmlns:custom="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_counter_active"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="pk.aspirasoft.tasbih.scenes.ActiveCounter">
tools:context=".scenes.ActiveCounter">

<android.support.v7.widget.Toolbar
android:id="@+id/actionBar"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:layout_height="?actionBarSize"
android:layout_alignParentTop="true"
android:background="@color/colorPrimaryDark"
android:background="?attr/colorPrimaryDark"
android:elevation="4dp">

</android.support.v7.widget.Toolbar>
Expand Down Expand Up @@ -49,7 +48,7 @@
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:text="@string/label_memo"
android:textColor="#000"
android:textColor="@color/black"
android:textStyle="bold" />

<TextView
Expand All @@ -59,7 +58,7 @@
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:text="@string/placeholder_memo"
android:textColor="#000"
android:textColor="@color/black"
android:textStyle="normal" />

</LinearLayout>
Expand Down Expand Up @@ -98,7 +97,6 @@
android:id="@+id/counter"
android:layout_width="250dp"
android:layout_height="250dp"
android:elevation="4dp"
custom:max="33"
custom:progress="0" />

Expand Down
27 changes: 11 additions & 16 deletions app/src/main/res/layout/drawer.xml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"

tools:context="pk.aspirasoft.tasbih.scenes.CounterDrawer">
tools:context=".scenes.CounterDrawer">

<android.support.v7.widget.Toolbar
android:id="@+id/actionBar"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:background="@color/colorPrimaryDark"
android:elevation="4dp"
android:layout_alignParentTop="true">

</android.support.v7.widget.Toolbar>
android:layout_height="?actionBarSize"
android:layout_alignParentTop="true"
android:background="?attr/colorPrimaryDark"
android:elevation="4dp" />

<ScrollView
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/actionBar"
android:layout_above="@id/adView">
android:layout_above="@id/adView"
android:layout_below="@+id/actionBar">

<LinearLayout
android:id="@+id/rootView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

</LinearLayout>
android:orientation="vertical" />

</ScrollView>

Expand All @@ -40,6 +35,6 @@
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
ads:adSize="BANNER"
ads:adUnitId="@string/ad_unit_id"/>
ads:adUnitId="@string/ad_unit_id" />

</RelativeLayout>
</RelativeLayout>
14 changes: 7 additions & 7 deletions app/src/main/res/layout/drawer_grid_cell.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
android:gravity="center"
android:orientation="vertical">

<ImageButton
android:layout_width="75dp"
android:layout_height="75dp"
android:layout_gravity="center"
android:scaleType="centerInside"
android:contentDescription="Thumbnail of the counter." />
android:contentDescription="Thumbnail of the counter."
android:scaleType="centerInside" />

<TextView
android:layout_width="75dp"
android:layout_height="wrap_content"
android:text="Counter Title"
android:textColor="#fff"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:ellipsize="end"/>
android:text="Counter Title"
android:textColor="#fff" />

</LinearLayout>
6 changes: 3 additions & 3 deletions app/src/main/res/layout/drawer_list_item.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
android:gravity="center"
android:maxLines="1"
android:text="@string/label_name"
android:textColor="#000"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold" />

Expand All @@ -31,9 +31,9 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical|end"
android:maxLines="2"
android:maxLines="1"
android:text="0"
android:textColor="#333"
android:textColor="@color/charcoal"
android:textSize="12sp"
android:textStyle="normal" />

Expand Down
6 changes: 2 additions & 4 deletions app/src/main/res/layout/drawer_row.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:orientation="horizontal"
android:weightSum="3"
android:layout_marginBottom="10dp">

</LinearLayout>
android:weightSum="3" />
14 changes: 8 additions & 6 deletions app/src/main/res/menu/counter.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">

<item android:id="@+id/reset"
android:title="@string/hint_reset"
<item
android:id="@+id/reset"
android:icon="@drawable/ic_action_reset"
app:showAsAction="ifRoom"/>
android:title="@string/hint_reset"
app:showAsAction="ifRoom" />

<item android:id="@+id/remove"
android:title="@string/hint_delete"
<item
android:id="@+id/remove"
android:icon="@android:drawable/ic_menu_delete"
app:showAsAction="ifRoom"/>
android:title="@string/hint_delete"
app:showAsAction="ifRoom" />
</menu>
5 changes: 3 additions & 2 deletions app/src/main/res/menu/create_counter.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">

<item android:id="@+id/add"
<item
android:id="@+id/add"
android:title="@string/label_add"
app:showAsAction="always"/>
app:showAsAction="always" />

</menu>
Empty file modified app/src/main/res/menu/home.xml
100644 → 100755
Empty file.
Empty file modified app/src/main/res/values/attrs.xml
100644 → 100755
Empty file.
11 changes: 7 additions & 4 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#C18D19</color>
<color name="colorPrimaryDark">#db3c15</color>
<color name="colorAccent">#12A3C9</color>
<color name="colorPrimary">#ff6d00</color>
<color name="colorPrimaryDark">#bf360c</color>
<color name="colorAccent">#00acc1</color>
<color name="black">#000000</color>
<color name="charcoal">#263238</color>
<color name="gray">#9e9e9e</color>
<color name="white">#FFFFFF</color>
</resources>
</resources>
Empty file modified app/src/main/res/values/integers.xml
100644 → 100755
Empty file.
Empty file modified app/src/main/res/values/styles.xml
100644 → 100755
Empty file.

0 comments on commit c63a594

Please sign in to comment.