RCApp: Dark/Light Theme (Light is inverted Dark theme right now)

This commit is contained in:
Peter Siegmund
2015-03-16 17:34:15 +01:00
parent 3f8a26600e
commit 053509d363
65 changed files with 444 additions and 250 deletions
@@ -35,7 +35,7 @@
android:icon="@drawable/ic_launcher"
android:supportsRtl="false"
android:label="@string/app_name"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme.Dark">
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
@@ -2,10 +2,10 @@
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@color/black"
android:drawable="@color/dark_black"
android:maxLevel="0" />
<item
android:drawable="@color/sap_yellow_1"
android:drawable="@color/dark_sap_yellow_1"
android:maxLevel="1" />
</level-list>
@@ -3,12 +3,12 @@
<item>
<shape android:shape="rectangle">
<solid android:color="@color/sap_yellow_1" />
<solid android:color="@color/dark_sap_yellow_1" />
</shape>
</item>
<item android:bottom="1.5dp">
<shape android:shape="rectangle">
<solid android:color="@color/black" />
<solid android:color="@color/dark_black" />
</shape>
</item>
@@ -2,9 +2,9 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/sap_gray_black_30" />
<solid android:color="@color/dark_sap_gray_black_30" />
<stroke
android:width="@dimen/thin_line"
android:color="@color/sap_gray_black_30" />
android:color="@color/dark_sap_gray_black_30" />
</shape>
@@ -7,6 +7,6 @@
android:bottomRightRadius="0dp"
android:topRightRadius="0dp" />
<stroke android:width="2px" android:color="@color/white" />
<stroke android:width="2px" android:color="?white" />
</shape>
@@ -8,7 +8,7 @@
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/sap_gray_black_30"
android:background="?sap_gray_black_30"
android:divider="@null"
android:dividerHeight="0dp" />
android:dividerHeight="0dp"/>
</LinearLayout>
@@ -30,7 +30,7 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/default_margin"
android:background="@color/sap_blue_1"
android:background="?sap_blue_1"
android:paddingLeft="@dimen/default_padding"
android:paddingRight="@dimen/default_padding"
android:layout_toLeftOf="@id/more_data"
@@ -75,5 +75,5 @@
android:layout_marginLeft="@dimen/default_margin_half"
android:layout_marginRight="@dimen/default_margin"
android:layout_toRightOf="@id/flag"
android:background="@color/sap_gray" />
android:background="?sap_gray" />
</RelativeLayout>
@@ -9,7 +9,7 @@
android:layout_width="match_parent"
android:layout_height="36dp"
android:gravity="center"
android:textColor="@color/black"
android:textColor="?black"
android:textIsSelectable="false"
android:textSize="22sp"
android:visibility="gone" />
@@ -38,7 +38,7 @@
android:layout_alignStart="@+id/imageView"
android:layout_marginBottom="@dimen/default_margin"
android:text="@string/login_text"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_40" />
<TextView
@@ -53,7 +53,7 @@
android:drawablePadding="@dimen/default_padding_half"
android:drawableStart="@drawable/ic_assignment_white_48dp"
android:text="@string/login_sub_text"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_40" />
<ImageView
@@ -74,5 +74,5 @@
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_alignParentBottom="true"
android:background="@color/sap_yellow_1" />
android:background="?sap_yellow_1" />
</RelativeLayout>
@@ -2,7 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/listView_row_height"
android:background="@color/sap_gray_black_30">
android:background="?sap_gray_black_30">
<RelativeLayout
android:layout_width="fill_parent"
@@ -17,7 +17,7 @@
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_26" />
<TextView
@@ -26,7 +26,7 @@
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@id/list_item"
android:textColor="@color/sap_light_gray"
android:textColor="?sap_light_gray"
android:textSize="@dimen/textSize_18"
android:visibility="gone" />
</RelativeLayout>
@@ -47,5 +47,5 @@
android:layout_alignParentBottom="true"
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginRight="@dimen/default_margin"
android:background="@color/sap_gray" />
android:background="?sap_gray" />
</RelativeLayout>
@@ -15,7 +15,7 @@
android:layout_centerVertical="true"
android:paddingLeft="@dimen/default_padding"
android:text="@string/label_login_events"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_26" />
<ImageView
@@ -34,7 +34,7 @@
android:layout_centerVertical="true"
android:layout_toLeftOf="@id/icon_event"
android:paddingRight="@dimen/default_padding"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_22" />
</RelativeLayout>
@@ -43,14 +43,14 @@
android:layout_width="match_parent"
android:layout_height="@dimen/thick_line"
android:layout_below="@id/event_header"
android:background="@color/black" />
android:background="?black" />
<FrameLayout
android:id="@+id/event_fragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_below="@id/event_line"
android:background="@color/black_light" />
android:background="?black_light" />
<RelativeLayout
android:id="@+id/area_header"
@@ -65,7 +65,7 @@
android:layout_centerVertical="true"
android:paddingLeft="@dimen/default_padding"
android:text="@string/label_login_course_area"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_26" />
<ImageView
@@ -84,7 +84,7 @@
android:layout_centerVertical="true"
android:layout_toLeftOf="@id/icon_area"
android:paddingRight="@dimen/default_padding"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_22" />
</RelativeLayout>
@@ -93,14 +93,14 @@
android:layout_width="match_parent"
android:layout_height="@dimen/thick_line"
android:layout_below="@id/area_header"
android:background="@color/black" />
android:background="?black" />
<FrameLayout
android:id="@+id/area_fragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_below="@id/area_line"
android:background="@color/black_light" />
android:background="?black_light" />
<RelativeLayout
android:id="@+id/position_header"
@@ -115,7 +115,7 @@
android:layout_centerVertical="true"
android:paddingLeft="@dimen/default_padding"
android:text="@string/label_login_position"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_26" />
<ImageView
@@ -134,7 +134,7 @@
android:layout_centerVertical="true"
android:layout_toLeftOf="@id/icon_position"
android:paddingRight="@dimen/default_padding"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_22" />
</RelativeLayout>
@@ -143,14 +143,14 @@
android:layout_width="match_parent"
android:layout_height="@dimen/thick_line"
android:layout_below="@id/position_header"
android:background="@color/black" />
android:background="?black" />
<FrameLayout
android:id="@+id/position_fragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_below="@id/position_line"
android:background="@color/black_light" />
android:background="?black_light" />
<include layout="@layout/signup_button" />
</RelativeLayout>
@@ -4,7 +4,7 @@
android:id="@+id/race_content_header"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/sap_gray">
android:background="?sap_gray">
<TextView
android:id="@+id/timer_text"
@@ -13,7 +13,7 @@
android:layout_marginTop="@dimen/default_margin"
android:gravity="center"
tools:text="@string/time"
android:textColor="@color/sap_light_gray"
android:textColor="?sap_light_gray"
android:textSize="@dimen/textSize_40" />
<ImageView
@@ -41,7 +41,7 @@
android:id="@+id/time_start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/sap_light_gray"
android:textColor="?sap_light_gray"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:textSize="@dimen/textSize_22"
@@ -59,7 +59,7 @@
android:id="@+id/current_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textColor="?white"
android:layout_centerInParent="true"
android:drawableLeft="@drawable/ic_access_time_white_36dp"
android:drawablePadding="@dimen/default_padding_half"
@@ -80,7 +80,7 @@
android:id="@+id/time_finish"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/sap_light_gray"
android:textColor="?sap_light_gray"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:text="@string/time_finish"
@@ -8,7 +8,7 @@
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="@dimen/selector_header_height"
android:background="@color/sap_gray">
android:background="?sap_gray">
<LinearLayout
android:id="@+id/header_text"
@@ -37,7 +37,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/race_begin_finish_header"
android:textColor="@color/white"
android:textColor="?white"
android:layout_gravity="center_vertical"
android:textSize="@dimen/textSize_26" />
</LinearLayout>
@@ -47,7 +47,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/thick_line"
android:layout_alignParentBottom="true"
android:background="@color/black" />
android:background="?black" />
</RelativeLayout>
<LinearLayout
@@ -73,7 +73,7 @@
android:id="@+id/current_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textColor="?white"
android:layout_centerInParent="true"
android:drawableLeft="@drawable/ic_access_time_white_36dp"
android:drawablePadding="@dimen/default_padding_half"
@@ -96,7 +96,7 @@
android:padding="@dimen/default_padding"
android:textAllCaps="true"
android:textSize="@dimen/textSize_22"
android:background="@color/sap_blue_1"
android:background="?sap_blue_1"
android:layout_centerInParent="true"/>
</RelativeLayout>
</LinearLayout>
@@ -133,7 +133,7 @@
android:padding="@dimen/default_padding"
android:textAllCaps="true"
android:textSize="@dimen/textSize_22"
android:background="@color/sap_blue_1"
android:background="?sap_blue_1"
android:layout_centerInParent="true"/>
</RelativeLayout>
</LinearLayout>
@@ -8,7 +8,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
android:background="@color/sap_gray_black_30"
android:background="?sap_gray_black_30"
android:orientation="vertical">
<LinearLayout
@@ -53,5 +53,5 @@
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:background="@color/black" />
android:background="?black" />
</RelativeLayout>
@@ -25,7 +25,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_40"
tools:text="13:36" />
@@ -35,7 +35,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/race_started"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_18" />
<TextView
@@ -44,7 +44,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/race_finished"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_18" />
</LinearLayout>
@@ -54,7 +54,7 @@
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="@string/race_unscheduled"
android:textColor="@color/sap_light_gray"
android:textColor="?sap_light_gray"
android:textSize="@dimen/textSize_18"
android:visibility="gone" />
</RelativeLayout>
@@ -102,7 +102,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_18"
tools:text="01:12" />
</LinearLayout>
@@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/sap_gray_black_30"
android:background="?sap_gray_black_30"
android:baselineAligned="false"
android:fitsSystemWindows="true"
android:orientation="horizontal">
@@ -8,7 +8,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/black"
android:background="?black"
android:orientation="horizontal">
<Button
@@ -17,7 +17,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/races_current"
android:textColor="@color/sap_light_gray"
android:textColor="?sap_light_gray"
android:textSize="@dimen/textSize_20"
android:textStyle="bold"
style="?android:attr/borderlessButtonStyle" />
@@ -28,7 +28,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/races_all"
android:textColor="@color/sap_light_gray"
android:textColor="?sap_light_gray"
android:textSize="@dimen/textSize_20"
android:textStyle="bold"
style="?android:attr/borderlessButtonStyle" />
@@ -38,6 +38,6 @@
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@color/black"
android:divider="?black"
android:dividerHeight="1dp" />
</LinearLayout>
@@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/sap_gray_black_30"
android:background="?sap_gray_black_30"
android:orientation="vertical">
<include layout="@layout/race_list_header" />
@@ -14,7 +14,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/sap_gray">
android:background="?sap_gray">
<ImageView
android:id="@+id/start_procedure_marker"
@@ -35,7 +35,7 @@
android:layout_height="wrap_content"
android:text="@string/start_procedure"
android:textAllCaps="true"
android:textColor="@color/sap_light_gray"
android:textColor="?sap_light_gray"
android:textSize="@dimen/textSize_20" />
<ImageView
@@ -45,7 +45,7 @@
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:src="@drawable/lock_outline"
android:tint="@color/sap_light_gray"
android:tint="?sap_light_gray"
android:visibility="gone" />
</LinearLayout>
@@ -64,7 +64,7 @@
android:gravity="center_horizontal"
android:paddingLeft="@dimen/default_padding_half"
android:paddingRight="@dimen/default_padding_half"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_22"
tools:text="@string/start_procedure_line_start" />
</RelativeLayout>
@@ -75,7 +75,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/sap_gray">
android:background="?sap_gray">
<ImageView
android:id="@+id/start_mode_marker"
@@ -96,7 +96,7 @@
android:layout_height="wrap_content"
android:text="@string/start_mode"
android:textAllCaps="true"
android:textColor="@color/sap_light_gray"
android:textColor="?sap_light_gray"
android:textSize="@dimen/textSize_20" />
<ImageView
@@ -106,7 +106,7 @@
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:src="@drawable/lock_outline"
android:tint="@color/sap_light_gray"
android:tint="?sap_light_gray"
android:visibility="gone" />
</LinearLayout>
@@ -130,7 +130,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/sap_gray">
android:background="?sap_gray">
<ImageView
android:id="@+id/course_marker"
@@ -151,7 +151,7 @@
android:layout_height="wrap_content"
android:text="@string/course"
android:textAllCaps="true"
android:textColor="@color/sap_light_gray"
android:textColor="?sap_light_gray"
android:textSize="@dimen/textSize_20" />
<ImageView
@@ -161,7 +161,7 @@
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:src="@drawable/lock_outline"
android:tint="@color/sap_light_gray"
android:tint="?sap_light_gray"
android:visibility="gone" />
</LinearLayout>
@@ -177,7 +177,7 @@
android:layout_centerInParent="true"
android:gravity="center_horizontal"
android:textSize="@dimen/textSize_22"
android:textColor="@color/white"
android:textColor="?white"
android:drawableTop="@drawable/course_updown_64dp"
tools:text="012"/>
</RelativeLayout>
@@ -188,7 +188,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/sap_gray">
android:background="?sap_gray">
<ImageView
android:id="@+id/wind_marker"
@@ -209,7 +209,7 @@
android:layout_height="wrap_content"
android:text="@string/wind"
android:textAllCaps="true"
android:textColor="@color/sap_light_gray"
android:textColor="?sap_light_gray"
android:textSize="@dimen/textSize_20" />
<ImageView
@@ -219,7 +219,7 @@
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:src="@drawable/lock_outline"
android:tint="@color/sap_light_gray"
android:tint="?sap_light_gray"
android:visibility="gone" />
</LinearLayout>
@@ -236,7 +236,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/wind_no_data"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_22"/>
</RelativeLayout>
</RelativeLayout>
@@ -247,5 +247,5 @@
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:background="@color/black" />
android:background="?black" />
</RelativeLayout>
@@ -16,7 +16,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/sap_gray">
android:background="?sap_gray">
<ImageView
android:id="@+id/postpone_flags_marker"
@@ -50,7 +50,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/sap_gray">
android:background="?sap_gray">
<ImageView
android:id="@+id/abandon_flags_marker"
@@ -84,7 +84,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/sap_gray">
android:background="?sap_gray">
<ImageView
android:id="@+id/recall_flags_marker"
@@ -118,7 +118,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/sap_gray"
android:background="?sap_gray"
android:visibility="gone">
<ImageView
@@ -153,7 +153,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/sap_gray">
android:background="?sap_gray">
<ImageView
android:id="@+id/more_flags_marker"
@@ -188,5 +188,5 @@
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:background="@color/black" />
android:background="?black" />
</RelativeLayout>
@@ -19,7 +19,7 @@
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginStart="@dimen/default_margin"
android:text="@string/set_time"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_26"/>
<ImageView
@@ -45,14 +45,14 @@
android:layout_toRightOf="@id/start_time_caption"
android:layout_toStartOf="@id/start_time_icon"
android:gravity="end"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_22"/>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/thin_line"
android:layout_alignParentBottom="true"
android:background="@color/black" />
android:background="?black" />
</RelativeLayout>
<RelativeLayout
@@ -71,7 +71,7 @@
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginStart="@dimen/default_margin"
android:text="@string/start_procedure"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_26"/>
<ImageView
@@ -97,14 +97,14 @@
android:layout_toRightOf="@id/start_procedure_caption"
android:layout_toStartOf="@id/start_procedure_icon"
android:gravity="end"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_22" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/thin_line"
android:layout_alignParentBottom="true"
android:background="@color/black" />
android:background="?black" />
</RelativeLayout>
<RelativeLayout
@@ -123,7 +123,7 @@
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginStart="@dimen/default_margin"
android:text="@string/start_mode"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_26"/>
<ImageView
@@ -158,14 +158,14 @@
android:layout_toStartOf="@+id/start_mode_icon"
android:gravity="end"
android:singleLine="true"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_22"/>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/thin_line"
android:layout_alignParentBottom="true"
android:background="@color/black" />
android:background="?black" />
</RelativeLayout>
<RelativeLayout
@@ -184,7 +184,7 @@
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginStart="@dimen/default_margin"
android:text="@string/course"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_26"/>
<ImageView
@@ -218,14 +218,14 @@
android:gravity="end"
android:singleLine="true"
android:text="Triangle"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_22"/>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/thin_line"
android:layout_alignParentBottom="true"
android:background="@color/black" />
android:background="?black" />
</RelativeLayout>
<RelativeLayout
@@ -244,7 +244,7 @@
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginStart="@dimen/default_margin"
android:text="@string/wind"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_26"/>
<ImageView
@@ -278,14 +278,14 @@
android:layout_toStartOf="@id/wind_icon"
android:gravity="end"
android:text="@string/wind_unknown"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_22"/>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/thin_line"
android:layout_alignParentBottom="true"
android:background="@color/black" />
android:background="?black" />
</RelativeLayout>
<Button
@@ -296,13 +296,13 @@
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_margin="@dimen/default_margin_twice"
android:background="@color/sap_blue_1"
android:background="?sap_blue_1"
android:paddingBottom="@dimen/default_padding"
android:paddingLeft="@dimen/default_padding_twice"
android:paddingRight="@dimen/default_padding_twice"
android:paddingTop="@dimen/default_padding"
android:text="CONFIRM SETUP"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/white"
android:textColor="?white"
android:textStyle="bold" />
</RelativeLayout>
@@ -7,7 +7,7 @@
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="@dimen/selector_header_height"
android:background="@color/sap_gray">
android:background="?sap_gray">
<LinearLayout
android:id="@+id/header_text"
@@ -29,7 +29,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/course"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_26" />
</LinearLayout>
@@ -38,7 +38,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/thick_line"
android:layout_alignParentBottom="true"
android:background="@color/black" />
android:background="?black" />
</RelativeLayout>
<LinearLayout
@@ -58,7 +58,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
android:background="@color/sap_gray_black_30"
android:background="?sap_gray_black_30"
android:divider="@null"
android:dividerHeight="0dp" />
</LinearLayout>
@@ -7,7 +7,7 @@
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="@dimen/selector_header_height"
android:background="@color/sap_gray">
android:background="?sap_gray">
<LinearLayout
android:id="@+id/header_text"
@@ -29,7 +29,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/start_mode"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_26" />
</LinearLayout>
@@ -38,7 +38,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/thick_line"
android:layout_alignParentBottom="true"
android:background="@color/black" />
android:background="?black" />
</RelativeLayout>
<LinearLayout
@@ -58,7 +58,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
android:background="@color/sap_gray_black_30"
android:background="?sap_gray_black_30"
android:divider="@null"
android:dividerHeight="0dp" />
</LinearLayout>
@@ -41,5 +41,5 @@
android:layout_width="match_parent"
android:layout_height="@dimen/thick_line"
android:layout_alignParentBottom="true"
android:background="@color/sap_gray" />
android:background="?sap_gray" />
</RelativeLayout>
@@ -7,7 +7,7 @@
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="@dimen/selector_header_height"
android:background="@color/sap_gray">
android:background="?sap_gray">
<LinearLayout
android:id="@+id/header_text"
@@ -29,7 +29,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/start_procedure"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_26" />
</LinearLayout>
@@ -38,7 +38,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/thick_line"
android:layout_alignParentBottom="true"
android:background="@color/black" />
android:background="?black" />
</RelativeLayout>
<LinearLayout
@@ -58,7 +58,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
android:background="@color/sap_gray_black_30"
android:background="?sap_gray_black_30"
android:divider="@null"
android:dividerHeight="0dp" />
</LinearLayout>
@@ -7,7 +7,7 @@
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="@dimen/selector_header_height"
android:background="@color/sap_gray">
android:background="?sap_gray">
<LinearLayout
android:id="@+id/header_text"
@@ -29,7 +29,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/gate_start_pathfinder"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_26" />
</LinearLayout>
</RelativeLayout>
@@ -39,7 +39,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/thick_line"
android:layout_below="@id/header"
android:background="@color/black" />
android:background="?black" />
<LinearLayout
android:layout_width="match_parent"
@@ -57,7 +57,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
android:background="@color/sap_gray_black_30">
android:background="?sap_gray_black_30">
<RelativeLayout
android:layout_width="wrap_content"
@@ -106,7 +106,7 @@
android:layout_weight="1"
android:hint="Nationality"
android:inputType="textCapCharacters"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_26" />
<EditText
@@ -116,7 +116,7 @@
android:layout_weight="1"
android:hint="Number"
android:inputType="number"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_26" />
<Button
@@ -126,7 +126,7 @@
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginRight="@dimen/default_margin"
android:layout_weight="1"
android:background="@color/sap_blue_1"
android:background="?sap_blue_1"
android:enabled="false"
android:text="Set Pathfinder"
android:textAllCaps="true"
@@ -7,7 +7,7 @@
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="@dimen/selector_header_height"
android:background="@color/sap_gray">
android:background="?sap_gray">
<LinearLayout
android:id="@+id/header_text"
@@ -29,7 +29,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/gate_start_timing"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_26" />
</LinearLayout>
</RelativeLayout>
@@ -39,7 +39,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/thick_line"
android:layout_below="@id/header"
android:background="@color/black" />
android:background="?black" />
<LinearLayout
android:layout_width="match_parent"
@@ -57,7 +57,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
android:background="@color/sap_gray_black_30">
android:background="?sap_gray_black_30">
<LinearLayout
android:layout_width="wrap_content"
@@ -122,7 +122,7 @@
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginRight="@dimen/default_margin"
android:background="@color/sap_blue_1"
android:background="?sap_blue_1"
android:padding="@dimen/default_padding"
android:text="Set Gate Time"
android:textAllCaps="true"
@@ -42,5 +42,5 @@
android:layout_width="match_parent"
android:layout_height="@dimen/thick_line"
android:layout_alignParentBottom="true"
android:background="@color/sap_gray" />
android:background="?sap_gray" />
</RelativeLayout>
@@ -8,7 +8,7 @@
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="@dimen/selector_header_height"
android:background="@color/sap_gray">
android:background="?sap_gray">
<LinearLayout
android:id="@+id/header_text"
@@ -31,7 +31,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/set_time"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_26" />
</LinearLayout>
</RelativeLayout>
@@ -46,7 +46,7 @@
android:layout_marginRight="@dimen/default_margin_twice"
android:layout_marginTop="@dimen/default_margin"
tools:text="@string/race_start_time_in"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_40"
android:visibility="visible" />
@@ -65,7 +65,7 @@
android:tag="5"
android:text="@string/race_start_in_5_minutes"
android:textAllCaps="true"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_22" />
<Button
@@ -76,7 +76,7 @@
android:tag="1"
android:text="@string/race_start_in_1_minute"
android:textAllCaps="true"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_22" />
</LinearLayout>
@@ -85,7 +85,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/thick_line"
android:layout_below="@id/header"
android:background="@color/black" />
android:background="?black" />
<LinearLayout
android:layout_width="match_parent"
@@ -102,7 +102,7 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/sap_gray_black_30">
android:background="?sap_gray_black_30">
<LinearLayout
android:layout_width="wrap_content"
@@ -132,11 +132,11 @@
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:layout_margin="@dimen/default_margin_twice"
android:background="@color/sap_blue_1"
android:background="?sap_blue_1"
android:padding="@dimen/default_padding"
android:text="@string/race_set_start"
android:textAllCaps="true"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_22"
android:textStyle="bold" />
</RelativeLayout>
@@ -9,13 +9,13 @@
android:layout_marginBottom="@dimen/default_margin_twice"
android:layout_marginEnd="@dimen/default_margin_twice"
android:layout_marginRight="@dimen/default_margin_twice"
android:background="@color/sap_blue_1"
android:background="?sap_blue_1"
android:enabled="false"
android:paddingLeft="@dimen/default_padding"
android:paddingRight="@dimen/default_padding"
android:text="@string/sign_up"
android:textAllCaps="true"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_26"
android:textStyle="bold"
android:visibility="visible" />
@@ -4,7 +4,7 @@
android:id="@+id/toolbar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary">
android:background="?colorPrimary">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
@@ -49,5 +49,5 @@
android:layout_width="match_parent"
android:layout_height="@dimen/thick_line"
android:layout_below="@id/toolbar"
android:background="@color/sap_yellow_1" />
android:background="?sap_yellow_1" />
</RelativeLayout>
@@ -12,7 +12,7 @@
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black_transparent" />
android:background="?black_transparent" />
<TextView
android:id="@+id/backdrop_title"
@@ -25,7 +25,7 @@
android:layout_marginLeft="@dimen/default_margin"
android:layout_marginStart="@dimen/default_margin"
android:text="@string/login_text"
android:textColor="@color/white"
android:textColor="?white"
android:textSize="@dimen/textSize_40" />
<ImageView
@@ -12,7 +12,7 @@
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="@dimen/selector_header_height"
android:background="@color/sap_gray">
android:background="?sap_gray">
<TextView
android:id="@+id/wind_sensor"
@@ -75,7 +75,7 @@
android:layout_gravity="center_vertical"
android:text="@string/wind"
android:textSize="@dimen/textSize_26"
android:textColor="@color/white" />
android:textColor="?white" />
</LinearLayout>
</RelativeLayout>
@@ -84,7 +84,7 @@
android:layout_height="match_parent"
android:layout_below="@id/header"
android:orientation="vertical"
android:background="@color/sap_gray_black_30">
android:background="?sap_gray_black_30">
<ViewStub android:id="@+id/race_header"
android:layout="@layout/race_content_header"
@@ -108,7 +108,7 @@
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
android:layout_margin="@dimen/default_margin_half"
android:background="@color/sap_blue_1"
android:background="?sap_blue_1"
android:enabled="false"
android:padding="@dimen/default_padding_half"
android:text="@string/wind_set_data"
@@ -123,7 +123,7 @@
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
android:layout_margin="@dimen/default_margin_half"
android:background="@color/sap_blue_1"
android:background="?sap_blue_1"
android:padding="@dimen/default_padding_half"
android:text="@string/wind_set_position"
android:textAllCaps="true"
@@ -214,7 +214,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/default_margin"
android:background="@color/white"
android:background="?white"
android:orientation="horizontal"
android:visibility="gone">
@@ -241,8 +241,8 @@
android:padding="@dimen/default_padding_half"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/black"
android:textColorHint="@color/sap_light_gray" />
android:textColor="?black"
android:textColorHint="?sap_light_gray" />
</RelativeLayout>
<RelativeLayout
@@ -253,7 +253,7 @@
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black_transparent" />
android:background="?black_transparent" />
<Button
android:id="@+id/enter_position"
@@ -265,7 +265,7 @@
android:text="@string/wind_enter_position"
android:textAllCaps="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/white" />
android:textColor="?white" />
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
@@ -330,5 +330,6 @@
<string name="settings_category_developer">Developer Options</string>
<string name="preference_offline_header">Offline Modus</string>
<string name="preference_offline_summary">Deaktiviert die Verbindung zum Server und benutzt statische Daten</string>
<string name="preference_theme_header">Theme</string>
</resources>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="AppTheme.Base">
<style name="AppTheme.Dark" parent="AppTheme.Dark.Base">
<item name="android:windowTranslucentStatus">true</item>
</style>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme.Light" parent="AppTheme.Light.Base">
<item name="android:windowTranslucentStatus">true</item>
</style>
</resources>
@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="AppTheme" parent="AppTheme.Base">
<item name="android:colorPrimary">@color/colorPrimary</item>
<item name="android:colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="android:colorAccent">@color/colorAccent</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:alertDialogTheme">@style/AppTheme.AlertDialog</item>
</style>
<style name="AppTheme.AlertDialog" parent="Theme.AppCompat.Light.Dialog">
<item name="android:colorPrimary">@color/colorPrimary</item>
<item name="android:colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="android:colorAccent">@color/colorAccent</item>
</style>
</resources>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme.Dark" parent="AppTheme.Dark.Base">
<item name="android:colorPrimary">@color/dark_colorPrimary</item>
<item name="android:colorPrimaryDark">@color/dark_colorPrimaryDark</item>
<item name="android:colorAccent">@color/dark_colorAccent</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:alertDialogTheme">@style/AppTheme.Dark.AlertDialog</item>
</style>
<style name="AppTheme.Dark.AlertDialog" parent="Theme.AppCompat.Light.Dialog">
<item name="android:colorPrimary">@color/dark_colorPrimary</item>
<item name="android:colorPrimaryDark">@color/dark_colorPrimaryDark</item>
<item name="android:colorAccent">@color/dark_colorAccent</item>
</style>
</resources>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme.Light" parent="AppTheme.Light.Base">
<item name="android:colorPrimary">@color/light_colorPrimary</item>
<item name="android:colorPrimaryDark">@color/light_colorPrimaryDark</item>
<item name="android:colorAccent">@color/light_colorAccent</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:alertDialogTheme">@style/AppTheme.Light.AlertDialog</item>
</style>
<style name="AppTheme.Light.AlertDialog" parent="Theme.AppCompat.Light.Dialog">
<item name="android:colorPrimary">@color/light_colorPrimary</item>
<item name="android:colorPrimaryDark">@color/light_colorPrimaryDark</item>
<item name="android:colorAccent">@color/light_colorAccent</item>
</style>
</resources>
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="black" format="color" />
<attr name="black_light" format="color" />
<attr name="black_transparent" format="color" />
<attr name="sap_blue_1" format="color" />
<attr name="sap_gray" format="color" />
<attr name="sap_gray_black_20" format="color" />
<attr name="sap_gray_black_30" format="color" />
<attr name="sap_gray_black_40" format="color" />
<attr name="sap_gray_white_10" format="color" />
<attr name="sap_light_gray" format="color" />
<attr name="sap_red_1" format="color" />
<attr name="sap_yellow_1" format="color" />
<attr name="white" format="color" />
</resources>
@@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- color definition by Make Studio -->
<color name="white">#ffffff</color>
<color name="sap_light_gray">#929292</color>
<color name="sap_gray">#333333</color>
<color name="sap_gray_white_10">#474747</color>
<color name="sap_gray_black_20">#2a2a2a</color>
<color name="sap_gray_black_30">#242424</color>
<color name="sap_gray_black_40">#1f1f1f</color>
<color name="black">#000000</color>
<color name="sap_yellow_1">#f0ab00</color>
<color name="sap_red_1">#e94a1b</color>
<color name="sap_blue_1">#008fcc</color>
<!-- color definition end -->
<!-- default color -->
<color name="colorPrimary">@color/black</color>
<color name="colorPrimaryDark">@color/black</color>
<color name="colorAccent">@color/sap_yellow_1</color>
<!-- default color end -->
<color name="black_light">#ff242424</color>
<color name="black_transparent">#99000000</color>
</resources>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- color definition by Make Studio -->
<color name="dark_black">#000000</color>
<color name="dark_sap_blue_1">#008fcc</color>
<color name="dark_sap_gray">#333333</color>
<color name="dark_sap_gray_white_10">#474747</color>
<color name="dark_sap_gray_black_20">#2a2a2a</color>
<color name="dark_sap_gray_black_30">#242424</color>
<color name="dark_sap_gray_black_40">#1f1f1f</color>
<color name="dark_sap_light_gray">#929292</color>
<color name="dark_sap_red_1">#e94a1b</color>
<color name="dark_sap_yellow_1">#f0ab00</color>
<color name="dark_white">#ffffff</color>
<!-- color definition end -->
<!-- default color -->
<color name="dark_colorPrimary">@color/dark_black</color>
<color name="dark_colorPrimaryDark">@color/dark_black</color>
<color name="dark_colorAccent">@color/dark_sap_yellow_1</color>
<!-- default color end -->
<color name="dark_black_light">#ff242424</color>
<color name="dark_black_transparent">#99000000</color>
</resources>
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- color definition by Make Studio -->
<color name="light_black">#ffffff</color>
<color name="light_sap_blue_1">#ff7033</color>
<color name="light_sap_gray">#cccccc</color>
<color name="light_sap_gray_white_10">#b8b8b8</color>
<color name="light_sap_gray_black_20">#d6d6d6</color>
<color name="light_sap_gray_black_30">#dbdbdb</color>
<color name="light_sap_gray_black_40">#e0e0e0</color>
<color name="light_sap_light_gray">#6d6d6d</color>
<color name="light_sap_red_1">#16b5e4</color>
<color name="light_sap_yellow_1">#0f54ff</color>
<color name="light_white">#000000</color>
<!-- color definition end -->
<!-- default color -->
<color name="light_colorPrimary">@color/light_black</color>
<color name="light_colorPrimaryDark">@color/light_black</color>
<color name="light_colorAccent">@color/light_sap_yellow_1</color>
<!-- default color end -->
<color name="light_black_light">#ff242424</color>
<color name="light_black_transparent">#99000000</color>
</resources>
@@ -84,4 +84,15 @@
<string name="preference_developer_key" translatable="false">developer_options</string>
<string name="preference_offline_key" translatable="false">is_data_offline</string>
<bool name="preference_offline_default">false</bool>
<string name="preference_theme_key" translatable="false">theme</string>
<string name="preference_theme_default">0</string>
<string-array name="preference_theme_values">
<item>0</item>
<item>1</item>
</string-array>
<string-array name="preference_theme_entries">
<item>Dark</item>
<item>Light</item>
</string-array>
</resources>
@@ -209,6 +209,7 @@
<string name="preference_wakelock_summary">Force the screen to stay awake. Caution: Uses more battery.</string>
<string name="preference_offline_header">Offline Mode</string>
<string name="preference_offline_summary">Disables the connection to a server and uses static data</string>
<string name="preference_theme_header">Theme</string>
<string name="options_menu_info">Expert Information</string>
<string name="auto_update_install">Install</string>
<string name="auto_update_install_anyway">Install anyway</string>
@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Base application theme. -->
<style name="AppTheme" parent="AppTheme.Base" />
<style name="AppTheme.Base" parent="Theme.AppCompat.NoActionBar">
<item name="windowActionModeOverlay">true</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="drawerArrowStyle">@style/AppTheme.Widget.DrawerArrowStyle</item>
<item name="android:editTextStyle">@android:style/Widget.EditText</item>
</style>
<style name="AppTheme.Widget.NumberPicker" parent="@android:style/Theme.Holo.Light">
<item name="android:divider">@color/colorAccent</item>
</style>
<style name="AppTheme.Widget.DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">false</item>
</style>
<style name="AppTheme.LargeText" parent="AppTheme.Base">
<item name="android:textAppearance">?android:attr/textAppearanceLarge</item>
</style>
</resources>
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Base application theme. -->
<style name="AppTheme.Dark" parent="AppTheme.Dark.Base" />
<style name="AppTheme.Dark.Base" parent="Theme.AppCompat.NoActionBar">
<item name="windowActionModeOverlay">true</item>
<item name="colorPrimary">@color/dark_colorPrimary</item>
<item name="colorPrimaryDark">@color/dark_colorPrimaryDark</item>
<item name="colorAccent">@color/dark_colorAccent</item>
<item name="drawerArrowStyle">@style/AppTheme.Dark.Widget.DrawerArrowStyle</item>
<item name="android:editTextStyle">@android:style/Widget.EditText</item>
<!-- custom attributes because of custom themes -->
<item name="black">@color/dark_black</item>
<item name="black_light">@color/dark_black_light</item>
<item name="black_transparent">@color/dark_black_transparent</item>
<item name="sap_blue_1">@color/dark_sap_blue_1</item>
<item name="sap_gray">@color/dark_sap_gray</item>
<item name="sap_gray_black_20">@color/dark_sap_gray_black_20</item>
<item name="sap_gray_black_30">@color/dark_sap_gray_black_30</item>
<item name="sap_gray_black_40">@color/dark_sap_gray_black_40</item>
<item name="sap_gray_white_10">@color/dark_sap_gray_white_10</item>
<item name="sap_light_gray">@color/dark_sap_light_gray</item>
<item name="sap_red_1">@color/dark_sap_red_1</item>
<item name="sap_yellow_1">@color/dark_sap_yellow_1</item>
<item name="white">@color/dark_white</item>
</style>
<style name="AppTheme.Dark.Widget.NumberPicker" parent="@android:style/Theme.Holo.Light">
<item name="android:divider">@color/dark_colorAccent</item>
</style>
<style name="AppTheme.Dark.Widget.DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">false</item>
</style>
</resources>
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Base application theme. -->
<style name="AppTheme.Light" parent="AppTheme.Light.Base" />
<style name="AppTheme.Light.Base" parent="Theme.AppCompat.Light.NoActionBar">
<item name="windowActionModeOverlay">true</item>
<item name="colorPrimary">@color/light_colorPrimary</item>
<item name="colorPrimaryDark">@color/light_colorPrimaryDark</item>
<item name="colorAccent">@color/light_colorAccent</item>
<item name="drawerArrowStyle">@style/AppTheme.Light.Widget.DrawerArrowStyle</item>
<item name="android:editTextStyle">@android:style/Widget.EditText</item>
<!-- custom attributes because of custom themes -->
<item name="black">@color/light_black</item>
<item name="black_light">@color/light_black_light</item>
<item name="black_transparent">@color/light_black_transparent</item>
<item name="sap_blue_1">@color/light_sap_blue_1</item>
<item name="sap_gray">@color/light_sap_gray</item>
<item name="sap_gray_black_20">@color/light_sap_gray_black_20</item>
<item name="sap_gray_black_30">@color/light_sap_gray_black_30</item>
<item name="sap_gray_black_40">@color/light_sap_gray_black_40</item>
<item name="sap_gray_white_10">@color/light_sap_gray_white_10</item>
<item name="sap_light_gray">@color/light_sap_light_gray</item>
<item name="sap_red_1">@color/light_sap_red_1</item>
<item name="sap_yellow_1">@color/light_sap_yellow_1</item>
<item name="white">@color/light_white</item>
</style>
<style name="AppTheme.Light.Widget.NumberPicker" parent="@android:style/Theme.Holo.Light">
<item name="android:divider">@color/light_colorAccent</item>
</style>
<style name="AppTheme.Light.Widget.DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">false</item>
</style>
</resources>
@@ -63,6 +63,13 @@
android:key="@string/preference_wakelock_key"
android:summary="@string/preference_wakelock_summary"
android:title="@string/preference_wakelock_header" />
<ListPreference
android:key="@string/preference_theme_key"
android:title="@string/preference_theme_header"
android:defaultValue="@string/preference_theme_default"
android:entries="@array/preference_theme_entries"
android:entryValues="@array/preference_theme_values"/>
</PreferenceCategory>
<PreferenceCategory android:title="@string/settings_category_developer"
@@ -11,6 +11,9 @@ public class AppConstants {
public final static String EXTRAS_RACE_STATE_EVENT = "raceStateEvent";
public final static String FLAG_KEY = "raceFlag";
public final static String EXTRAS_WIND_FIX = "windfix";
public final static String DARK_THEME = "0";
public final static String LIGHT_THEME = "1";
public final static String INTENT_ACTION_REGISTER_RACE = "com.sap.sailing.racecommittee.app.action.registerRace";
public final static String INTENT_ACTION_CLEAR_RACES = "com.sap.sailing.racecommittee.app.action.clearRaces";
@@ -480,4 +480,9 @@ public class AppPreferences {
return preferences.getBoolean(context.getString(R.string.preference_offline_key),
context.getResources().getBoolean(R.bool.preference_offline_default));
}
public String getTheme() {
return preferences.getString(context.getString(R.string.preference_theme_key),
context.getResources().getString(R.string.preference_theme_default));
}
}
@@ -40,6 +40,7 @@ import com.sap.sailing.racecommittee.app.ui.fragments.lists.selection.CourseArea
import com.sap.sailing.racecommittee.app.ui.fragments.lists.selection.EventSelectedListenerHost;
import com.sap.sailing.racecommittee.app.ui.fragments.lists.selection.ItemSelectedListener;
import com.sap.sailing.racecommittee.app.ui.fragments.lists.selection.PositionSelectedListenerHost;
import com.sap.sailing.racecommittee.app.utils.ThemeHelper;
import com.sap.sailing.racecommittee.app.utils.autoupdate.AutoUpdater;
import java.io.FileNotFoundException;
@@ -155,6 +156,7 @@ public class LoginActivity extends BaseActivity implements EventSelectedListener
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ThemeHelper.setTheme(this);
setContentView(R.layout.login_view);
setSupportProgressBarIndeterminateVisibility(false);
@@ -40,6 +40,7 @@ import com.sap.sailing.racecommittee.app.ui.fragments.*;
import com.sap.sailing.racecommittee.app.ui.fragments.RaceListFragment.RaceListCallbacks;
import com.sap.sailing.racecommittee.app.ui.fragments.raceinfo.RaceInfoListener;
import com.sap.sailing.racecommittee.app.ui.fragments.raceinfo.WindFragment;
import com.sap.sailing.racecommittee.app.utils.ThemeHelper;
import com.sap.sailing.racecommittee.app.utils.TickListener;
import com.sap.sailing.racecommittee.app.utils.TickSingleton;
import com.sap.sailing.racecommittee.app.utils.TimeUtils;
@@ -258,6 +259,7 @@ public class RacingActivity extends SessionActivity implements RaceInfoListener,
super.onCreate(savedInstanceState);
ThemeHelper.setTheme(this);
setContentView(R.layout.racing_view);
dataManager = DataManager.create(this);
@@ -93,7 +93,7 @@ public abstract class SendingServiceAwareActivity extends ResilientActivity {
int errorCount = this.sendingService.getDelayedIntentsCount();
if (errorCount > 0) {
menuItemLive.setIcon(getTintedDrawable(getResources(), R.drawable.ic_share_white_36dp, R.color.sap_red_1));
menuItemLive.setIcon(getTintedDrawable(getResources(), R.drawable.ic_share_white_36dp, R.attr.sap_red_1));
Date lastSuccessfulSend = this.sendingService.getLastSuccessfulSend();
sendingServiceStatus = String.format("Currently %d events waiting to be sent.\nLast successful sent was at %s",
errorCount, lastSuccessfulSend == null ? "never" : lastSuccessfulSend);
@@ -8,6 +8,7 @@ import android.os.Bundle;
import android.preference.PreferenceActivity;
import com.sap.sailing.racecommittee.app.R;
import com.sap.sailing.racecommittee.app.utils.ThemeHelper;
public class SettingsActivity extends PreferenceActivity {
@@ -17,6 +18,7 @@ public class SettingsActivity extends PreferenceActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ThemeHelper.setTheme(this);
Bundle arguments = getIntent().getExtras();
@@ -11,8 +11,6 @@ import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Typeface;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.TextUtils;
@@ -33,8 +31,8 @@ import com.sap.sailing.racecommittee.app.R;
import com.sap.sailing.racecommittee.app.domain.ManagedRace;
import com.sap.sailing.racecommittee.app.domain.impl.BoatClassSeriesFleet;
import com.sap.sailing.racecommittee.app.ui.adapters.racelist.RaceFilter.FilterSubscriber;
import com.sap.sailing.racecommittee.app.ui.utils.FlagsBitmapCache;
import com.sap.sailing.racecommittee.app.ui.utils.FlagsResources;
import com.sap.sailing.racecommittee.app.utils.ColorHelper;
import com.sap.sse.common.TimePoint;
import com.sap.sse.common.impl.MillisecondsTimePoint;
@@ -221,10 +219,10 @@ public class ManagedRaceListAdapter extends ArrayAdapter<RaceListDataType> imple
race_unscheduled.setVisibility(View.VISIBLE);
} else {
if (group_name != null) {
group_name.setTextColor(getContext().getResources().getColor(R.color.white));
group_name.setTextColor(ColorHelper.getThemedColor(getContext(), R.attr.white));
}
if (race_name != null) {
race_name.setTextColor(getContext().getResources().getColor(R.color.white));
race_name.setTextColor(ColorHelper.getThemedColor(getContext(), R.attr.white));
}
}
}
@@ -290,10 +288,10 @@ public class ManagedRaceListAdapter extends ArrayAdapter<RaceListDataType> imple
race_unscheduled.setVisibility(View.GONE);
}
if (race_name != null) {
race_name.setTextColor(getContext().getResources().getColor(R.color.sap_light_gray));
race_name.setTextColor(ColorHelper.getThemedColor(getContext(), R.attr.sap_light_gray));
}
if (group_name != null) {
group_name.setTextColor(getContext().getResources().getColor(R.color.sap_light_gray));
group_name.setTextColor(ColorHelper.getThemedColor(getContext(), R.attr.sap_light_gray));
}
}
}
@@ -15,6 +15,7 @@ import android.widget.TextView;
import com.sap.sailing.android.shared.util.ViewHolder;
import com.sap.sailing.racecommittee.app.R;
import com.sap.sailing.racecommittee.app.ui.utils.FlagsResources;
import com.sap.sailing.racecommittee.app.utils.ColorHelper;
public class StartModeAdapter extends BaseAdapter implements OnClickListener {
@@ -61,9 +62,9 @@ public class StartModeAdapter extends BaseAdapter implements OnClickListener {
TextView flagName = ViewHolder.get(convertView, R.id.flag_name);
if (flagName != null) {
flagName.setText(startMode.getFlagName());
flagName.setTextColor(mContext.getResources().getColor(R.color.sap_light_gray));
flagName.setTextColor(ColorHelper.getThemedColor(mContext, R.attr.sap_light_gray));
if (startMode.isChecked()) {
flagName.setTextColor(mContext.getResources().getColor(R.color.white));
flagName.setTextColor(ColorHelper.getThemedColor(mContext, R.attr.white));
}
}
@@ -16,6 +16,7 @@ import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.sap.sailing.racecommittee.app.utils.ColorHelper;
public class StartProcedureAdapter extends BaseAdapter implements OnClickListener {
@@ -54,9 +55,9 @@ public class StartProcedureAdapter extends BaseAdapter implements OnClickListene
TextView startProcedure = ViewHolder.get(convertView, R.id.start_procedure);
if (startProcedure != null) {
startProcedure.setText(getItem(position).toString());
startProcedure.setTextColor(mContext.getResources().getColor(R.color.sap_light_gray));
startProcedure.setTextColor(ColorHelper.getThemedColor(mContext, R.attr.sap_light_gray));
if (getItem(position).isChecked()) {
startProcedure.setTextColor(mContext.getResources().getColor(R.color.white));
startProcedure.setTextColor(ColorHelper.getThemedColor(mContext, R.attr.white));
}
}
@@ -2,7 +2,6 @@ package com.sap.sailing.racecommittee.app.ui.fragments;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.os.Build;
@@ -28,7 +27,6 @@ import com.sap.sailing.racecommittee.app.RaceApplication;
import com.sap.sailing.racecommittee.app.data.InMemoryDataStore;
import com.sap.sailing.racecommittee.app.domain.ManagedRace;
import com.sap.sailing.racecommittee.app.domain.impl.BoatClassSeriesFleet;
import com.sap.sailing.racecommittee.app.ui.activities.LoginActivity;
import com.sap.sailing.racecommittee.app.ui.activities.RacingActivity;
import com.sap.sailing.racecommittee.app.ui.adapters.racelist.ManagedRaceListAdapter;
import com.sap.sailing.racecommittee.app.ui.adapters.racelist.ManagedRaceListAdapter.JuryFlagClickedListener;
@@ -38,6 +36,7 @@ import com.sap.sailing.racecommittee.app.ui.comparators.BoatClassSeriesDataFleet
import com.sap.sailing.racecommittee.app.ui.comparators.ManagedRaceStartTimeComparator;
import com.sap.sailing.racecommittee.app.ui.comparators.RaceListDataTypeComparator;
import com.sap.sailing.racecommittee.app.ui.fragments.dialogs.ProtestTimeDialogFragment;
import com.sap.sailing.racecommittee.app.utils.ColorHelper;
import com.sap.sailing.racecommittee.app.utils.TickListener;
import com.sap.sailing.racecommittee.app.utils.TickSingleton;
@@ -126,8 +125,8 @@ public class RaceListFragment extends LoggableFragment implements OnItemClickLis
mAdapter.notifyDataSetChanged();
if (mCurrent != null && mAll != null) {
int colorGrey = getResources().getColor(R.color.sap_light_gray);
int colorOrange = getResources().getColor(R.color.sap_yellow_1);
int colorGrey = ColorHelper.getThemedColor(getActivity(), R.attr.sap_light_gray);
int colorOrange = ColorHelper.getThemedColor(getActivity(), R.attr.sap_yellow_1);
mCurrent.setTextColor(colorGrey);
mAll.setTextColor(colorGrey);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
@@ -351,7 +350,7 @@ public class RaceListFragment extends LoggableFragment implements OnItemClickLis
public void setUp(DrawerLayout drawerLayout, SpannableString header) {
mDrawerLayout = drawerLayout;
mDrawerLayout.setStatusBarBackgroundColor(getResources().getColor(R.color.colorPrimaryDark));
mDrawerLayout.setStatusBarBackgroundColor(ColorHelper.getThemedColor(getActivity(), R.attr.colorPrimaryDark));
mDrawerToggle = new ActionBarDrawerToggle(getActivity(), mDrawerLayout, (Toolbar) getActivity().findViewById(
R.id.toolbar), R.string.nav_drawer_open, R.string.nav_drawer_close) {
@Override
@@ -8,7 +8,6 @@ import android.app.Activity;
import android.app.FragmentManager;
import android.app.LoaderManager.LoaderCallbacks;
import android.content.Context;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
@@ -27,6 +26,7 @@ import com.sap.sailing.racecommittee.app.ui.comparators.NaturalNamedComparator;
import com.sap.sailing.racecommittee.app.ui.fragments.dialogs.FragmentAttachedDialogFragment;
import com.sap.sailing.racecommittee.app.ui.fragments.dialogs.LoadFailedDialog;
import com.sap.sailing.racecommittee.app.ui.fragments.lists.selection.ItemSelectedListener;
import com.sap.sailing.racecommittee.app.utils.ColorHelper;
import com.sap.sse.common.Named;
public abstract class NamedListFragment<T extends Named> extends LoggableListFragment implements
@@ -146,7 +146,7 @@ public abstract class NamedListFragment<T extends Named> extends LoggableListFra
if (lastSelected != null) {
textView = (TextView) lastSelected.findViewById(R.id.list_item_subtitle);
if (textView != null) {
textView.setTextColor(getResources().getColor(R.color.sap_light_gray));
textView.setTextColor(ColorHelper.getThemedColor(getActivity(), R.attr.sap_light_gray));
}
imageView = (ImageView) lastSelected.findViewById(R.id.checked);
@@ -158,7 +158,7 @@ public abstract class NamedListFragment<T extends Named> extends LoggableListFra
// set new styles
textView = (TextView) view.findViewById(R.id.list_item_subtitle);
if (textView != null) {
textView.setTextColor(getResources().getColor(R.color.white));
textView.setTextColor(ColorHelper.getThemedColor(getActivity(), R.attr.white));
}
imageView = (ImageView) view.findViewById(R.id.checked);
if (imageView != null) {
@@ -1,6 +1,5 @@
package com.sap.sailing.racecommittee.app.ui.fragments.lists;
import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
@@ -14,6 +13,7 @@ import com.sap.sailing.racecommittee.app.AppPreferences;
import com.sap.sailing.racecommittee.app.R;
import com.sap.sailing.racecommittee.app.ui.fragments.dialogs.LoginDialog.LoginType;
import com.sap.sailing.racecommittee.app.ui.fragments.lists.selection.PositionSelectedListenerHost;
import com.sap.sailing.racecommittee.app.utils.ColorHelper;
import java.util.ArrayList;
@@ -111,7 +111,7 @@ public class PositionListFragment extends LoggableListFragment {
if (lastSelected != null) {
textView = (TextView) lastSelected.findViewById(R.id.list_item_subtitle);
if (textView != null) {
textView.setTextColor(getResources().getColor(R.color.sap_light_gray));
textView.setTextColor(ColorHelper.getThemedColor(getActivity(), R.attr.sap_light_gray));
}
imageView = (ImageView) lastSelected.findViewById(R.id.checked);
@@ -123,7 +123,7 @@ public class PositionListFragment extends LoggableListFragment {
// set new styles
textView = (TextView) view.findViewById(R.id.list_item_subtitle);
if (textView != null) {
textView.setTextColor(getResources().getColor(R.color.white));
textView.setTextColor(ColorHelper.getThemedColor(getActivity(), R.attr.white));
}
imageView = (ImageView) view.findViewById(R.id.checked);
if (imageView != null) {
@@ -15,7 +15,6 @@ import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.sap.sailing.android.shared.logging.ExLog;
import com.sap.sailing.domain.abstractlog.race.state.RaceStateChangedListener;
import com.sap.sailing.domain.abstractlog.race.state.racingprocedure.FlagPoleState;
import com.sap.sailing.domain.abstractlog.race.state.racingprocedure.RacingProcedure;
import com.sap.sailing.domain.abstractlog.race.state.racingprocedure.ReadonlyRacingProcedure;
@@ -26,11 +25,11 @@ import com.sap.sailing.domain.common.racelog.Flags;
import com.sap.sailing.domain.common.racelog.RaceLogRaceStatus;
import com.sap.sailing.domain.tracking.Wind;
import com.sap.sailing.racecommittee.app.R;
import com.sap.sailing.racecommittee.app.ui.adapters.unscheduled.StartProcedure;
import com.sap.sailing.racecommittee.app.ui.fragments.RaceFragment;
import com.sap.sailing.racecommittee.app.ui.fragments.dialogs.RaceDialogFragment;
import com.sap.sailing.racecommittee.app.ui.utils.CourseDesignerChooser;
import com.sap.sailing.racecommittee.app.ui.utils.FlagsResources;
import com.sap.sailing.racecommittee.app.utils.ColorHelper;
import com.sap.sailing.racecommittee.app.utils.TimeUtils;
import com.sap.sse.common.TimePoint;
import com.sap.sse.common.impl.MillisecondsTimePoint;
@@ -472,7 +471,7 @@ public abstract class BaseRaceInfoRaceFragment<ProcedureType extends RacingProce
layoutParams.height = getResources().getDimensionPixelSize(R.dimen.thick_line);
view.invalidate();
}
v.setBackgroundColor(getResources().getColor(R.color.sap_gray_black_20));
v.setBackgroundColor(ColorHelper.getThemedColor(getActivity(), R.attr.sap_gray_black_20));
break;
default:
@@ -480,7 +479,7 @@ public abstract class BaseRaceInfoRaceFragment<ProcedureType extends RacingProce
layoutParams.height = getResources().getDimensionPixelSize(R.dimen.thin_line);
view.invalidate();
}
v.setBackgroundColor(getResources().getColor(R.color.sap_gray));
v.setBackgroundColor(ColorHelper.getThemedColor(getActivity(), R.attr.sap_gray));
break;
}
retValue = drawable.getLevel();
@@ -0,0 +1,20 @@
package com.sap.sailing.racecommittee.app.utils;
import android.content.Context;
import android.content.res.Resources;
import android.support.annotation.AttrRes;
import android.support.annotation.ColorRes;
import android.util.TypedValue;
public class ColorHelper {
public static @ColorRes int getThemedColor(Context context, @AttrRes int colorId) {
int color = 0;
TypedValue typedValue = new TypedValue();
Resources.Theme theme = context.getTheme();
if (theme.resolveAttribute(colorId, typedValue, true)) {
color = context.getResources().getColor(typedValue.resourceId);
}
return color;
}
}
@@ -0,0 +1,17 @@
package com.sap.sailing.racecommittee.app.utils;
import android.app.Activity;
import com.sap.sailing.racecommittee.app.AppConstants;
import com.sap.sailing.racecommittee.app.AppPreferences;
import com.sap.sailing.racecommittee.app.R;
public class ThemeHelper {
public static void setTheme(Activity activity) {
if (AppPreferences.on(activity).getTheme().equals(AppConstants.LIGHT_THEME)) {
activity.setTheme(R.style.AppTheme_Light);
} else {
activity.setTheme(R.style.AppTheme_Dark);
}
}
}