Bladeren bron

chore: Created serious looking dialogs

beautusg 7 jaren geleden
bovenliggende
commit
9cf35e1c9c

+ 36 - 0
app/src/main/java/com/sduduzog/slimlauncher/dialogs/ChangeThemeDialog.kt

@@ -0,0 +1,36 @@
+package com.sduduzog.slimlauncher.dialogs
+
+import android.app.AlertDialog
+import android.app.Dialog
+import android.content.Context.MODE_PRIVATE
+import android.content.SharedPreferences
+import android.os.Bundle
+import androidx.core.content.edit
+import androidx.fragment.app.DialogFragment
+import com.sduduzog.slimlauncher.R
+
+class ChangeThemeDialog : DialogFragment(){
+
+    private lateinit var settings: SharedPreferences
+
+    override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
+        val builder = AlertDialog.Builder(context!!)
+        settings  = context!!.getSharedPreferences(getString(R.string.prefs_settings), MODE_PRIVATE)
+
+        val active = settings.getInt(getString(R.string.prefs_settings_key_theme), 0)
+        builder.setTitle(R.string.choose_theme_dialog_title)
+        builder.setSingleChoiceItems(R.array.themes_array, active) { dialogInterface, i ->
+            dialogInterface.dismiss()
+            settings.edit {
+                putInt(getString(R.string.prefs_settings_key_theme), i)
+            }
+        }
+        return builder.create()
+    }
+
+    companion object {
+        fun getThemeChooser(): ChangeThemeDialog{
+            return ChangeThemeDialog()
+        }
+    }
+}

+ 40 - 0
app/src/main/java/com/sduduzog/slimlauncher/dialogs/ChooseTimeFormatDialog.kt

@@ -0,0 +1,40 @@
+package com.sduduzog.slimlauncher.dialogs
+
+import android.app.AlertDialog
+import android.app.Dialog
+import android.content.Context.MODE_PRIVATE
+import android.content.SharedPreferences
+import android.os.Bundle
+import androidx.core.content.edit
+import androidx.fragment.app.DialogFragment
+import com.sduduzog.slimlauncher.R
+
+class ChooseTimeFormatDialog : DialogFragment(){
+
+    private lateinit var settings: SharedPreferences
+
+    override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
+        val builder = AlertDialog.Builder(context!!)
+        settings = context!!.getSharedPreferences(getString(R.string.prefs_settings), MODE_PRIVATE)
+
+        val is24Hour = settings.getBoolean(getString(R.string.prefs_settings_key_time_format), true)
+        val index = if (is24Hour) 1 else 0
+        builder.setTitle(R.string.choose_time_format_dialog_title)
+        builder.setSingleChoiceItems(R.array.time_format_array, index) {dialogInterface, i ->
+            dialogInterface.dismiss()
+            settings.edit {
+                val b = i != 0
+                putBoolean(getString(R.string.prefs_settings_key_time_format), b)
+            }
+
+        }
+        return builder.create()
+    }
+
+
+    companion object {
+        fun getInstance(): ChooseTimeFormatDialog{
+            return ChooseTimeFormatDialog()
+        }
+    }
+}

+ 11 - 0
app/src/main/java/com/sduduzog/slimlauncher/ui/BaseFragment.kt

@@ -1,9 +1,11 @@
 package com.sduduzog.slimlauncher.ui
 
+import android.content.Intent
 import android.os.Build
 import android.util.TypedValue
 import android.view.View
 import androidx.appcompat.app.AppCompatActivity
+import androidx.core.app.ActivityOptionsCompat
 import androidx.fragment.app.Fragment
 import com.sduduzog.slimlauncher.R
 
@@ -32,4 +34,13 @@ abstract class BaseFragment: Fragment() {
             activity!!.window.statusBarColor = value.data
         }
     }
+
+    protected fun launchActivity(view: View, intent: Intent){
+        val left = 0
+        val top = 0
+        val width = view.measuredWidth
+        val height = view.measuredHeight
+        val opts = ActivityOptionsCompat.makeClipRevealAnimation(view, left, top, width, height)
+        startActivity(intent, opts.toBundle())
+    }
 }

+ 20 - 0
app/src/main/java/com/sduduzog/slimlauncher/ui/main/HomeFragment.kt

