فهرست منبع

Brought back bottomsheet

sduduzog 7 سال پیش
والد
کامیت
c0c0ea5198

+ 0 - 1
app/build.gradle

@@ -25,7 +25,6 @@ android {
         debug {
             minifyEnabled false
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
-            applicationIdSuffix ".debug"
         }
     }
 }

+ 1 - 0
app/src/main/AndroidManifest.xml

@@ -4,6 +4,7 @@
     package="com.sduduzog.slimlauncher">
 
     <uses-permission android:name="com.android.alarm.permission.SET_ALARM" />
+    <uses-permission android:name="android.permission.CALL_PHONE"/>
 
     <application
         android:allowBackup="false"

+ 22 - 2
app/src/main/java/com/sduduzog/slimlauncher/MainActivity.kt

@@ -1,10 +1,11 @@
 package com.sduduzog.slimlauncher
 
-import androidx.lifecycle.ViewModelProviders
 import android.content.SharedPreferences
+import android.content.pm.PackageManager
 import android.content.res.Resources
 import android.os.Bundle
 import androidx.appcompat.app.AppCompatActivity
+import androidx.lifecycle.ViewModelProviders
 import androidx.navigation.NavController
 import androidx.navigation.NavDestination
 import androidx.navigation.Navigation.findNavController
@@ -59,6 +60,22 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
         currentLabel = destination.label.toString()
     }
 
+    override fun onRequestPermissionsResult(requestCode: Int,
+                                            permissions: Array<String>, grantResults: IntArray) {
+        when (requestCode) {
+            REQUEST_PHONE_CALL -> {
+                // If request is cancelled, the result arrays are empty.
+                if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+                    navigator.navigate(R.id.action_mainFragment_to_dialerFragment)
+                } else {
+                // Do nothing
+                }
+                return
+            }
+        }// other 'case' lines to check for other
+        // permissions this app might request
+    }
+
     companion object {
         fun resolveTheme(i: Int): Int {
             when (i) {
@@ -80,8 +97,11 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
             }
             return R.style.AppTheme
         }
+
+        const val REQUEST_PHONE_CALL = 1
     }
-    interface OnBackPressedListener{
+
+    interface OnBackPressedListener {
         fun onBackPressed()
     }
 }

+ 86 - 0
app/src/main/java/com/sduduzog/slimlauncher/ui/main/DialerFragment.kt

@@ -0,0 +1,86 @@
+package com.sduduzog.slimlauncher.ui.main
+
+
+import android.content.Intent
+import android.net.Uri
+import android.os.Bundle
+import android.util.Log
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.fragment.app.Fragment
+import com.sduduzog.slimlauncher.R
+import kotlinx.android.synthetic.main.dialer_fragment.*
+
+
+class DialerFragment : Fragment(), View.OnClickListener {
+
+    @Suppress("PropertyName")
+    val TAG: String = "DialerFragment"
+
+    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
+                              savedInstanceState: Bundle?): View? {
+        // Inflate the layout for this fragment
+        return inflater.inflate(R.layout.dialer_fragment, container, false)
+    }
+
+    override fun onActivityCreated(savedInstanceState: Bundle?) {
+        super.onActivityCreated(savedInstanceState)
+        editText2.showSoftInputOnFocus = false
+        setupDialer()
+        chevron.setOnClickListener {
+            val index = editText2.selectionStart
+            if (index != 0) {
+                editText2.text.delete(editText2.selectionStart - 1, editText2.selectionEnd)
+            }
+            if (index == 1) chevron.visibility = View.INVISIBLE
+        }
+        chevron.setOnLongClickListener {
+            editText2.text.clear()
+            chevron.visibility = View.INVISIBLE
+            true
+        }
+
+        fab_dialer.setOnClickListener {
+            val number = editText2.text.toString()
+            if (number.isEmpty()) return@setOnClickListener
+            try {
+                val i = Intent(Intent.ACTION_CALL)
+                i.data = Uri.parse("tel:${Uri.encode(number)}")
+                startActivity(i)
+            } catch (e: Exception) {
+                Log.e(TAG, "$e")
+            }
+        }
+    }
+
+    override fun onPause() {
+        super.onPause()
+        editText2.text.clear()
+    }
+
+    private fun setupDialer() {
+        dial_one.setOnClickListener(this)
+        dial_two.setOnClickListener(this)
+        dial_three.setOnClickListener(this)
+        dial_four.setOnClickListener(this)
+        dial_five.setOnClickListener(this)
+        dial_six.setOnClickListener(this)
+        dial_seven.setOnClickListener(this)
+        dial_eight.setOnClickListener(this)
+        dial_nine.setOnClickListener(this)
+        dial_star.setOnClickListener(this)
+        dial_zero.setOnClickListener(this)
+        dial_hash.setOnClickListener(this)
+    }
+
+    override fun onClick(view: View) {
+        val value = view.tag as String
+
+        val index = editText2.selectionEnd
+
+        chevron.visibility = View.VISIBLE
+
+        editText2.text.insert(index, value)
+    }
+}

