OmniGears: beautify system activities

Change-Id: I2e21521671782aa017148bc4598477d55428a8ce
diff --git a/res/layout/doze_item.xml b/res/layout/doze_item.xml
index beb4d68..d37766d 100644
--- a/res/layout/doze_item.xml
+++ b/res/layout/doze_item.xml
@@ -39,7 +39,8 @@
             android:layout_height="wrap_content"
             android:layout_toRightOf="@id/idle_config_image"
             android:paddingLeft="5dp"
-            android:layout_centerVertical="true" />
+            android:layout_centerVertical="true"
+            android:textColor="?android:attr/textColorPrimary" />
 
         <EditText
             android:id="@+id/idle_config_edit"
diff --git a/res/layout/spinner_item.xml b/res/layout/spinner_item.xml
index 4416361..ee562fd 100644
--- a/res/layout/spinner_item.xml
+++ b/res/layout/spinner_item.xml
@@ -22,6 +22,8 @@
     android:layout_height="wrap_content"
     android:maxLines="1"
     android:ellipsize="marquee"
-    android:gravity="center_vertical" >
-
+    android:gravity="center_vertical"
+    android:textColor="@color/system_activity_header_text"
+    android:textSize="16sp"
+    android:background="?android:attr/colorPrimary" >
 </TextView>
diff --git a/res/layout/state_row_header.xml b/res/layout/state_row_header.xml
index 247db18..ed390e1 100644
--- a/res/layout/state_row_header.xml
+++ b/res/layout/state_row_header.xml
@@ -26,5 +26,5 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_marginRight="5dp"
-        android:textSize="17sp" />
-</LinearLayout>
\ No newline at end of file
+        android:textColor="?android:attr/textColorPrimary"/>
+</LinearLayout>
diff --git a/res/layout/state_row_line.xml b/res/layout/state_row_line.xml
index 6109aa2..30214e6 100644
--- a/res/layout/state_row_line.xml
+++ b/res/layout/state_row_line.xml
@@ -20,13 +20,15 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="horizontal" >
+    android:orientation="horizontal"
+    android:paddingBottom="5dp" >
     <TextView
         android:id="@+id/ui_cpu_text"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
         android:layout_gravity="center_vertical|start"
-        android:layout_marginRight="10dp" />
+        android:layout_marginRight="10dp"
+        android:textColor="?android:attr/textColorPrimary" />
     <ProgressBar
         android:id="@+id/ui_bar"
         style="?android:attr/progressBarStyleHorizontal"
@@ -41,10 +43,12 @@
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
         android:layout_gravity="center_vertical"
-        android:layout_marginRight="10dp" />
+        android:layout_marginRight="10dp"
+        android:textColor="?android:attr/textColorPrimary" />
     <TextView
         android:id="@+id/ui_percentage_text"
         android:layout_width="35dp"
         android:layout_height="match_parent"
+        android:textColor="?android:attr/textColorPrimary"
         android:layout_gravity="center_vertical|end" />
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/res/layout/time_in_state.xml b/res/layout/time_in_state.xml
index 0711970..a06cdff 100644
--- a/res/layout/time_in_state.xml
+++ b/res/layout/time_in_state.xml
@@ -20,63 +20,77 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:orientation="vertical"
-    android:paddingStart="10dp"
-    android:paddingEnd="10dp" >
+    android:orientation="vertical" >
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:orientation="horizontal"
-        android:paddingTop="10dp" >
+        android:paddingTop="10dp"
+        android:paddingStart="20dp"
+        android:paddingEnd="10dp"
+        android:background="?android:attr/colorPrimary" >
         <TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_vertical"
-            android:text="@string/spinner_period_title" />
+            android:text="@string/spinner_period_title"
+            android:textColor="@color/system_activity_header_text"
+            android:textSize="16sp" />
         <Spinner
             android:id="@+id/period_type_select"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:gravity="center_vertical" />
+            android:gravity="center_vertical"
+            android:backgroundTint="@color/system_activity_header_text" />
     </LinearLayout>
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:orientation="horizontal"
-        android:paddingBottom="10dp"
         android:paddingTop="10dp"
-        android:paddingEnd="10dp" >
+        android:paddingBottom="10dp"
+        android:paddingStart="20dp"
+        android:paddingEnd="10dp"
+        android:background="?android:attr/colorPrimary" >
         <TextView
             android:id="@+id/ui_total_state_time"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
             android:layout_gravity="center_vertical"
-            android:layout_weight="1" />
+            android:layout_weight="1"
+            android:textColor="@color/system_activity_header_text"
+            android:textSize="16sp" />
         <CheckBox
             android:id="@+id/ui_core_switch"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_vertical"
-            android:text="@string/state_core_mode" />
+            android:text="@string/state_core_mode"
+            android:textColor="@color/system_activity_header_text"
+            android:buttonTint="@color/system_activity_header_text"/>
         <CheckBox
             android:id="@+id/ui_mode_switch"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_vertical"