@@ -0,0 +1,20 @@
+package com.sduduzog.slimlauncher.ui.main
+
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.widget.TextView
+import com.sduduzog.slimlauncher.R
+import com.sduduzog.slimlauncher.ui.BaseFragment
+
+class HomeFragment: BaseFragment() {
+
+    override fun getFragmentView(): View {
+        return TextView(context)
+    }
+
+    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
+        return inflater.inflate(R.layout.home_fragment, container, false)
+    }
+}

+ 19 - 24
app/src/main/java/com/sduduzog/slimlauncher/ui/main/MainFragment.kt

@@ -13,7 +13,7 @@ import androidx.navigation.Navigation
 import com.sduduzog.slimlauncher.MainActivity
 import com.sduduzog.slimlauncher.R
 import com.sduduzog.slimlauncher.ui.BaseFragment
-import kotlinx.android.synthetic.main.main_fragment2.*
+import kotlinx.android.synthetic.main.home_fragment.*
 import java.text.SimpleDateFormat
 import java.util.*
 
@@ -24,15 +24,15 @@ class MainFragment : BaseFragment(), MainActivity.OnBackPressedListener {
 
     override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
                               savedInstanceState: Bundle?): View {
-        return inflater.inflate(R.layout.main_fragment2, container, false)
+        return inflater.inflate(R.layout.home_fragment, container, false)
     }
 
     override fun onActivityCreated(savedInstanceState: Bundle?) {
         super.onActivityCreated(savedInstanceState)
-        main_fragment_list.adapter = HomeAppsAdapter(this)
+        home_fragment_list.adapter = HomeAppsAdapter(this)
         setEventListeners()
 
-        main_fragment_options.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_mainFragment_to_optionsFragment))
+        home_fragment_options.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_mainFragment_to_optionsFragment))
     }
 
     override fun onStart() {
@@ -79,7 +79,7 @@ class MainFragment : BaseFragment(), MainActivity.OnBackPressedListener {
     private fun setEventListeners() {
 
 
-        main_fragment_time.setOnClickListener {
+        home_fragment_time.setOnClickListener {
             if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
                 try {
                     val intent = Intent(AlarmClock.ACTION_SHOW_ALARMS)
@@ -97,7 +97,7 @@ class MainFragment : BaseFragment(), MainActivity.OnBackPressedListener {
             }
         }
 
-        main_fragment_date.setOnClickListener {
+        home_fragment_date.setOnClickListener {
             try {
                 val intent = Intent(Intent.ACTION_MAIN)
                 intent.addCategory(Intent.CATEGORY_APP_CALENDAR)
@@ -113,7 +113,7 @@ class MainFragment : BaseFragment(), MainActivity.OnBackPressedListener {
             }
         }
 
-        main_fragment_call.setOnClickListener {
+        home_fragment_call.setOnClickListener {
             try {
                 val intent = Intent(Intent.ACTION_DIAL)
                 val left = 0
@@ -127,15 +127,10 @@ class MainFragment : BaseFragment(), MainActivity.OnBackPressedListener {
             }
         }
 
-        main_fragment_camera.setOnClickListener {
+        home_fragment_camera.setOnClickListener {
             try {
                 val intent = Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA)
-                val left = 0
-                val top = 0
-                val width = it.measuredWidth
-                val height = it.measuredHeight
-                val opts = ActivityOptionsCompat.makeClipRevealAnimation(it, left, top, width, height)
-                startActivity(intent, opts.toBundle())
+                launchActivity(it, intent)
             } catch (e: Exception) {
                 // Do nothing
             }
@@ -144,21 +139,21 @@ class MainFragment : BaseFragment(), MainActivity.OnBackPressedListener {
 
     fun updateUi() {
         val twenty4Hour = context?.getSharedPreferences(getString(R.string.prefs_settings), Context.MODE_PRIVATE)
-                ?.getBoolean(getString(R.string.prefs_settings_key_clock_type), false)
+                ?.getBoolean(getString(R.string.prefs_settings_key_time_format), true)
         val date = Date()
         if (twenty4Hour as Boolean) {
-            val fWatchTime = SimpleDateFormat("HH:mm", Locale.ENGLISH)
-            main_fragment_time.text = fWatchTime.format(date)
-            main_fragment_time_format.visibility = View.GONE
-        } else {
-            val fWatchTime = SimpleDateFormat("hh:mm", Locale.ENGLISH)
+            val fWatchTime = SimpleDateFormat("h:mm", Locale.ENGLISH)
             val fWatchTimeAP = SimpleDateFormat("aa", Locale.ENGLISH)
-            main_fragment_time.text = fWatchTime.format(date)
-            main_fragment_time_format.text = fWatchTimeAP.format(date)
-            main_fragment_time_format.visibility = View.VISIBLE
+            home_fragment_time.text = fWatchTime.format(date)
+            home_fragment_time_format.text = fWatchTimeAP.format(date)
+            home_fragment_time_format.visibility = View.VISIBLE
+        } else {
+            val fWatchTime = SimpleDateFormat("H:mm", Locale.ENGLISH)
+            home_fragment_time.text = fWatchTime.format(date)
+            home_fragment_time_format.visibility = View.GONE
         }
         val fWatchDate = SimpleDateFormat("EEE, MMM dd", Locale.ENGLISH)
-        main_fragment_date.text = fWatchDate.format(date)
+        home_fragment_date.text = fWatchDate.format(date)
     }
 
 

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

@@ -83,10 +83,10 @@ class SettingsFragment : StatusBarThemeFragment() {
 
     private fun initComponents() {
         val settings = context!!.getSharedPreferences(getString(R.string.prefs_settings), MODE_PRIVATE)
-        clockSwitch.isChecked = settings.getBoolean(getString(R.string.prefs_settings_key_clock_type), false)
+        clockSwitch.isChecked = settings.getBoolean(getString(R.string.prefs_settings_key_time_format), false)
         clockSwitch.setOnCheckedChangeListener { _, b ->
             settings.edit {
-                putBoolean(getString(R.string.prefs_settings_key_clock_type), b)
+                putBoolean(getString(R.string.prefs_settings_key_time_format), b)
             }
         }
 

+ 1 - 1
app/src/main/java/com/sduduzog/slimlauncher/ui/main/settings/ThemeChooserDialog.kt

@@ -17,7 +17,7 @@ class ThemeChooserDialog : DialogFragment() {
         val builder = AlertDialog.Builder(context!!)
         settings = context!!.getSharedPreferences(getString(R.string.prefs_settings), MODE_PRIVATE)
         val active = settings.getInt(getString(R.string.prefs_settings_key_theme), 0)
-        builder.setTitle(R.string.theme_chooser_dialog_title)
+        builder.setTitle(R.string.choose_theme_dialog_title)
         builder.setSingleChoiceItems(R.array.themes_array, active) { dialogInterface, i ->
             dialogInterface.dismiss()
             settings.edit {

+ 10 - 0
app/src/main/java/com/sduduzog/slimlauncher/ui/options/OptionsFragment.kt

@@ -6,6 +6,8 @@ import android.view.View
 import android.view.ViewGroup
 import androidx.navigation.Navigation
 import com.sduduzog.slimlauncher.R
+import com.sduduzog.slimlauncher.dialogs.ChangeThemeDialog
+import com.sduduzog.slimlauncher.dialogs.ChooseTimeFormatDialog
 import com.sduduzog.slimlauncher.ui.BaseFragment
 import kotlinx.android.synthetic.main.options_fragment.*
 
@@ -19,5 +21,13 @@ class OptionsFragment : BaseFragment() {
     override fun onActivityCreated(savedInstanceState: Bundle?) {
         super.onActivityCreated(savedInstanceState)
         options_fragment_customise_apps.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_optionsFragment_to_customiseAppsFragment))
+        options_fragment_change_theme.setOnClickListener {
+            val changeThemeDialog = ChangeThemeDialog.getThemeChooser()
+            changeThemeDialog.showNow(fragmentManager, "THEME_CHOOSER")
+        }
+        options_fragment_choose_time_format.setOnClickListener {
+            val chooseTimeFormatDialog = ChooseTimeFormatDialog.getInstance()
+            chooseTimeFormatDialog.showNow(fragmentManager, "TIME_FORMAT_CHOOSER")
+        }
     }
 }

+ 14 - 12
app/src/main/res/layout/main_fragment2.xml → app/src/main/res/layout/home_fragment.xml

@@ -5,11 +5,11 @@
     android:id="@+id/main_fragment2"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    app:layoutDescription="@xml/main_motion_scene"
+    app:layoutDescription="@xml/home_motion_scene"
     tools:showPaths="true">
 
     <TextView
-        android:id="@+id/main_fragment_time"
+        android:id="@+id/home_fragment_time"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginTop="@dimen/_64sdp"
@@ -18,7 +18,7 @@
         android:textSize="@dimen/_40ssp" />
 
     <TextView
-        android:id="@+id/main_fragment_time_format"
+        android:id="@+id/home_fragment_time_format"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginTop="16dp"
@@ -26,7 +26,7 @@
         android:textSize="@dimen/_13sdp" />
 
     <TextView
-        android:id="@+id/main_fragment_date"
+        android:id="@+id/home_fragment_date"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:padding="@dimen/_4sdp"
@@ -35,15 +35,15 @@
         android:textSize="@dimen/_12sdp" />
 
     <androidx.recyclerview.widget.RecyclerView
-        android:id="@+id/main_fragment_list"
+        android:id="@+id/home_fragment_list"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
-        tools:itemCount="1"
+        tools:itemCount="4"
         tools:listitem="@layout/main_fragment_list_item" />
 
     <androidx.recyclerview.widget.RecyclerView
-        android:id="@+id/main_fragment_list_exp"
+        android:id="@+id/home_fragment_list_exp"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
@@ -51,7 +51,7 @@
         tools:listitem="@layout/main_fragment_list_item" />
 
     <TextView
-        android:id="@+id/main_fragment_options"
+        android:id="@+id/home_fragment_options"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:padding="@dimen/_8sdp"
@@ -60,16 +60,18 @@
         android:textSize="@dimen/_18ssp" />
 
     <TextView
-        android:id="@+id/main_fragment_notes"
+        android:id="@+id/home_fragment_notes"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:padding="8dp"
         android:text="@string/main_fragment_notes"
         android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="18sp" />
+        android:textSize="18sp"
+        tools:layout_editor_absoluteX="240dp"
+        tools:layout_editor_absoluteY="618dp" />
 
     <ImageView
-        android:id="@+id/main_fragment_call"
+        android:id="@+id/home_fragment_call"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:padding="@dimen/_8sdp"
@@ -77,7 +79,7 @@
         tools:ignore="ContentDescription" />
 
     <ImageView
-        android:id="@+id/main_fragment_camera"
+        android:id="@+id/home_fragment_camera"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:padding="@dimen/_8sdp"

+ 26 - 22
app/src/main/res/layout/main_motion_end.xml → app/src/main/res/layout/home_motion_end.xml

@@ -7,29 +7,29 @@
     android:layout_height="match_parent">
 
     <TextView
-        android:id="@+id/main_fragment_time"
+        android:id="@+id/home_fragment_time"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:alpha="0"
         android:text="@string/main_placeholder_clock"
         android:textSize="@dimen/_40ssp"
-        app:layout_constraintBottom_toTopOf="@+id/main_fragment_date"
+        app:layout_constraintBottom_toTopOf="@+id/home_fragment_date"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintHorizontal_bias="0.5"
         app:layout_constraintStart_toStartOf="parent" />
 
     <TextView
-        android:id="@+id/main_fragment_time_format"
+        android:id="@+id/home_fragment_time_format"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginTop="16dp"
         android:alpha="0"
         android:textSize="@dimen/_13sdp"
-        app:layout_constraintStart_toEndOf="@+id/main_fragment_time"
-        app:layout_constraintTop_toTopOf="@+id/main_fragment_time" />
+        app:layout_constraintStart_toEndOf="@+id/home_fragment_time"
+        app:layout_constraintTop_toTopOf="@+id/home_fragment_time" />
 
     <TextView
-        android:id="@+id/main_fragment_date"
+        android:id="@+id/home_fragment_date"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:alpha="0"
@@ -37,69 +37,73 @@
         android:text="@string/main_placeholder_date"
         android:textSize="@dimen/_12sdp"
         app:layout_constraintBottom_toTopOf="parent"
-        app:layout_constraintEnd_toEndOf="@+id/main_fragment_time"
-        app:layout_constraintStart_toStartOf="@+id/main_fragment_time" />
+        app:layout_constraintEnd_toEndOf="@+id/home_fragment_time"
+        app:layout_constraintStart_toStartOf="@+id/home_fragment_time" />
 
     <androidx.recyclerview.widget.RecyclerView
-        android:id="@+id/main_fragment_list"
+        android:id="@+id/home_fragment_list"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_marginStart="16dp"
         android:layout_marginLeft="16dp"
         android:layout_marginEnd="16dp"
         android:layout_marginRight="16dp"
-        app:layout_constraintBottom_toTopOf="@+id/main_fragment_list_exp"
+        app:layout_constraintBottom_toTopOf="@+id/home_fragment_list_exp"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintHorizontal_bias="0.5"
         app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/main_fragment_date"
+        app:layout_constraintTop_toBottomOf="@+id/home_fragment_date"
         app:layout_constraintVertical_chainStyle="packed"
         tools:itemCount="4"
         tools:listitem="@layout/main_fragment_list_item" />
 
     <androidx.recyclerview.widget.RecyclerView
-        android:id="@+id/main_fragment_list_exp"
+        android:id="@+id/home_fragment_list_exp"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_marginStart="16dp"
         android:layout_marginLeft="16dp"
         android:layout_marginEnd="16dp"
         android:layout_marginRight="16dp"
-        android:layout_marginBottom="8dp"
+        android:layout_marginBottom="32dp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintHorizontal_bias="0.5"
         app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/main_fragment_list"
+        app:layout_constraintTop_toBottomOf="@+id/home_fragment_list"
         tools:itemCount="3"
         tools:listitem="@layout/main_fragment_list_item" />
 
     <TextView
-        android:id="@+id/main_fragment_options"
+        android:id="@+id/home_fragment_options"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginBottom="8dp"
+        android:layout_marginStart="16dp"
+        android:layout_marginLeft="16dp"
+        android:layout_marginBottom="16dp"
         android:padding="8dp"
         android:text="@string/main_fragment_options"
         android:textAppearance="@style/TextAppearance.AppCompat"
         android:textSize="18sp"
         app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintStart_toStartOf="@+id/main_fragment_list_exp" />
+        app:layout_constraintStart_toStartOf="@+id/home_fragment_list_exp" />
 
     <TextView
-        android:id="@+id/main_fragment_notes"
+        android:id="@+id/home_fragment_notes"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginBottom="8dp"
+        android:layout_marginEnd="16dp"
+        android:layout_marginRight="16dp"
+        android:layout_marginBottom="16dp"
         android:padding="8dp"
         android:text="@string/main_fragment_notes"
         android:textAppearance="@style/TextAppearance.AppCompat"
         android:textSize="18sp"
         app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="@+id/main_fragment_list_exp" />
+        app:layout_constraintEnd_toEndOf="@+id/home_fragment_list_exp" />
 
     <ImageView
-        android:id="@+id/main_fragment_call"
+        android:id="@+id/home_fragment_call"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:padding="8dp"
@@ -111,7 +115,7 @@
         tools:ignore="ContentDescription" />
 
     <ImageView
-        android:id="@+id/main_fragment_camera"
+        android:id="@+id/home_fragment_camera"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:padding="8dp"

+ 22 - 21
app/src/main/res/layout/main_motion_start.xml → app/src/main/res/layout/home_motion_start.xml

@@ -7,7 +7,7 @@
     android:layout_height="match_parent">
 
     <TextView
-        android:id="@+id/main_fragment_time"
+        android:id="@+id/home_fragment_time"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginTop="@dimen/_64sdp"
@@ -20,29 +20,29 @@
         app:layout_constraintTop_toTopOf="parent" />
 
     <TextView
-        android:id="@+id/main_fragment_time_format"
+        android:id="@+id/home_fragment_time_format"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginTop="@dimen/_16sdp"
         android:textAppearance="@style/TextAppearance.AppCompat"
         android:textSize="@dimen/_13sdp"
-        app:layout_constraintStart_toEndOf="@+id/main_fragment_time"
-        app:layout_constraintTop_toTopOf="@+id/main_fragment_time" />
+        app:layout_constraintStart_toEndOf="@+id/home_fragment_time"
+        app:layout_constraintTop_toTopOf="@+id/home_fragment_time" />
 
     <TextView
-        android:id="@+id/main_fragment_date"
+        android:id="@+id/home_fragment_date"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:padding="@dimen/_4sdp"
         android:text="@string/main_placeholder_date"
         android:textAppearance="@style/TextAppearance.AppCompat"
         android:textSize="@dimen/_12sdp"
-        app:layout_constraintEnd_toEndOf="@+id/main_fragment_time"
-        app:layout_constraintStart_toStartOf="@+id/main_fragment_time"
-        app:layout_constraintTop_toBottomOf="@+id/main_fragment_time" />
+        app:layout_constraintEnd_toEndOf="@+id/home_fragment_time"
+        app:layout_constraintStart_toStartOf="@+id/home_fragment_time"
+        app:layout_constraintTop_toBottomOf="@+id/home_fragment_time" />
 
     <androidx.recyclerview.widget.RecyclerView
-        android:id="@+id/main_fragment_list"
+        android:id="@+id/home_fragment_list"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_marginStart="16dp"
@@ -55,13 +55,13 @@
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintHorizontal_bias="0.0"
         app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="@+id/main_fragment_time"
+        app:layout_constraintTop_toTopOf="@+id/home_fragment_time"
         app:layout_constraintVertical_bias="0.494"
-        tools:itemCount="5"
+        tools:itemCount="4"
         tools:listitem="@layout/main_fragment_list_item" />
 
     <androidx.recyclerview.widget.RecyclerView
-        android:id="@+id/main_fragment_list_exp"
+        android:id="@+id/home_fragment_list_exp"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_marginStart="16dp"
@@ -78,7 +78,7 @@
         tools:listitem="@layout/main_fragment_list_item" />
 
     <TextView
-        android:id="@+id/main_fragment_options"
+        android:id="@+id/home_fragment_options"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:padding="@dimen/_8sdp"
@@ -86,10 +86,11 @@
         android:textAppearance="@style/TextAppearance.AppCompat"
         android:textSize="@dimen/_18ssp"
         app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintStart_toStartOf="@+id/main_fragment_list_exp"
-        app:layout_constraintTop_toBottomOf="@+id/main_fragment_list_exp" />
-<TextView
-        android:id="@+id/main_fragment_notes"
+        app:layout_constraintStart_toStartOf="@+id/home_fragment_list_exp"
+        app:layout_constraintTop_toBottomOf="@+id/home_fragment_list_exp" />
+
+    <TextView
+        android:id="@+id/home_fragment_notes"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:padding="8dp"
@@ -97,10 +98,10 @@
         android:textAppearance="@style/TextAppearance.AppCompat"
         android:textSize="18sp"
         app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="@+id/main_fragment_list_exp"
-        app:layout_constraintTop_toBottomOf="@+id/main_fragment_list_exp" />
+        app:layout_constraintEnd_toEndOf="@+id/home_fragment_list_exp"
+        app:layout_constraintTop_toBottomOf="@+id/home_fragment_list_exp" />
     <ImageView
-        android:id="@+id/main_fragment_call"
+        android:id="@+id/home_fragment_call"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginStart="8dp"
@@ -113,7 +114,7 @@
         tools:ignore="ContentDescription" />
 
     <ImageView
-        android:id="@+id/main_fragment_camera"
+        android:id="@+id/home_fragment_camera"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginEnd="8dp"

+ 8 - 2
app/src/main/res/values/strings.xml

@@ -12,9 +12,14 @@
         <item>Pastel</item>
     </string-array>
 
+    <string-array name="time_format_array">
+        <item>24 Hour</item>
+        <item>12 Hour</item>
+    </string-array>
+
     <string name="prefs_settings">settings</string>
     <string name="prefs_settings_key_theme">key_theme</string>
-    <string name="prefs_settings_key_clock_type">clock_type</string>
+    <string name="prefs_settings_key_time_format">clock_type</string>
     <string name="prefs_settings_key_hide_status_bar">hide_status_bar</string>
     <string name="prefs_settings_key_fresh_install_setup">key_fresh_install_setup</string>
 
@@ -56,7 +61,7 @@
     To become a beta tester <a href="https://play.google.com/apps/testing/com.sduduzog.slimlauncher">click here</a>\n\n
     <a href="https://github.com/sduduzog/slim-launcher/issues/new">Report a bug</a>
     </string>
-    <string name="theme_chooser_dialog_title">Change theme</string>
+    <string name="choose_theme_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="setup_button_start">start</string>
@@ -65,6 +70,7 @@
 
     <string name="no_app_selected_toast_msg">Choose at least one app</string>
     <string name="choose_apps_title">Choose Apps</string>
+    <string name="choose_time_format_dialog_title">Choose Time Format</string>
 
 
     <string name="notes_date_placeholder">Edited at %s</string>

+ 3 - 3
app/src/main/res/xml/main_motion_scene.xml → app/src/main/res/xml/home_motion_scene.xml

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
 <MotionScene xmlns:motion="http://schemas.android.com/apk/res-auto">
     <Transition
-        motion:constraintSetEnd="@layout/main_motion_end"
-        motion:constraintSetStart="@layout/main_motion_start"
+        motion:constraintSetEnd="@layout/home_motion_end"
+        motion:constraintSetStart="@layout/home_motion_start"
         motion:duration="250">
         <OnSwipe
-            motion:touchAnchorId="@+id/main_fragment_date"
+            motion:touchAnchorId="@+id/home_fragment_date"
             motion:dragDirection="dragUp"
             motion:touchAnchorSide="bottom" />
     </Transition>