+ 105 - 16
app/src/main/java/com/sduduzog/slimlauncher/ui/main/MainFragment.kt

@@ -1,24 +1,31 @@
 package com.sduduzog.slimlauncher.ui.main
 
 import android.animation.ObjectAnimator
-import android.content.BroadcastReceiver
-import android.content.Context
-import android.content.Intent
-import android.content.IntentFilter
+import android.content.*
+import android.content.pm.PackageManager
+import android.net.Uri
 import android.os.Bundle
 import android.provider.AlarmClock
 import android.provider.MediaStore
+import android.provider.Settings
 import android.util.Log
 import android.view.LayoutInflater
 import android.view.View
 import android.view.ViewGroup
+import android.widget.FrameLayout
+import androidx.core.app.ActivityCompat
+import androidx.core.content.ContextCompat
 import androidx.fragment.app.Fragment
 import androidx.navigation.Navigation
 import com.daasuu.ei.Ease
 import com.daasuu.ei.EasingInterpolator
+import com.google.android.material.bottomsheet.BottomSheetBehavior
+import com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_COLLAPSED
+import com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_EXPANDED
 import com.sduduzog.slimlauncher.MainActivity
 import com.sduduzog.slimlauncher.R
-import kotlinx.android.synthetic.main.main_fragment.*
+import kotlinx.android.synthetic.main.main_bottom_sheet.*
+import kotlinx.android.synthetic.main.main_content.*
 import java.text.SimpleDateFormat
 import java.util.*
 
@@ -29,6 +36,7 @@ class MainFragment : Fragment() {
     val TAG: String = "MainFragment"
 
     private lateinit var receiver: BroadcastReceiver
+    private lateinit var sheetBehavior: BottomSheetBehavior<FrameLayout>
 
     override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
                               savedInstanceState: Bundle?): View {
@@ -38,14 +46,17 @@ class MainFragment : Fragment() {
     override fun onActivityCreated(savedInstanceState: Bundle?) {
         super.onActivityCreated(savedInstanceState)
         mainAppsList.adapter = HomeAppsAdapter(this)
+        sheetBehavior = BottomSheetBehavior.from(bottomSheet)
+        optionsView.alpha = 0.0f
         setEventListeners()
+        setupBottomSheet()
     }
 
     override fun onStart() {
         super.onStart()
         receiver = ClockReceiver()
         activity?.registerReceiver(receiver, IntentFilter(Intent.ACTION_TIME_TICK))
-
+        sheetBehavior.state = STATE_COLLAPSED
         doBounceAnimation(ivExpand)
     }
 
@@ -60,6 +71,7 @@ class MainFragment : Fragment() {
         with(context as MainActivity) {
             this.onBackPressedListener = object : MainActivity.OnBackPressedListener {
                 override fun onBackPressed() {
+                    sheetBehavior.state = STATE_COLLAPSED
                 }
             }
         }
@@ -82,19 +94,37 @@ class MainFragment : Fragment() {
         }
 
         buttonNotes.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_mainFragment_to_notesListFragment))
-
-        buttonDialer.setOnClickListener {
-            try {
-                val intent = Intent(Intent.ACTION_DIAL)
-                startActivity(intent)
-            } catch (e: Exception) {
-                Log.e(TAG, e.message)
+        val settings = context!!.getSharedPreferences(getString(R.string.prefs_settings), Context.MODE_PRIVATE)
+        val isChecked = settings.getBoolean(getString(R.string.prefs_settings_key_app_dialer), false)
+        ivCall.setOnClickListener {
+            if (isChecked) {
+                getCallingPermission()
+            } else {
+                try {
+                    val intent = Intent(Intent.ACTION_DIAL)
+                    startActivity(intent)
+                } catch (e: Exception) {
+                    Log.e(TAG, e.message)
+                }
             }
         }
+        ivCall.setOnLongClickListener {
+            if (isChecked) {
+                try {
+                    val intent = Intent(Intent.ACTION_MAIN)
+                    intent.addCategory(Intent.CATEGORY_APP_CONTACTS)
+                    startActivity(intent)
+                } catch (e: ActivityNotFoundException) {
+                    Log.e(TAG, "$e")
+                }
+            }
+            true
+        }
+        ivExpand.setOnClickListener {
+            if (sheetBehavior.state == STATE_COLLAPSED) sheetBehavior.state = STATE_EXPANDED
+        }
 
-        ivExpand.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_openOptionsFragment))
-
-        buttonCamera.setOnClickListener {
+        ivCamera.setOnClickListener {
             try {
                 val intent = Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA)
                 startActivity(intent)
@@ -102,9 +132,56 @@ class MainFragment : Fragment() {
                 Log.e(TAG, e.message)
             }
         }
+
+        bottomSheet.setOnClickListener {
+
+        }
+        sheetBehavior.setBottomSheetCallback(object : BottomSheetBehavior.BottomSheetCallback() {
+            override fun onSlide(p0: View, p1: Float) {
+                val multi = 3 * p1
+                optionsView.alpha = multi
+                optionsView.cardElevation = p1 * 8
+                optionsView.elevation = p1 * 8
+            }
+
+            override fun onStateChanged(bottomSheet: View, newState: Int) {
+                iconTray.visibility = View.GONE
+                if (newState == STATE_COLLAPSED) {
+                    iconTray.visibility = View.VISIBLE
+                }
+            }
+        })
     }
 
+    private fun setupBottomSheet(){
+        settingsText.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_mainFragment_to_settingsFragment))
+
+        rateAppText.setOnClickListener {
+            val uri = Uri.parse("market://details?id=" + context?.packageName)
+            val goToMarket = Intent(Intent.ACTION_VIEW, uri)
+            goToMarket.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY or
+                    Intent.FLAG_ACTIVITY_MULTIPLE_TASK)
+            goToMarket.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT)
+            try {
+                startActivity(goToMarket)
+                Log.d(TAG, goToMarket.data?.query)
+            } catch (e: ActivityNotFoundException) {
+                startActivity(Intent(Intent.ACTION_VIEW,
+                        Uri.parse("http://play.google.com/store/apps/details?id=" + context?.packageName)))
+            }
+        }
+        changeLauncherText.setOnClickListener {
+            startActivity(Intent(Settings.ACTION_HOME_SETTINGS))
+        }
+        aboutText.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_mainFragment_to_aboutFragment))
 
