summaryrefslogtreecommitdiff
path: root/Source/Android/app/src/main/res
diff options
context:
space:
mode:
authorsigmabeta <bastos.eder@gmail.com>2016-01-18 18:27:04 -0500
committersigmabeta <bastos.eder@gmail.com>2016-01-23 12:28:50 -0500
commitce8a3d9bfb140a39dcc5a8bc2f37107e17973ce8 (patch)
treefee79774da99d15bb058def163c945e61804b13a /Source/Android/app/src/main/res
parente49f9b10a856da67c0f9efada2cdee102e600c01 (diff)
Implement basic framework for new Settings UI
Diffstat (limited to 'Source/Android/app/src/main/res')
-rw-r--r--Source/Android/app/src/main/res/layout/activity_settings.xml23
-rw-r--r--Source/Android/app/src/main/res/layout/fragment_settings.xml11
-rw-r--r--Source/Android/app/src/main/res/layout/list_item_setting.xml39
-rw-r--r--Source/Android/app/src/main/res/layout/list_item_setting_checkbox.xml49
-rw-r--r--Source/Android/app/src/main/res/layout/list_item_settings_header.xml18
-rw-r--r--Source/Android/app/src/main/res/values/dimens.xml7
-rw-r--r--Source/Android/app/src/main/res/values/styles.xml2
7 files changed, 129 insertions, 20 deletions
diff --git a/Source/Android/app/src/main/res/layout/activity_settings.xml b/Source/Android/app/src/main/res/layout/activity_settings.xml
index d72e5a0142..492fbf04ec 100644
--- a/Source/Android/app/src/main/res/layout/activity_settings.xml
+++ b/Source/Android/app/src/main/res/layout/activity_settings.xml
@@ -1,20 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
-
-
- <FrameLayout
- android:id="@+id/frame_content"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginLeft="@dimen/activity_horizontal_margin"
- android:layout_marginRight="@dimen/activity_horizontal_margin"
- tools:listitem="@layout/list_item_file"
- android:elevation="4dp"
- android:background="@android:color/white"/>
-
-
-</LinearLayout> \ No newline at end of file
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:id="@+id/frame_content"/>
diff --git a/Source/Android/app/src/main/res/layout/fragment_settings.xml b/Source/Android/app/src/main/res/layout/fragment_settings.xml
new file mode 100644
index 0000000000..3823d50d12
--- /dev/null
+++ b/Source/Android/app/src/main/res/layout/fragment_settings.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <android.support.v7.widget.RecyclerView
+ android:id="@+id/list_settings"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"/>
+
+</FrameLayout> \ No newline at end of file
diff --git a/Source/Android/app/src/main/res/layout/list_item_setting.xml b/Source/Android/app/src/main/res/layout/list_item_setting.xml
new file mode 100644
index 0000000000..d150d53265
--- /dev/null
+++ b/Source/Android/app/src/main/res/layout/list_item_setting.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="72dp"
+ android:background="?android:attr/selectableItemBackground"
+ android:focusable="true"
+ android:clickable="true">
+
+ <TextView
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ style="@style/TextAppearance.AppCompat.Headline"
+ tools:text="Setting Name"
+ android:layout_alignParentEnd="true"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentTop="true"
+ android:layout_marginStart="@dimen/spacing_large"
+ android:layout_marginEnd="@dimen/spacing_large"
+ android:layout_marginTop="@dimen/spacing_large"
+ android:id="@+id/text_setting_name"
+ android:textSize="16sp"/>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ tools:text="@string/overclock_enable_description"
+ android:layout_alignParentEnd="true"
+ android:layout_alignParentStart="true"
+ android:layout_marginStart="@dimen/spacing_large"
+ android:layout_marginEnd="@dimen/spacing_large"
+ android:layout_marginBottom="@dimen/spacing_large"
+ android:layout_marginTop="@dimen/spacing_small"
+ android:id="@+id/text_setting_description"
+ android:layout_below="@+id/text_setting_name"
+ android:layout_alignStart="@+id/text_setting_name"/>
+
+</RelativeLayout> \ No newline at end of file
diff --git a/Source/Android/app/src/main/res/layout/list_item_setting_checkbox.xml b/Source/Android/app/src/main/res/layout/list_item_setting_checkbox.xml
new file mode 100644
index 0000000000..265c51bb61
--- /dev/null
+++ b/Source/Android/app/src/main/res/layout/list_item_setting_checkbox.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="72dp"
+ android:background="?android:attr/selectableItemBackground"
+ android:focusable="true"
+ android:clickable="true">
+
+ <TextView
+ android:id="@+id/text_setting_name"
+ style="@style/TextAppearance.AppCompat.Headline"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentTop="true"
+ android:layout_marginEnd="@dimen/spacing_large"
+ android:layout_marginStart="@dimen/spacing_large"
+ android:layout_marginTop="@dimen/spacing_large"
+ android:layout_toStartOf="@+id/checkbox"
+ android:textSize="16sp"
+ tools:text="@string/overclock_enable"/>
+
+ <TextView
+ android:id="@+id/text_setting_description"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentStart="true"
+ android:layout_alignStart="@+id/text_setting_name"
+ android:layout_below="@+id/text_setting_name"
+ android:layout_marginBottom="@dimen/spacing_large"
+ android:layout_marginEnd="@dimen/spacing_large"
+ android:layout_marginStart="@dimen/spacing_large"
+ android:layout_marginTop="@dimen/spacing_small"
+ android:layout_toStartOf="@+id/checkbox"
+ tools:text="@string/overclock_enable_description"/>
+
+ <CheckBox
+ android:id="@+id/checkbox"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentEnd="true"
+ android:layout_centerVertical="true"
+ android:layout_marginEnd="@dimen/spacing_large"
+ android:focusable="false"
+ android:clickable="false"/>
+
+</RelativeLayout> \ No newline at end of file
diff --git a/Source/Android/app/src/main/res/layout/list_item_settings_header.xml b/Source/Android/app/src/main/res/layout/list_item_settings_header.xml
new file mode 100644
index 0000000000..3c72913c93
--- /dev/null
+++ b/Source/Android/app/src/main/res/layout/list_item_settings_header.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="48dp">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/text_header_name"
+ tools:text="CPU Settings"
+ android:layout_marginStart="@dimen/spacing_large"
+ android:layout_marginBottom="@dimen/spacing_small"
+ android:textColor="?android:colorAccent"
+ android:textStyle="bold"
+ android:layout_gravity="left|bottom"/>
+
+</FrameLayout> \ No newline at end of file
diff --git a/Source/Android/app/src/main/res/values/dimens.xml b/Source/Android/app/src/main/res/values/dimens.xml
index 986b230792..ba98e10607 100644
--- a/Source/Android/app/src/main/res/values/dimens.xml
+++ b/Source/Android/app/src/main/res/values/dimens.xml
@@ -9,4 +9,11 @@
<dimen name="add_button_margin">16dp</dimen>
<dimen name="main_appbar_height">128dp</dimen>
+
+ <dimen name="spacing_xsmall">2dp</dimen>
+ <dimen name="spacing_small">4dp</dimen>
+ <dimen name="spacing_medium">8dp</dimen>
+ <dimen name="spacing_medlarge">12dp</dimen>
+ <dimen name="spacing_large">16dp</dimen>
+ <dimen name="spacing_xlarge">32dp</dimen>
</resources>
diff --git a/Source/Android/app/src/main/res/values/styles.xml b/Source/Android/app/src/main/res/values/styles.xml
index dba853f492..d5db92e1e3 100644
--- a/Source/Android/app/src/main/res/values/styles.xml
+++ b/Source/Android/app/src/main/res/values/styles.xml
@@ -17,7 +17,7 @@
</style>
<!-- Same as above, but use default action bar, and mandate margins. -->
- <style name="DolphinSettingsBase" parent="Theme.AppCompat.Light.NoActionBar">
+ <style name="DolphinSettingsBase" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/dolphin_blue</item>
<item name="colorPrimaryDark">@color/dolphin_blue_dark</item>
</style>