-            android:text="@string/state_time_mode" />
+            android:text="@string/state_time_mode"
+            android:textColor="@color/system_activity_header_text"
+            android:buttonTint="@color/system_activity_header_text"/>
     </LinearLayout>
 
     <ScrollView
         android:layout_width="match_parent"
         android:layout_height="0dp"
         android:orientation="vertical"
-        android:paddingTop="10dp"
+        android:paddingStart="20dp"
+        android:paddingEnd="10dp"
         android:scrollbarStyle="insideInset"
         android:layout_weight="1" >
         <FrameLayout
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:paddingBottom="10dp" >
+            android:paddingBottom="10dp"
+            android:paddingTop="10dp" >
             <LinearLayout
                 android:id="@+id/ui_states_view"
                 android:layout_width="match_parent"
@@ -89,7 +103,7 @@
                 android:gravity="center"
                 android:text="@string/no_states_file_found"
                 android:visibility="gone"
-                android:textAppearance="?android:attr/textAppearanceSmall" />
+                android:textColor="?android:attr/textColorPrimary" />
             <LinearLayout
                 android:id="@+id/ui_progress"
                 android:layout_width="match_parent"
diff --git a/res/layout/time_row.xml b/res/layout/time_row.xml
index 781ac41..b8c6304 100644
--- a/res/layout/time_row.xml
+++ b/res/layout/time_row.xml
@@ -25,7 +25,8 @@
     <TextView
         android:id="@+id/ui_text"
         android:layout_width="wrap_content"
-        android:layout_height="match_parent" />
+        android:layout_height="match_parent"
+        android:textColor="?android:attr/textColorPrimary" />
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
@@ -44,11 +45,13 @@
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
             android:layout_gravity="center_vertical"
-            android:layout_marginRight="10dp" />
+            android:layout_marginRight="10dp"
+            android:textColor="?android:attr/textColorPrimary" />
         <TextView
             android:id="@+id/ui_percentage_text"
             android:layout_width="35dp"
             android:layout_height="match_parent"
-            android:layout_gravity="center_vertical|end" />
+            android:layout_gravity="center_vertical|end"
+            android:textColor="?android:attr/textColorPrimary"/>
     </LinearLayout>
 </LinearLayout>
diff --git a/res/layout/wakelock_app_row.xml b/res/layout/wakelock_app_row.xml
index a604918..3a73ff7 100644
--- a/res/layout/wakelock_app_row.xml
+++ b/res/layout/wakelock_app_row.xml
@@ -36,7 +36,7 @@
 
     <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
+        android:layout_height="match_parent"
         android:orientation="vertical"
         android:gravity="center_vertical" >
         <LinearLayout
@@ -46,33 +46,34 @@
             <TextView
                 android:id="@+id/ui_text"
                 android:layout_width="0dp"
-                android:layout_height="match_parent"
+                android:layout_height="wrap_content"
                 android:gravity="center_vertical"
                 android:layout_weight="1"
                 android:scrollHorizontally="true"
                 android:ellipsize="end"
                 android:maxLines="1"
-                android:textAppearance="?android:attr/textAppearanceMedium" />
+                android:textColor="?android:attr/textColorPrimary" />
             <TextView
                 android:id="@+id/ui_duration_text"
                 android:layout_width="wrap_content"
-                android:layout_height="match_parent"
+                android:layout_height="wrap_content"
                 android:gravity="center_vertical"
-                android:textAppearance="?android:attr/textAppearanceMedium" />
+                android:textColor="?android:attr/textColorPrimary" />
             <TextView
                 android:id="@+id/ui_percentage_text"
                 android:layout_width="40dp"
-                android:layout_height="match_parent"
+                android:layout_height="wrap_content"
                 android:gravity="center_vertical|end"
-                android:textAppearance="?android:attr/textAppearanceMedium" />
+                android:textColor="?android:attr/textColorPrimary" />
         </LinearLayout>
         <TextView
             android:id="@+id/ui_more_text"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
+            android:layout_height="wrap_content"
             android:scrollHorizontally="true"
             android:ellipsize="end"
             android:maxLines="1"
-            android:visibility="gone" />
+            android:visibility="gone"
+            android:textColor="?android:attr/textColorPrimary" />
     </LinearLayout>
 </LinearLayout>
diff --git a/res/layout/wakelock_row.xml b/res/layout/wakelock_row.xml
index b11bc98..d1211b6 100644
--- a/res/layout/wakelock_row.xml
+++ b/res/layout/wakelock_row.xml
@@ -36,12 +36,14 @@
             android:scrollHorizontally="true"
             android:ellipsize="end"
             android:maxLines="2"