+        deviceSettingsText.setOnClickListener {
+            startActivity(Intent(Settings.ACTION_SETTINGS))
+        }
+        changeLauncherText.setOnClickListener {
+            startActivity(Intent(Settings.ACTION_HOME_SETTINGS))
+        }
+    }
 
     private fun doBounceAnimation(targetView: View) {
         val animator = ObjectAnimator.ofFloat(targetView, "translationY", 0f, -20f, 0f)
@@ -134,9 +211,21 @@ class MainFragment : Fragment() {
         dateTextView.text = fWatchDate.format(date)
     }
 
+    private fun getCallingPermission() {
+        if (ContextCompat.checkSelfPermission(activity!!, android.Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {
+            ActivityCompat.requestPermissions(activity!!, arrayOf(android.Manifest.permission.CALL_PHONE), REQUEST_PHONE_CALL)
+        } else {
+            Navigation.findNavController(main_content).navigate(R.id.action_mainFragment_to_dialerFragment)
+        }
+    }
+
     inner class ClockReceiver : BroadcastReceiver() {
         override fun onReceive(ctx: Context?, intent: Intent?) {
             updateUi()
         }
     }
+
+    companion object {
+        const val REQUEST_PHONE_CALL = 1
+    }
 }

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

@@ -1,59 +0,0 @@
-package com.sduduzog.slimlauncher.ui.main
-
-
-import android.content.ActivityNotFoundException
-import android.content.Intent
-import android.net.Uri
-import android.os.Build
-import android.os.Bundle
-import android.provider.Settings
-import android.util.Log
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.fragment.app.Fragment
-import androidx.navigation.Navigation
-import com.sduduzog.slimlauncher.R
-import kotlinx.android.synthetic.main.options_fragment.*
-
-
-class OptionsFragment : Fragment() {
-
-    @Suppress("PropertyName")
-    val TAG: String = "OptionsFragment"
-
-    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
-                              savedInstanceState: Bundle?): View? {
-        // Inflate the layout for this fragment
-        return inflater.inflate(R.layout.options_fragment, container, false)
-    }
-
-    override fun onActivityCreated(savedInstanceState: Bundle?) {
-        super.onActivityCreated(savedInstanceState)
-        notesText.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_openNotesListFragment))
-        settingsText.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_openSettingsFragment))
-        deviceSettingsText.setOnClickListener {
-            startActivity(Intent(Settings.ACTION_SETTINGS))
-        }
-        changeLauncherText.setOnClickListener {
-            startActivity(Intent(Settings.ACTION_HOME_SETTINGS))
-        }
-        rateAppText.setOnClickListener {
-            val uri = Uri.parse("market://details?id=" + context?.packageName)
-            val goToMarket = Intent(Intent.ACTION_VIEW, uri)
-            goToMarket.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY or
-                    Intent.FLAG_ACTIVITY_MULTIPLE_TASK)
-            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
-                goToMarket.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT)
-            }
-            try {
-                startActivity(goToMarket)
-                Log.d(TAG, goToMarket.data?.query)
-            } catch (e: ActivityNotFoundException) {
-                startActivity(Intent(Intent.ACTION_VIEW,
-                        Uri.parse("http://play.google.com/store/apps/details?id=" + context?.packageName)))
-            }
-        }
-        aboutText.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_openAboutFragment))
-    }
-}

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

