Browse Source

clock type feature, settings menu changed

sduduzog 7 năm trước cách đây
mục cha
commit
438973b442

+ 2 - 2
app/build.gradle

@@ -10,8 +10,8 @@ android {
         applicationId "com.sduduzog.slimlauncher"
         minSdkVersion 15
         targetSdkVersion 28
-        versionCode 11
-        versionName "1.2.3"
+        versionCode 12
+        versionName "1.2.4"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
         vectorDrawables.useSupportLibrary = true
     }

+ 3 - 1
app/src/main/java/com/sduduzog/slimlauncher/MainActivity.kt

@@ -35,7 +35,9 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
     }
 
     override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, s: String?) {
-        recreate()
+        if (s.equals(getString(R.string.prefs_settings_key_theme), true)) {
+            recreate()
+        }
     }
 
     override fun getTheme(): Resources.Theme {

+ 27 - 21
app/src/main/java/com/sduduzog/slimlauncher/ui/main/MainFragment.kt

@@ -4,6 +4,7 @@ import android.animation.ObjectAnimator
 import android.arch.lifecycle.Observer
 import android.arch.lifecycle.ViewModelProviders
 import android.content.*
+import android.content.Context.MODE_PRIVATE
 import android.net.Uri
 import android.os.Build
 import android.os.Bundle
@@ -12,11 +13,11 @@ import android.support.design.widget.BottomSheetBehavior
 import android.support.design.widget.BottomSheetBehavior.STATE_COLLAPSED
 import android.support.design.widget.BottomSheetBehavior.STATE_HALF_EXPANDED
 import android.support.v4.app.Fragment
-import android.support.v7.widget.CardView
 import android.util.Log
 import android.view.LayoutInflater
 import android.view.View
 import android.view.ViewGroup
+import android.widget.FrameLayout
 import android.widget.Toast
 import androidx.navigation.Navigation
 import com.daasuu.ei.Ease
@@ -36,8 +37,7 @@ class MainFragment : Fragment() {
     private lateinit var viewModel: MainViewModel
     private lateinit var receiver: BroadcastReceiver
     private lateinit var adapter: MainAppsAdapter
-    private lateinit var sheetBehavior: BottomSheetBehavior<CardView>
-    private lateinit var themeChooser: ThemeChooserDialog
+    private lateinit var sheetBehavior: BottomSheetBehavior<FrameLayout>
 
     @Suppress("PropertyName")
     val TAG: String = "MainFragment"
@@ -50,10 +50,9 @@ class MainFragment : Fragment() {
     override fun onActivityCreated(savedInstanceState: Bundle?) {
         super.onActivityCreated(savedInstanceState)
         sheetBehavior = BottomSheetBehavior.from(bottomSheet)
-        bottomSheet.alpha = 0.0f
+        optionsView.alpha = 0.0f
         viewModel = ViewModelProviders.of(activity!!).get(MainViewModel::class.java)
         adapter = MainAppsAdapter(mutableSetOf(), InteractionHandler())
-        themeChooser = ThemeChooserDialog.getThemeChooser()
         mainAppsList.adapter = adapter
         viewModel.homeApps.observe(this, Observer {
             if (it != null) {
@@ -83,7 +82,7 @@ class MainFragment : Fragment() {
 
     override fun onAttach(context: Context?) {
         super.onAttach(context)
-        with(context as MainActivity){
+        with(context as MainActivity) {
             this.onBackPressedListener = object : MainActivity.OnBackPressedListener {
                 override fun onBackPressed() {
                     sheetBehavior.state = STATE_COLLAPSED
@@ -100,10 +99,21 @@ class MainFragment : Fragment() {
     }
 
     fun updateUi() {
-        val fWatchTime = SimpleDateFormat("HH:mm", Locale.ENGLISH)
-        val fWatchDate = SimpleDateFormat("EEE, MMM dd", Locale.ENGLISH)
+        val twenty4Hour = context?.getSharedPreferences(getString(R.string.prefs_settings), MODE_PRIVATE)
+                ?.getBoolean(getString(R.string.prefs_settings_key_clocktype), false)
         val date = Date()
-        clockTextView.text = fWatchTime.format(date)
+        if (twenty4Hour as Boolean) {
+            val fWatchTime = SimpleDateFormat("HH:mm", Locale.ENGLISH)
+            clockTextView.text = fWatchTime.format(date)
+            clockAmPm.visibility = View.GONE
+        } else {
+            val fWatchTime = SimpleDateFormat("hh:mm", Locale.ENGLISH)
+            val fWatchTimeAP = SimpleDateFormat("aa", Locale.ENGLISH)
+            clockTextView.text = fWatchTime.format(date)
+            clockAmPm.text = fWatchTimeAP.format(date)
+            clockAmPm.visibility = View.VISIBLE
+        }
+        val fWatchDate = SimpleDateFormat("EEE, MMM dd", Locale.ENGLISH)
         dateTextView.text = fWatchDate.format(date)
     }
 
@@ -130,7 +140,7 @@ class MainFragment : Fragment() {
     }
 
     private fun doBounceAnimation(targetView: View) {
-        val animator = ObjectAnimator.ofFloat(targetView, "translationY", 0f, -40f, 0f)
+        val animator = ObjectAnimator.ofFloat(targetView, "translationY", 0f, -20f, 0f)
         animator.interpolator = EasingInterpolator(Ease.QUINT_OUT)
         animator.startDelay = 1000
         animator.duration = 1000
@@ -159,11 +169,7 @@ class MainFragment : Fragment() {
         startActivity(Intent(android.provider.Settings.ACTION_SETTINGS))
     }
 
-    private fun changeTheme() {
-        themeChooser.show(fragmentManager, TAG)
-    }
-
-    private fun setEventListeners(){
+    private fun setEventListeners() {
         clockTextView.setOnClickListener {
             if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
                 try {
@@ -180,8 +186,12 @@ class MainFragment : Fragment() {
         }
         sheetBehavior.setBottomSheetCallback(object : BottomSheetBehavior.BottomSheetCallback() {
             override fun onSlide(p0: View, p1: Float) {
-                val alpha = 3 * p1
-                bottomSheet.alpha = alpha
+                val multi = 3 * p1
+                optionsView.alpha = multi
+                optionsView.cardElevation = p1 * 8
+                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+                    optionsView.elevation = p1 * 8
+                }
             }
 
             override fun onStateChanged(bottomSheet: View, newState: Int) {
@@ -191,10 +201,6 @@ class MainFragment : Fragment() {
                 }
             }
         })
-        changeThemeText.setOnClickListener {
-            sheetBehavior.state = STATE_COLLAPSED
-            changeTheme()
-        }
         settingsText.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_openSettingsFragment))
         deviceSettingsText.setOnClickListener { openSettings() }
         rateAppText.setOnClickListener { rateApp() }

+ 12 - 2
app/src/main/java/com/sduduzog/slimlauncher/ui/main/SettingsFragment.kt

@@ -3,6 +3,7 @@ package com.sduduzog.slimlauncher.ui.main
 
 import android.arch.lifecycle.Observer
 import android.arch.lifecycle.ViewModelProviders
+import android.content.Context.MODE_PRIVATE
 import android.os.Bundle
 import android.support.v4.app.Fragment
 import android.support.v7.widget.LinearLayoutManager
@@ -21,6 +22,8 @@ class SettingsFragment : Fragment() {
     private lateinit var viewModel: MainViewModel
     private lateinit var adapter: SettingsListAdapter
 
+    private val TAG: String = "SettingsFragment"
+
     override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
                               savedInstanceState: Bundle?): View? {
         return inflater.inflate(R.layout.settings_fragment, container, false)
@@ -44,9 +47,16 @@ class SettingsFragment : Fragment() {
         adapter = SettingsListAdapter(apps, InteractionHandler())
         settingsAppList.adapter = adapter
         settingsAppList.layoutManager = LinearLayoutManager(activity)
-
         addButton.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_openAppsFragment))
-
+        changeThemeText.setOnClickListener {
+            val themeChooserDialog = ThemeChooserDialog()
+            themeChooserDialog.showNow(fragmentManager, TAG)
+        }
+        val settings = context!!.getSharedPreferences(getString(R.string.prefs_settings), MODE_PRIVATE)
+        clockTypeChecker.isChecked = settings.getBoolean(getString(R.string.prefs_settings_key_clocktype), false)
+        clockTypeChecker.setOnCheckedChangeListener { _, b ->
+            settings.edit().putBoolean(getString(R.string.prefs_settings_key_clocktype), b).apply()
+        }
     }
 
     inner class InteractionHandler : OnListFragmentInteractionListener {

+ 2 - 2
app/src/main/res/drawable-v21/ic_expand.xml

@@ -1,6 +1,6 @@
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-    android:width="50dp"
-    android:height="50dp"
+    android:width="24dp"
+    android:height="24dp"
     android:viewportWidth="24.0"
     android:viewportHeight="24.0">
     <path

+ 10 - 42
app/src/main/res/layout-sw600dp/main_content.xml

@@ -4,7 +4,8 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:id="@+id/main_content"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:background="?android:attr/colorBackground">
 
     <TextView
         android:id="@+id/clockTextView"
@@ -43,46 +44,13 @@
         app:layout_constraintTop_toBottomOf="@+id/dateTextView"
         tools:listitem="@layout/main_list_item" />
 
-    <ImageView
-        android:id="@+id/ivExpand"
-        android:layout_width="50dp"
-        android:layout_height="50dp"
-        android:layout_marginStart="8dp"
-        android:layout_marginLeft="8dp"
-        android:layout_marginEnd="8dp"
-        android:layout_marginRight="8dp"
-        android:layout_marginBottom="8dp"
-        android:contentDescription="@string/content_description_expand_up"
-        android:padding="8dp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:srcCompat="@drawable/ic_expand" />
-
-    <ImageView
-        android:id="@+id/ivCall"
-        android:layout_width="50dp"
-        android:layout_height="50dp"
-        android:layout_marginStart="8dp"
-        android:layout_marginLeft="8dp"
-        android:layout_marginBottom="8dp"
-        android:contentDescription="@string/main_call_icon"
-        android:padding="13dp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:srcCompat="@drawable/ic_call" />
-
-    <ImageView
-        android:id="@+id/ivCamera"
-        android:layout_width="50dp"
-        android:layout_height="50dp"
-        android:layout_marginEnd="8dp"
-        android:layout_marginRight="8dp"
-        android:layout_marginBottom="8dp"
-        android:contentDescription="@string/main_photo_camera_icon"
-        android:padding="13dp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:srcCompat="@drawable/ic_photo_camera" />
+    <TextView
+        android:id="@+id/clockAmPm"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="16dp"
+        android:textSize="18sp"
+        app:layout_constraintStart_toEndOf="@+id/clockTextView"
+        app:layout_constraintTop_toTopOf="@+id/clockTextView" />
 
 </android.support.constraint.ConstraintLayout>

+ 111 - 79
app/src/main/res/layout/main_bottom_sheet.xml

@@ -1,101 +1,133 @@
 <?xml version="1.0" encoding="utf-8"?>
-<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
     android:id="@+id/bottomSheet"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    app:behavior_peekHeight="0dp"
-    app:behavior_skipCollapsed="true"
-    app:cardBackgroundColor="?android:attr/colorBackground"
-    app:cardCornerRadius="0dp"
-    app:cardElevation="8dp"
     app:layout_behavior="android.support.design.widget.BottomSheetBehavior"
+    app:behavior_hideable="false"
+    app:behavior_peekHeight="60dp"
     tools:context=".MainActivity">
 
-    <android.support.constraint.ConstraintLayout
+
+    <android.support.v7.widget.CardView
+        android:id="@+id/optionsView"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        tools:ignore="Overdraw"
-        tools:layout_editor_absoluteY="25dp">
+        app:cardBackgroundColor="?android:attr/colorBackground"
+        app:cardCornerRadius="0dp"
+        app:cardElevation="4dp">
 
-        <TextView
-            android:id="@+id/textView"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="16dp"
-            android:layout_marginLeft="16dp"
-            android:layout_marginTop="16dp"
-            android:text="@string/main_slim_options"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="parent" />
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="vertical">
 
-        <TextView
-            android:id="@+id/changeThemeText"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="32dp"
-            android:text="@string/main_options_change_theme"
-            android:textSize="24sp"
-            app:layout_constraintStart_toStartOf="@+id/deviceSettingsText"
-            app:layout_constraintTop_toBottomOf="@+id/deviceSettingsText" />
-
-        <TextView
-            android:id="@+id/settingsText"
-            android:layout_width="wrap_content"
-            android:layout_height="0dp"
-            android:layout_marginTop="32dp"
-            android:text="@string/main_options_home_screen_apps"
-            android:textSize="24sp"
-            app:layout_constraintStart_toStartOf="@+id/changeThemeText"
-            app:layout_constraintTop_toBottomOf="@+id/changeThemeText" />
-
-        <TextView
-            android:id="@+id/deviceSettingsText"
-            android:layout_width="wrap_content"
+            <View
+                android:id="@+id/view"
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:alpha="0.1"
+                android:background="?android:attr/colorForeground" />
+
+            <TextView
+                android:id="@+id/textView"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_margin="16dp"
+                android:text="@string/main_slim_options"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent" />
+
+            <TextView
+                android:id="@+id/deviceSettingsText"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_margin="16dp"
+                android:text="@string/main_options_settings"
+                android:textSize="24sp" />
+
+            <TextView
+                android:id="@+id/settingsText"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_margin="16dp"
+                android:text="@string/main_options_home_screen_apps"
+                android:textSize="24sp" />
+
+            <TextView
+                android:id="@+id/changeLauncherText"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_margin="16dp"
+                android:text="@string/main_options_change_launcher"
+                android:textSize="24sp" />
+
+            <TextView
+                android:id="@+id/rateAppText"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_margin="16dp"
+                android:text="@string/main_options_feedback"
+                android:textSize="24sp" />
+
+            <TextView
+                android:id="@+id/aboutText"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_margin="16dp"
+                android:text="@string/main_options_about_slim"
+                android:textSize="24sp" />
+
+        </LinearLayout>
+    </android.support.v7.widget.CardView>
+
+    <android.support.constraint.ConstraintLayout
+        android:id="@+id/linearLayout2"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:alpha="0.6">
+
+        <ImageView
+            android:id="@+id/ivCall"
+            android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_marginStart="32dp"
-            android:layout_marginLeft="32dp"
-            android:layout_marginTop="32dp"
-            android:text="@string/main_options_settings"
-            android:textSize="24sp"
+            android:layout_marginStart="8dp"
+            android:layout_marginLeft="8dp"
+            android:contentDescription="@string/main_call_icon"
+            android:padding="16dp"
             app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/textView" />
+            app:layout_constraintTop_toTopOf="parent"
+            app:srcCompat="@drawable/ic_call" />
 
-        <TextView
-            android:id="@+id/aboutText"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="32dp"
-            android:text="@string/main_options_about_slim"
-            android:textSize="24sp"
-            app:layout_constraintStart_toStartOf="@+id/settingsText"
-            app:layout_constraintTop_toBottomOf="@+id/settingsText" />
-
-        <TextView
-            android:id="@+id/rateAppText"
+        <ImageView
+            android:id="@+id/ivExpand"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginEnd="32dp"
-            android:layout_marginRight="32dp"
-            android:layout_marginBottom="24dp"
-            android:text="@string/main_options_feedback"
-            android:textSize="16sp"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintEnd_toEndOf="parent" />
-
-        <TextView
-            android:id="@+id/changeLauncherText"
+            android:layout_marginStart="8dp"
+            android:layout_marginLeft="8dp"
+            android:layout_marginEnd="8dp"
+            android:layout_marginRight="8dp"
+            android:contentDescription="@string/main_slim_options"
+            android:padding="16dp"
+            app:layout_constraintEnd_toStartOf="@+id/ivCamera"
+            app:layout_constraintStart_toEndOf="@+id/ivCall"
+            app:layout_constraintTop_toTopOf="parent"
+            app:srcCompat="@drawable/ic_expand" />
+
+        <ImageView
+            android:id="@+id/ivCamera"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginStart="32dp"
-            android:layout_marginLeft="32dp"
-            android:layout_marginBottom="24dp"
-            android:text="@string/main_options_change_launcher"
-            android:textSize="16sp"
-            app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintStart_toStartOf="parent" />
+            android:layout_marginEnd="8dp"
+            android:layout_marginRight="8dp"
+            android:contentDescription="@string/main_photo_camera_icon"
+            android:padding="16dp"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintTop_toTopOf="parent"
+            app:srcCompat="@drawable/ic_photo_camera" />
+    </android.support.constraint.ConstraintLayout>
 
 
-    </android.support.constraint.ConstraintLayout>
-</android.support.v7.widget.CardView>
+</FrameLayout>

+ 11 - 42
app/src/main/res/layout/main_content.xml

@@ -4,7 +4,8 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:id="@+id/main_content"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:background="?android:attr/colorBackground">
 
     <TextView
         android:id="@+id/clockTextView"
@@ -35,6 +36,7 @@
         android:layout_marginTop="32dp"
         android:layout_marginEnd="16dp"
         android:layout_marginRight="16dp"
+        android:visibility="invisible"
         app:layoutManager="android.support.v7.widget.LinearLayoutManager"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
@@ -42,46 +44,13 @@
         app:layout_constraintTop_toTopOf="parent"
         tools:listitem="@layout/main_list_item" />
 
-    <ImageView
-        android:id="@+id/ivExpand"
-        android:layout_width="50dp"
-        android:layout_height="50dp"
-        android:layout_marginStart="8dp"
-        android:layout_marginLeft="8dp"
-        android:layout_marginEnd="8dp"
-        android:layout_marginRight="8dp"
-        android:layout_marginBottom="8dp"
-        android:contentDescription="@string/content_description_expand_up"
-        android:padding="8dp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:srcCompat="@drawable/ic_expand" />
-
-    <ImageView
-        android:id="@+id/ivCall"
-        android:layout_width="50dp"
-        android:layout_height="50dp"
-        android:layout_marginStart="8dp"
-        android:layout_marginLeft="8dp"
-        android:layout_marginBottom="8dp"
-        android:padding="13dp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:srcCompat="@drawable/ic_call"
-        android:contentDescription="@string/main_call_icon" />
-
-    <ImageView
-        android:id="@+id/ivCamera"
-        android:layout_width="50dp"
-        android:layout_height="50dp"
-        android:layout_marginEnd="8dp"
-        android:layout_marginRight="8dp"
-        android:layout_marginBottom="8dp"
-        android:padding="13dp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:srcCompat="@drawable/ic_photo_camera"
-        android:contentDescription="@string/main_photo_camera_icon" />
+    <TextView
+        android:id="@+id/clockAmPm"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="16dp"
+        android:textSize="18sp"
+        app:layout_constraintStart_toEndOf="@+id/clockTextView"
+        app:layout_constraintTop_toTopOf="@+id/clockTextView" />
 
 </android.support.constraint.ConstraintLayout>

+ 103 - 21
app/src/main/res/layout/settings_fragment.xml

@@ -5,17 +5,17 @@
     android:id="@+id/frameLayout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:background="?android:attr/colorBackground"
     tools:context=".ui.main.SettingsFragment">
 
-    <!-- TODO: Update blank fragment layout -->
-
     <TextView
         android:id="@+id/textView3"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
+        android:layout_marginStart="16dp"
+        android:layout_marginLeft="16dp"
         android:layout_marginTop="32dp"
         android:text="@string/settings_title"
-        app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toTopOf="parent" />
 
@@ -24,12 +24,13 @@
         style="@style/Widget.AppCompat.Button.Borderless"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginEnd="24dp"
-        android:layout_marginRight="24dp"
-        android:layout_marginBottom="16dp"
+        android:layout_marginEnd="8dp"
+        android:layout_marginRight="8dp"
         android:text="@string/settings_button_add"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent" />
+        app:layout_constraintBottom_toBottomOf="@+id/textView8"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/textView8"
+        app:layout_constraintVertical_bias="0.31" />
 
     <android.support.v7.widget.RecyclerView
         android:id="@+id/settingsAppList"
@@ -37,28 +38,109 @@
         android:layout_height="0dp"
         android:layout_marginStart="16dp"
         android:layout_marginLeft="16dp"
-        android:layout_marginTop="32dp"
+        android:layout_marginTop="24dp"
         android:layout_marginEnd="16dp"
         android:layout_marginRight="16dp"
-        android:layout_marginBottom="64dp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/textView3"
+        app:layout_constraintTop_toBottomOf="@+id/textView8"
         tools:listitem="@layout/settings_apps_list_item" />
 
     <TextView
-        android:id="@+id/whyCantText"
+        android:id="@+id/textView2"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="32dp"
-        android:layout_marginLeft="32dp"
-        android:layout_marginBottom="24dp"
-        android:padding="4dp"
-        android:text="@string/settings_option_why"
-        android:textSize="16sp"
-        android:visibility="invisible"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintStart_toStartOf="parent" />
+        android:layout_marginStart="24dp"
+        android:layout_marginLeft="24dp"
+        android:layout_marginTop="24dp"
+        android:text="Use 24 hour clock"
+        android:textAppearance="@style/TextAppearance.AppCompat"
+        android:textSize="24sp"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/textView3" />
+
+    <android.support.v7.widget.AppCompatCheckBox
+        android:id="@+id/clockTypeChecker"
+        style="@style/Widget.AppCompat.CompoundButton.CheckBox"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="8dp"
+        android:layout_marginEnd="24dp"
+        android:layout_marginRight="24dp"
+        android:buttonTint="?android:colorForeground"
+        android:textAppearance="@style/TextAppearance.AppCompat"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/textView2" />
+
+    <TextView
+        android:id="@+id/textView4"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="Tap to check between 24 hour or 12 hour"
+        app:layout_constraintStart_toStartOf="@+id/textView2"
+        app:layout_constraintTop_toBottomOf="@+id/textView2" />
+
+    <View
+        android:id="@+id/divider"
+        android:layout_width="0dp"
+        android:layout_height="1dp"
+        android:layout_marginStart="16dp"
+        android:layout_marginLeft="16dp"
+        android:layout_marginTop="16dp"
+        android:layout_marginEnd="16dp"
+        android:layout_marginRight="16dp"
+        android:background="?android:attr/listDivider"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/textView4" />
+
+    <TextView
+        android:id="@+id/changeThemeText"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="24dp"
+        android:layout_marginLeft="24dp"
+        android:layout_marginTop="8dp"
+        android:text="@string/main_options_change_theme"
+        android:textAppearance="@style/TextAppearance.AppCompat"
+        android:textSize="24sp"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/divider" />
+
+    <TextView
+        android:id="@+id/textView7"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="Tap to change app theme"
+        app:layout_constraintStart_toStartOf="@+id/changeThemeText"
+        app:layout_constraintTop_toBottomOf="@+id/changeThemeText" />
+
+    <View
+        android:id="@+id/divider2"
+        android:layout_width="0dp"
+        android:layout_height="1dp"
+        android:layout_marginStart="16dp"
+        android:layout_marginLeft="16dp"
+        android:layout_marginTop="16dp"
+        android:layout_marginEnd="16dp"
+        android:layout_marginRight="16dp"
+        android:background="?android:attr/listDivider"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/textView7" />
+
+    <TextView
+        android:id="@+id/textView8"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="24dp"
+        android:layout_marginLeft="24dp"
+        android:layout_marginTop="16dp"
+        android:text="Home screen apps"
+        android:textAppearance="@style/TextAppearance.AppCompat"
+        android:textSize="24sp"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/divider2" />
 
 </android.support.constraint.ConstraintLayout>

+ 4 - 3
app/src/main/res/values/strings.xml

@@ -15,13 +15,13 @@
     <string name="prefs_settings_key_theme">key_theme</string>
     <string name="main_slim_options">Slim options</string>
     <string name="main_options_change_theme">Change theme</string>
-    <string name="main_options_home_screen_apps">Home screen apps</string>
+    <string name="main_options_home_screen_apps">Home screen settings</string>
     <string name="main_options_settings">Settings</string>
     <string name="main_options_about_slim">About Slim</string>
-    <string name="main_options_feedback">Feedback</string>
+    <string name="main_options_feedback">Rate the app</string>
     <string name="main_options_change_launcher">Change launcher</string>
     <string name="settings_item_button_remove">remove</string>
-    <string name="settings_title">Home screen apps</string>
+    <string name="settings_title">Home screen settings</string>
     <string name="settings_button_add">Add</string>
     <string name="settings_option_why">Why can\'t I add more?</string>
     <string name="about_title">Slim launcher</string>
@@ -59,5 +59,6 @@
     <string name="theme_chooser_dialog_title">Change theme</string>
     <string name="main_call_icon">call icon</string>
     <string name="main_photo_camera_icon">photo camera icon</string>
+    <string name="prefs_settings_key_clocktype">clock_type</string>
 
 </resources>