-            android:layout_weight="1" />
+            android:layout_weight="1"
+            android:textColor="?android:attr/textColorPrimary" />
         <TextView
             android:id="@+id/ui_count_text"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
-            android:layout_gravity="center_vertical|end" />
+            android:layout_gravity="center_vertical|end"
+            android:textColor="?android:attr/textColorPrimary" />
     </LinearLayout>
     <TextView
         android:id="@+id/ui_more_text"
@@ -50,7 +52,8 @@
         android:scrollHorizontally="true"
         android:ellipsize="end"
         android:maxLines="1"
-        android:visibility="gone" />
+        android:visibility="gone"
+        android:textColor="?android:attr/textColorPrimary" />
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
@@ -68,12 +71,14 @@
             android:id="@+id/ui_duration_text"
             android:layout_width="wrap_content"
             android:layout_height="match_parent"
-            android:layout_gravity="center_vertical" />
+            android:layout_gravity="center_vertical"
+            android:textColor="?android:attr/textColorPrimary" />
         <TextView
             android:id="@+id/ui_percentage_text"
             android:layout_width="35dp"
             android:layout_height="match_parent"
             android:layout_gravity="center_vertical|end"
-            android:gravity="end" />
+            android:gravity="end"
+            android:textColor="?android:attr/textColorPrimary" />
     </LinearLayout>
 </LinearLayout>
diff --git a/res/layout/wakelock_text_row.xml b/res/layout/wakelock_text_row.xml
index d400287..c40c736 100644
--- a/res/layout/wakelock_text_row.xml
+++ b/res/layout/wakelock_text_row.xml
@@ -32,10 +32,12 @@
         android:scrollHorizontally="true"
         android:ellipsize="end"
         android:maxLines="1"
-        android:layout_weight="1" />
+        android:layout_weight="1"
+        android:textColor="?android:attr/textColorPrimary" />
     <TextView
         android:id="@+id/ui_text_end"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
-        android:layout_gravity="center_vertical|end" />
+        android:layout_gravity="center_vertical|end"
+        android:textColor="?android:attr/textColorPrimary" />
 </LinearLayout>
diff --git a/res/layout/wakelocks.xml b/res/layout/wakelocks.xml
index 1b9947f..ff4d29d 100644
--- a/res/layout/wakelocks.xml
+++ b/res/layout/wakelocks.xml
@@ -20,44 +20,53 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:orientation="vertical"
-    android:paddingStart="10dp"
-    android:paddingEnd="10dp" >
+    android:orientation="vertical" >
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:orientation="horizontal"
-        android:paddingTop="10dp" >
+        android:paddingTop="10dp"
+        android:paddingBottom="10dp"
+        android:paddingStart="20dp"
+        android:paddingEnd="10dp"
+        android:background="?android:attr/colorPrimary" >
         <TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_vertical"
-            android:text="@string/spinner_type_title"/>
+            android:text="@string/spinner_type_title"
+            android:textColor="@color/system_activity_header_text"
+            android:textSize="16sp" />
         <Spinner
             android:id="@+id/list_type_select"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
             android:layout_weight="1"
-            android:gravity="center_vertical" />
+            android:gravity="center_vertical"
+            android:backgroundTint="@color/system_activity_header_text" />
         <TextView
             android:id="@+id/ui_total_state_time"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:paddingStart="10dp"
-            android:layout_gravity="center_vertical" />
+            android:layout_gravity="center_vertical"
+            android:textColor="@color/system_activity_header_text"
+            android:textSize="16sp" />
     </LinearLayout>
 
     <ScrollView
         android:layout_width="match_parent"
         android:layout_height="0dp"
         android:orientation="vertical"
-        android:paddingTop="10dp"
+        android:paddingStart="20dp"
+        android:paddingEnd="10dp"
         android:scrollbarStyle="insideInset"
         android:layout_weight="1" >
         <FrameLayout
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:paddingBottom="10dp" >
+            android:paddingBottom="10dp"
+            android:paddingTop="10dp" >
             <LinearLayout
                 android:id="@+id/ui_states_view"
                 android:layout_width="match_parent"
@@ -70,7 +79,7 @@
                 android:gravity="center"
                 android:text="@string/no_kernel_wakelock_file_found"
                 android:visibility="gone"
-                android:textAppearance="?android:attr/textAppearanceSmall" />
+                android:textColor="?android:attr/textColorPrimary" />
             <LinearLayout
                 android:id="@+id/ui_progress"
                 android:layout_width="match_parent"
diff --git a/res/values/custom_colors.xml b/res/values/custom_colors.xml
new file mode 100644
index 0000000..0de1b37
--- /dev/null
+++ b/res/values/custom_colors.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--  Copyright (C) 2016 The OmniROM Project
+
+  This program is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ -->
+
+<resources>
+    <color name="system_activity_header_text">#ffffff</color>
+</resources>