@@ -74,13 +74,23 @@ class SettingsFragment : Fragment() {
             val themeChooserDialog = ThemeChooserDialog.getThemeChooser()
             themeChooserDialog.showNow(fragmentManager, "THEME_CHOOSER")
         }
+        initComponents()
+    }
+
+    private fun initComponents(){
         val settings = context!!.getSharedPreferences(getString(R.string.prefs_settings), MODE_PRIVATE)
-        clockTypeChecker.isChecked = settings.getBoolean(getString(R.string.prefs_settings_key_clock_type), false)
-        clockTypeChecker.setOnCheckedChangeListener { _, b ->
+        clockSwitch.isChecked = settings.getBoolean(getString(R.string.prefs_settings_key_clock_type), false)
+        clockSwitch.setOnCheckedChangeListener { _, b ->
             settings.edit {
                 putBoolean(getString(R.string.prefs_settings_key_clock_type), b)
             }
         }
-    }
 
+        dialerSwitch.isChecked = settings.getBoolean(getString(R.string.prefs_settings_key_app_dialer), false)
+        dialerSwitch.setOnCheckedChangeListener { _, b ->
+            settings.edit {
+                putBoolean(getString(R.string.prefs_settings_key_app_dialer), b)
+            }
+        }
+    }
 }

+ 11 - 0
app/src/main/res/drawable/app_background.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+
+    <corners
+        android:radius="8dp" />
+
+    <stroke android:color="?android:colorForeground"
+        android:width="1dp"/>
+
+</shape>

+ 9 - 0
app/src/main/res/drawable/ic_chevron_left.xml

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="24dp"
+        android:height="24dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:fillColor="?android:colorForeground"
+        android:pathData="M15.41,7.41L14,6l-6,6 6,6 1.41,-1.41L10.83,12z"/>
+</vector>

+ 276 - 0
app/src/main/res/layout/dialer_fragment.xml

@@ -0,0 +1,276 @@
+<androidx.constraintlayout.widget.ConstraintLayout 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/_dialer"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context="com.sduduzog.slimlauncher.ui.main.DialerFragment">
+
+    <TableLayout
+        android:id="@+id/dialer_keys"
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        android:layout_marginStart="8dp"
+        android:layout_marginEnd="8dp"
+        android:layout_marginBottom="32dp"
+        android:orientation="horizontal"
+        app:layout_constraintBottom_toTopOf="@+id/fab_dialer"
+        app:layout_constraintDimensionRatio="h,5:4"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent">
+
+        <TableRow
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+
+            android:gravity="center">
+
+
+            <TextView
+                android:id="@+id/dial_one"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:background="?attr/selectableItemBackgroundBorderless"
+                android:clickable="true"
+                android:focusable="true"
+                android:gravity="center"
+                android:tag="1"
+                android:text="1"
+                android:textSize="30sp" />
+
+            <TextView
+                android:id="@+id/dial_two"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:background="?attr/selectableItemBackgroundBorderless"
+                android:clickable="true"
+                android:focusable="true"
+                android:gravity="center"
+                android:tag="2"
+                android:text="2"
+                android:textSize="30sp" />
+
+            <TextView
+                android:id="@+id/dial_three"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:background="?attr/selectableItemBackgroundBorderless"
+                android:clickable="true"
+                android:focusable="true"
+                android:gravity="center"
+                android:tag="3"
+                android:text="3"
+                android:textSize="30sp" />
+        </TableRow>
+
+        <TableRow
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:gravity="center">
+
+
+            <TextView
+                android:id="@+id/dial_four"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:background="?attr/selectableItemBackgroundBorderless"
+                android:clickable="true"
+                android:focusable="true"
+                android:gravity="center"
+                android:tag="4"
+                android:text="4"
+                android:textSize="30sp" />
+
+            <TextView
+                android:id="@+id/dial_five"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:background="?attr/selectableItemBackgroundBorderless"
+                android:clickable="true"
+                android:focusable="true"
+                android:gravity="center"
+                android:tag="5"
+                android:text="5"
+                android:textSize="30sp" />
+
+            <TextView
+                android:id="@+id/dial_six"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:background="?attr/selectableItemBackgroundBorderless"
+                android:clickable="true"
+                android:focusable="true"
+                android:gravity="center"
+                android:tag="6"
+                android:text="6"
+                android:textSize="30sp" />
+        </TableRow>
+
+        <TableRow
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:gravity="center">
+
+
+            <TextView
+                android:id="@+id/dial_seven"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:background="?attr/selectableItemBackgroundBorderless"
+                android:clickable="true"
+                android:focusable="true"
+                android:gravity="center"
+                android:tag="7"
+                android:text="7"
+                android:textSize="30sp" />
+
+            <TextView
+                android:id="@+id/dial_eight"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:background="?attr/selectableItemBackgroundBorderless"
+                android:clickable="true"
+                android:focusable="true"
+                android:gravity="center"
+                android:tag="8"
+                android:text="8"
+                android:textSize="30sp" />
+
+            <TextView
+                android:id="@+id/dial_nine"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:background="?attr/selectableItemBackgroundBorderless"
+                android:clickable="true"
+                android:focusable="true"
+                android:gravity="center"
+                android:tag="9"
+                android:text="9"
+                android:textSize="30sp" />
+        </TableRow>
+
+        <TableRow
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:gravity="center">
+
+
+            <TextView
+                android:id="@+id/dial_star"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:background="?attr/selectableItemBackgroundBorderless"
+                android:clickable="true"
+                android:focusable="true"
+                android:gravity="center"
+                android:tag="*"
+                android:text="*"
+                android:textSize="30sp" />
+
+            <TextView
+                android:id="@+id/dial_zero"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:background="?attr/selectableItemBackgroundBorderless"
+                android:clickable="true"
+                android:focusable="true"
+                android:gravity="center"
+                android:tag="0"
+                android:text="0"
+                android:textSize="30sp" />
+
+            <TextView
+                android:id="@+id/dial_hash"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:background="?attr/selectableItemBackgroundBorderless"
+                android:clickable="true"
+                android:focusable="true"
+                android:gravity="center"
+                android:tag="#"
+                android:text="#"
+                android:textSize="30sp" />
+        </TableRow>
+
+    </TableLayout>
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:id="@+id/fab_dialer"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginBottom="32dp"
+        android:clickable="true"
+        android:focusable="true"
+        android:src="@drawable/ic_call"
+        android:tint="?android:attr/colorForeground"
+        app:backgroundTint="?android:attr/colorBackground"
+        app:backgroundTintMode="src_in"
+        app:elevation="0dp"
+        app:fabCustomSize="75dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="@+id/dialer_keys"
+        app:layout_constraintStart_toStartOf="@+id/dialer_keys"
+        app:rippleColor="?android:attr/statusBarColor" />
+
+    <EditText
+        android:id="@+id/editText2"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="16dp"
+        android:layout_marginEnd="16dp"
+        android:layout_marginBottom="5dp"
+        android:background="@android:color/transparent"
+        android:ems="10"
+        android:gravity="center"
+        android:inputType="textPersonName"
+        android:padding="16dp"
+        android:textSize="32sp"
+        app:layout_constraintBottom_toTopOf="@+id/divider"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        tools:ignore="Autofill,LabelFor" />
+
+    <View
+        android:id="@+id/divider"
+        android:layout_width="0dp"
+        android:layout_height="1dp"
+        android:layout_marginStart="8dp"
+        android:layout_marginEnd="8dp"
+        android:layout_marginBottom="8dp"
+        android:background="?android:attr/listDivider"
+        app:layout_constraintBottom_toTopOf="@+id/dialer_keys"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent" />
+
+    <ImageView
+        android:id="@+id/chevron"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="8dp"
+        android:background="?attr/selectableItemBackgroundBorderless"
+        android:clickable="true"
+        android:focusable="true"
+        android:padding="8dp"
+        android:src="@drawable/ic_chevron_left"
+        android:visibility="invisible"
+        app:layout_constraintBottom_toBottomOf="@+id/editText2"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/editText2" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>

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

@@ -32,10 +32,7 @@
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginTop="32dp"
         android:layout_marginEnd="16dp"
-        android:layout_marginRight="16dp"
         app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
@@ -52,4 +49,15 @@
         app:layout_constraintStart_toEndOf="@+id/clockTextView"
         app:layout_constraintTop_toTopOf="@+id/clockTextView" />
 
+    <TextView
+        android:id="@+id/buttonNotes"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:alpha="0.7"
+        android:padding="8dp"
+        android:text="@string/main_options_text_notes"
+        android:textSize="24sp"
+        app:layout_constraintStart_toStartOf="@+id/mainAppsList"
+        app:layout_constraintTop_toBottomOf="@+id/mainAppsList" />
+
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 6 - 95
app/src/main/res/layout/main_fragment.xml

@@ -1,102 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
+<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
-    android:id="@+id/main_content"
+    android:id="@+id/main"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    tools:context=".ui.main.OptionsFragment">
+    tools:context=".ui.main.MainFragment">
 
-    <TextView
-        android:id="@+id/clockTextView"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="32dp"
-        android:text="@string/main_placeholder_clock"
-        android:textSize="64sp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
+    <include layout="@layout/main_content" />
 
-    <TextView
-        android:id="@+id/dateTextView"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/main_placeholder_date"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/clockTextView" />
+    <include layout="@layout/main_bottom_sheet" />
 
-    <androidx.recyclerview.widget.RecyclerView
-        android:id="@+id/mainAppsList"
-        android:layout_width="0dp"
-        android:layout_height="320dp"
-        android:layout_marginStart="16dp"
-        android:layout_marginEnd="16dp"
-        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        tools:listitem="@layout/main_list_item" />
-
-    <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" />
-
-    <ImageView
-        android:id="@+id/ivExpand"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="8dp"
-        android:layout_marginEnd="8dp"
-        android:layout_marginBottom="8dp"
-        android:contentDescription="@string/main_slim_options"
-        android:padding="16dp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toStartOf="@+id/buttonCamera"
-        app:layout_constraintStart_toEndOf="@+id/buttonDialer"
-        app:srcCompat="@drawable/ic_expand" />
-
-    <TextView
-        android:id="@+id/buttonNotes"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="8dp"
-        android:alpha="0.7"
-        android:padding="8dp"
-        android:text="@string/main_options_text_notes"
-        android:textSize="24sp"
-        app:layout_constraintStart_toStartOf="@+id/mainAppsList"
-        app:layout_constraintTop_toBottomOf="@+id/mainAppsList" />
-
-    <ImageView
-        android:id="@+id/buttonDialer"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="8dp"
-        android:layout_marginBottom="8dp"
-        android:padding="16dp"
-        android:src="@drawable/ic_call"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        android:contentDescription="@string/main_button_dialer" />
-
-    <ImageView
-        android:id="@+id/buttonCamera"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginEnd="8dp"
-        android:layout_marginBottom="8dp"
-        android:padding="16dp"
-        android:src="@drawable/ic_photo_camera"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        android:contentDescription="@string/main_button_camera" />
-
-</androidx.constraintlayout.widget.ConstraintLayout>
+</androidx.coordinatorlayout.widget.CoordinatorLayout>

+ 0 - 83
app/src/main/res/layout/options_fragment.xml

@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout 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"
-    android:orientation="vertical"
-    tools:context=".ui.main.OptionsFragment">
-
-    <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/notesText"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_margin="8dp"
-        android:padding="8dp"
-        android:text="@string/main_options_text_notes"
-        android:textSize="24sp"
-        android:visibility="visible" />
-
-    <TextView
-        android:id="@+id/settingsText"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_margin="8dp"
-        android:padding="8dp"
-        android:text="@string/main_options_home_screen_apps"
-        android:textSize="24sp" />
-
-    <TextView
-        android:id="@+id/deviceSettingsText"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_margin="8dp"
-        android:padding="8dp"
-        android:text="@string/main_options_settings"
-        android:textSize="24sp" />
-
-    <TextView
-        android:id="@+id/changeLauncherText"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_margin="8dp"
-        android:padding="8dp"
-        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="8dp"
-        android:padding="8dp"
-        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="8dp"
-        android:padding="8dp"
-        android:text="@string/main_options_about_slim"
-        android:textSize="24sp" />
-
-
-</LinearLayout>

+ 101 - 57
app/src/main/res/layout/settings_fragment.xml

@@ -12,82 +12,100 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginStart="16dp"
-        android:layout_marginTop="16dp"
+        android:layout_marginTop="8dp"
+        android:alpha="0.5"
         android:text="@string/settings_title"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toTopOf="parent" />
 
-    <androidx.recyclerview.widget.RecyclerView
-        android:id="@+id/settingsAppList"
+    <View
+        android:id="@+id/divider4"
         android:layout_width="0dp"
-        android:layout_height="0dp"
+        android:layout_height="1dp"
         android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
+        android:layout_marginTop="8dp"
         android:layout_marginEnd="16dp"
-        android:layout_marginRight="16dp"
-        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
-        app:layout_constraintBottom_toBottomOf="parent"
+        android:background="?android:attr/listDivider"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/textView6"
-        tools:listitem="@layout/settings_list_item" />
+        app:layout_constraintTop_toBottomOf="@+id/textView3" />
 
     <TextView
         android:id="@+id/textView2"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="24dp"
-        android:layout_marginTop="16dp"
+        android:layout_marginStart="16dp"
         android:text="@string/settings_text_use_24_hour_clock"
         android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="24sp"
+        android:textSize="18sp"
         app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/textView3" />
+        app:layout_constraintTop_toBottomOf="@+id/divider4" />
 
-    <androidx.appcompat.widget.AppCompatCheckBox
-        android:id="@+id/clockTypeChecker"
-        style="@style/Widget.AppCompat.CompoundButton.CheckBox"
+    <TextView
+        android:id="@+id/textView4"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="8dp"
+        android:text="@string/settings_text_tap_to_check_between_24_hour_or_12_hour"
+        app:layout_constraintEnd_toStartOf="@+id/clockSwitch"
+        app:layout_constraintStart_toStartOf="@+id/textView2"
+        app:layout_constraintTop_toBottomOf="@+id/textView2" />
+
+    <Switch
+        android:id="@+id/clockSwitch"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginTop="8dp"
         android:layout_marginEnd="24dp"
-        android:textAppearance="@style/TextAppearance.AppCompat"
+        android:layout_marginBottom="8dp"
+        android:padding="4dp"
+        app:layout_constraintBottom_toBottomOf="@+id/textView4"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintTop_toTopOf="@+id/textView2" />
 
     <TextView
-        android:id="@+id/textView4"
+        android:id="@+id/textView9"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="@string/settings_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"
+        android:text="Use Slim's built-in dialer"
+        android:textAppearance="@style/TextAppearance.AppCompat"
+        android:textSize="18sp"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toBottomOf="@+id/textView4" />
 
     <TextView
-        android:id="@+id/changeThemeText"
+        android:id="@+id/textView10"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="Faster shortcut to your calls"
+        app:layout_constraintStart_toStartOf="@+id/textView9"
+        app:layout_constraintTop_toBottomOf="@+id/textView9" />
+
+    <Switch
+        android:id="@+id/dialerSwitch"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="24dp"
         android:layout_marginTop="8dp"
+        android:layout_marginEnd="24dp"
+        android:layout_marginBottom="8dp"
+        android:padding="4dp"
+        app:layout_constraintBottom_toBottomOf="@+id/textView10"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/textView9" />
+
+    <TextView
+        android:id="@+id/changeThemeText"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="16dp"
+        android:layout_marginTop="16dp"
         android:text="@string/main_options_change_theme"
         android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="24sp"
+        android:textSize="18sp"
         app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/divider" />
+        app:layout_constraintTop_toBottomOf="@+id/textView10" />
 
     <TextView
         android:id="@+id/textView7"
@@ -97,30 +115,64 @@
         app:layout_constraintStart_toStartOf="@+id/changeThemeText"
         app:layout_constraintTop_toBottomOf="@+id/changeThemeText" />
 
+    <TextView
+        android:id="@+id/textView8"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="16dp"
+        android:layout_marginTop="16dp"
+        android:alpha="0.5"
+        android:text="@string/settings_text_home_screen_apps"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/textView7" />
+
     <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" />
+        app:layout_constraintTop_toBottomOf="@+id/textView8" />
 
     <TextView
-        android:id="@+id/textView8"
+        android:id="@+id/textView6"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="8dp"
+        android:layout_marginEnd="8dp"
+        android:text="@string/settings_list_item_subtext"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="@+id/textView8"
+        app:layout_constraintTop_toBottomOf="@+id/divider2" />
+
+    <androidx.recyclerview.widget.RecyclerView
+        android:id="@+id/settingsAppList"
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        android:layout_marginStart="16dp"
+        android:layout_marginTop="8dp"
+        android:layout_marginEnd="16dp"
+        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/textView6"
+        tools:listitem="@layout/settings_list_item" />
+
+    <androidx.appcompat.widget.AppCompatCheckBox
+        android:id="@+id/clockTypeChecker"
+        style="@style/Widget.AppCompat.CompoundButton.CheckBox"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="24dp"
-        android:text="@string/settings_text_home_screen_apps"
+        android:layout_marginTop="8dp"
+        android:layout_marginEnd="24dp"
         android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="24sp"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/divider2" />
+        android:visibility="gone"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/textView2" />
 
     <Button
         android:id="@+id/buttonChangeTheme"
@@ -129,18 +181,10 @@
         android:layout_height="wrap_content"
         android:layout_marginTop="8dp"
         android:layout_marginEnd="16dp"
+        android:layout_marginBottom="8dp"
         android:text="@string/settings_button_change_theme"
+        app:layout_constraintBottom_toBottomOf="@+id/textView7"
         app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/divider" />
-
-    <TextView
-        android:id="@+id/textView6"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginEnd="8dp"
-        android:text="@string/settings_list_item_subtext"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="@+id/textView8"
-        app:layout_constraintTop_toBottomOf="@+id/textView8" />
+        app:layout_constraintTop_toTopOf="@+id/changeThemeText" />
 
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 15 - 6
app/src/main/res/layout/settings_list_item.xml

@@ -3,21 +3,30 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:id="@+id/settings_list_item"
     android:layout_width="match_parent"
-    android:background="?android:attr/colorBackground"
-    android:layout_height="wrap_content">
+    android:layout_height="wrap_content"
+    android:layout_margin="1dp">
+
+    <View
+        android:id="@+id/divider3"
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        android:alpha="0.2"
+        android:background="?android:attr/listDivider"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
 
     <TextView
         android:id="@+id/item_text"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
         android:layout_marginTop="8dp"
         android:layout_marginEnd="8dp"
-        android:layout_marginRight="8dp"
         android:layout_marginBottom="8dp"
         android:text="@string/settings_list_item_text"
-        android:textSize="32sp"
+        android:textSize="24sp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
@@ -30,7 +39,7 @@
         android:layout_height="wrap_content"
         android:layout_marginTop="8dp"
         android:layout_marginEnd="8dp"
-        android:layout_marginRight="8dp"
+        android:layout_marginBottom="8dp"
         android:text="@string/settings_list_item_button_set_app"
         app:layout_constraintBottom_toBottomOf="@+id/item_text"
         app:layout_constraintEnd_toEndOf="parent"

+ 14 - 24
app/src/main/res/navigation/nav_graph.xml

@@ -10,17 +10,18 @@
         android:name="com.sduduzog.slimlauncher.ui.main.MainFragment"
         android:label="main_fragment"
         tools:layout="@layout/main_fragment">
-        <action
-            android:id="@+id/action_openOptionsFragment"
-            app:destination="@id/optionsFragment"
-            app:enterAnim="@anim/slide_up_enter"
-            app:exitAnim="@anim/slide_up_exit"
-            app:launchSingleTop="true"
-            app:popEnterAnim="@anim/slide_down_enter"
-            app:popExitAnim="@anim/slide_down_exit" />
         <action
             android:id="@+id/action_mainFragment_to_notesListFragment"
             app:destination="@id/notesListFragment" />
+        <action
+            android:id="@+id/action_mainFragment_to_dialerFragment"
+            app:destination="@id/dialerFragment" />
+        <action
+            android:id="@+id/action_mainFragment_to_settingsFragment"
+            app:destination="@id/settingsFragment" />
+        <action
+            android:id="@+id/action_mainFragment_to_aboutFragment"
+            app:destination="@id/aboutFragment" />
     </fragment>
     <fragment
         android:id="@+id/settingsFragment"
@@ -59,25 +60,14 @@
             android:id="@+id/action_openNoteFragment"
             app:destination="@id/noteFragment" />
     </fragment>
-    <fragment
-        android:id="@+id/optionsFragment"
-        android:name="com.sduduzog.slimlauncher.ui.main.OptionsFragment"
-        android:label="options_fragment"
-        tools:layout="@layout/options_fragment" >
-        <action
-            android:id="@+id/action_openNotesListFragment"
-            app:destination="@id/notesListFragment" />
-        <action
-            android:id="@+id/action_openSettingsFragment"
-            app:destination="@id/settingsFragment"
-            app:popUpTo="@+id/mainFragment" />
-        <action
-            android:id="@+id/action_openAboutFragment"
-            app:destination="@id/aboutFragment" />
-    </fragment>
     <fragment
         android:id="@+id/noteFragment"
         android:name="com.sduduzog.slimlauncher.ui.main.notes.NoteFragment"
         android:label="note_fragment"
         tools:layout="@layout/note_fragment" />
+    <fragment
+        android:id="@+id/dialerFragment"
+        android:name="com.sduduzog.slimlauncher.ui.main.DialerFragment"
+        android:label="dialer_fragment"
+        tools:layout="@layout/dialer_fragment" />
 </navigation>

+ 6 - 5
app/src/main/res/values/strings.xml

@@ -19,6 +19,9 @@
 
     <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_app_dialer">app_dialer</string>
+    <string name="prefs_settings_key_fresh_install_setup">key_fresh_install_setup</string>
 
     <!--main package strings-->
     <string name="main_button_dialer">Dialer</string>
@@ -33,8 +36,6 @@
     <string name="main_options_change_launcher">Change launcher</string>
     <string name="main_options_text_notes">Notes</string>
 
-
-    <string name="hello_blank_fragment">Hello blank fragment</string>
     <string name="note_fragment_hint_title">Title</string>
     <string name="note_fragment_hint_body">Start here</string>
 
@@ -83,9 +84,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_clock_type">clock_type</string>
-
-    <string name="prefs_settings_key_fresh_install_setup">key_fresh_install_setup</string>
     <string name="setup_button_start">start</string>
     <string name="setup_text_welcome">Welcome!</string>
     <string name="setup_text_lets_get_you_set_up">Lets get you set up!</string>
@@ -109,4 +107,7 @@
 
     <string name="notes_date_placeholder">Edited at %s</string>
 
+    <!-- TODO: Remove or change this placeholder text -->
+    <string name="hello_blank_fragment">Hello blank fragment</string>
+
 </resources>