瀏覽代碼

linting and cleanup

sduduzog 7 年之前
父節點
當前提交
66d353d8a0
共有 31 個文件被更改,包括 37 次插入569 次删除
  1. 1 1
      app/release/output.json
  2. 1 38
      app/src/androidTest/java/com/sduduzog/slimlauncher/SetupFragmentTest.kt
  3. 1 20
      app/src/main/java/com/sduduzog/slimlauncher/MainActivity.kt
  4. 1 2
      app/src/main/java/com/sduduzog/slimlauncher/SlimAdminReceiver.kt
  5. 3 9
      app/src/main/java/com/sduduzog/slimlauncher/data/DataRepository.kt
  6. 0 82
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/DialerFragment.kt
  7. 1 3
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/HomeAppsAdapter.kt
  8. 10 28
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/MainFragment.kt
  9. 2 0
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/MakeSlimAdminDialog.kt
  10. 0 1
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/setup/SplashFragment.kt
  11. 0 9
      app/src/main/res/drawable-v21/ic_chevron_left.xml
  12. 1 1
      app/src/main/res/drawable-v21/ic_drag_handle.xml
  13. 二進制
      app/src/main/res/drawable/clock_zoomed.webp
  14. 二進制
      app/src/main/res/drawable/clock_zoomed2.webp
  15. 1 1
      app/src/main/res/drawable/ic_drag_handle.xml
  16. 二進制
      app/src/main/res/drawable/nav_options.webp
  17. 二進制
      app/src/main/res/drawable/nav_options2.webp
  18. 二進制
      app/src/main/res/drawable/nav_options3.webp
  19. 二進制
      app/src/main/res/drawable/screenshot.webp
  20. 0 277
      app/src/main/res/layout/dialer_fragment.xml
  21. 0 49
      app/src/main/res/layout/home_setup_fragment.xml
  22. 4 2
      app/src/main/res/layout/main_bottom_sheet.xml
  23. 0 1
      app/src/main/res/layout/main_content.xml
  24. 1 1
      app/src/main/res/layout/notes_list_fragment.xml
  25. 7 3
      app/src/main/res/layout/settings_list_item.xml
  26. 1 2
      app/src/main/res/layout/setup_fragment.xml
  27. 0 1
      app/src/main/res/layout/splash_fragment.xml
  28. 2 8
      app/src/main/res/navigation/nav_graph.xml
  29. 0 2
      app/src/main/res/values-sw600dp/dimens.xml
  30. 0 23
      app/src/main/res/values/strings.xml
  31. 0 5
      app/src/test/java/com/sduduzog/slimlauncher/ExampleUnitTest.java

+ 1 - 1
app/release/output.json

@@ -1 +1 @@
-[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":20,"versionName":"2.1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
+[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":23,"versionName":"2.2.1","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]

+ 1 - 38
app/src/androidTest/java/com/sduduzog/slimlauncher/SetupFragmentTest.kt

@@ -41,15 +41,9 @@ class SetupFragmentTest {
     @Test
     fun isAlertDialogShown() {
         val appCompatButton = onView(
-                allOf(withId(R.id.setup_splash_button_start),
-                        withText(R.string.setup_button_start), isDisplayed()))
+                allOf(withText(R.string.setup_button_start), isDisplayed()))
         appCompatButton.perform(click())
 
-        val chooseAppsButton = onView(allOf(withText(R.string.setup_choose_apps)))
-
-        chooseAppsButton.check(matches(isDisplayed()))
-
-        chooseAppsButton.perform(click())
 
         val frameLayout = onView(
                 allOf(withId(android.R.id.content), isDisplayed()))
@@ -66,46 +60,15 @@ class SetupFragmentTest {
         button.check(matches(isDisplayed()))
     }
 
-    @Test
-    fun pressingStartShouldNavigateToChoosingHomeScreenApps() {
-        val startButton = onView(allOf(withText(R.string.setup_button_start), isDisplayed()))
-        startButton.perform(click())
-
-        val chooseAppsButton = onView(allOf(withText(R.string.setup_choose_apps)))
-
-        chooseAppsButton.check(matches(isDisplayed()))
-
-        chooseAppsButton.perform(click())
-
-        val frameLayout = onView(
-                allOf(withId(android.R.id.content), isDisplayed()))
-        frameLayout.check(matches(isDisplayed()))
-
-        val alertDialogTitle = onView(
-                allOf(withText(R.string.choose_apps_title)))
-
-
-        alertDialogTitle.check(matches(isDisplayed()))
-    }
-
     @Test
     fun noAppsSelected() {
         val startButton = onView(allOf(withText(R.string.setup_button_start)))
         startButton.perform(click())
 
-        val chooseAppsButton = onView(allOf(withText(R.string.setup_choose_apps)))
-        chooseAppsButton.check(matches(isDisplayed()))
-
-        chooseAppsButton.perform(click())
-
         val appCompatButton2 = onView(
                 allOf(withText("DONE")))
         appCompatButton2.perform(ViewActions.scrollTo(), click())
 
-        val viewGroup = onView(
-                allOf(withId(R.id.home_setup_fragment), isDisplayed()))
-        viewGroup.check(matches(isDisplayed()))
-
         onView(withText(R.string.no_app_selected_toast_msg)).inRoot(
                 RootMatchers.withDecorView(Matchers.not(Matchers.`is`(mActivityTestRule.activity.window.decorView))))
                 .check(matches(isDisplayed()))

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

@@ -2,7 +2,6 @@ package com.sduduzog.slimlauncher
 
 import android.content.Intent
 import android.content.SharedPreferences
-import android.content.pm.PackageManager
 import android.content.res.Resources
 import android.os.Bundle
 import android.view.View
@@ -104,23 +103,6 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
         currentLabel = destination.label.toString()
     }
 
-    override fun onRequestPermissionsResult(requestCode: Int,
-                                            permissions: Array<String>, grantResults: IntArray) {
-        when (requestCode) {
-            REQUEST_CODE_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
-            }
-        }
-
-
-    }
-
     override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
         if (requestCode == REQUEST_CODE_ENABLE_ADMIN) {
             if (resultCode == RESULT_OK) {
@@ -174,8 +156,7 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
             return R.style.AppTheme
         }
 
-        const val REQUEST_CODE_PHONE_CALL = 1
-        const val REQUEST_CODE_ENABLE_ADMIN = 2
+        const val REQUEST_CODE_ENABLE_ADMIN = 1
     }
 
     interface OnBackPressedListener {

+ 1 - 2
app/src/main/java/com/sduduzog/slimlauncher/SlimAdminReceiver.kt

@@ -2,5 +2,4 @@ package com.sduduzog.slimlauncher
 
 import android.app.admin.DeviceAdminReceiver
 
-class SlimAdminReceiver : DeviceAdminReceiver() {
-}
+class SlimAdminReceiver : DeviceAdminReceiver()

+ 3 - 9
app/src/main/java/com/sduduzog/slimlauncher/data/DataRepository.kt

@@ -5,6 +5,7 @@ import android.content.Intent
 import android.content.pm.PackageManager
 import android.content.pm.ResolveInfo
 import android.os.AsyncTask
+import android.util.Log
 import androidx.lifecycle.LiveData
 import com.sduduzog.slimlauncher.BuildConfig
 import java.util.*
@@ -12,7 +13,6 @@ import java.util.*
 class DataRepository(application: Application) {
 
     private val db: DataRoomDatabase = DataRoomDatabase.getDatabase(application)!!
-    private val packageName = application.packageName
     private val appDao: AppDao = db.appDao()
     private val noteDao: NoteDao = db.noteDao()
     private var _apps: LiveData<List<App>> = appDao.apps
@@ -103,18 +103,12 @@ class DataRepository(application: Application) {
     private class RefreshAppsAsyncTask internal constructor(private val mAsyncTaskDao: AppDao) : AsyncTask<PackageManager, Void, Void>() {
 
         override fun doInBackground(vararg params: PackageManager): Void? {
+            mAsyncTaskDao.deleteAll() // Need to find a less expensive way of doing this
             val pm = params[0]
             val main = Intent(Intent.ACTION_MAIN, null)
-
             main.addCategory(Intent.CATEGORY_LAUNCHER)
-
             val activitiesList = pm.queryIntentActivities(main, 0)
-            Collections.sort(activitiesList.filter {
-
-                it.activityInfo.packageName != BuildConfig.APPLICATION_ID
-            },
-                    ResolveInfo.DisplayNameComparator(pm))
-            mAsyncTaskDao.deleteAll() // Need to find a less expensive way of doing this
+            Collections.sort(activitiesList, ResolveInfo.DisplayNameComparator(pm))
             for (i in activitiesList.indices) {
                 val item = activitiesList[i]
                 val activity = item.activityInfo

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

@@ -1,82 +0,0 @@
-package com.sduduzog.slimlauncher.ui.main
-
-
-import android.content.Intent
-import android.net.Uri
-import android.os.Bundle
-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 {
-
-    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) {
-                // Do nothing
-            }
-        }
-    }
-
-    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)
-    }
-}

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

@@ -8,14 +8,12 @@ import android.view.View
 import android.view.ViewGroup
 import android.widget.TextView
 import android.widget.Toast
+import androidx.core.app.ActivityOptionsCompat
 import androidx.lifecycle.Observer
 import androidx.lifecycle.ViewModelProviders
 import androidx.recyclerview.widget.RecyclerView
 import com.sduduzog.slimlauncher.R
 import com.sduduzog.slimlauncher.data.HomeApp
-import androidx.core.content.ContextCompat.startActivity
-import android.app.ActivityOptions
-import androidx.core.app.ActivityOptionsCompat
 
 
 class HomeAppsAdapter(private var fragment: MainFragment)

+ 10 - 28
app/src/main/java/com/sduduzog/slimlauncher/ui/main/MainFragment.kt

@@ -2,7 +2,6 @@ package com.sduduzog.slimlauncher.ui.main
 
 import android.annotation.SuppressLint
 import android.content.*
-import android.content.pm.PackageManager
 import android.net.Uri
 import android.os.Build
 import android.os.Bundle
@@ -11,9 +10,7 @@ import android.provider.MediaStore
 import android.provider.Settings
 import android.view.*
 import android.widget.FrameLayout
-import androidx.core.app.ActivityCompat
 import androidx.core.app.ActivityOptionsCompat
-import androidx.core.content.ContextCompat
 import androidx.navigation.Navigation
 import com.google.android.material.bottomsheet.BottomSheetBehavior
 import com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_COLLAPSED
@@ -130,20 +127,16 @@ class MainFragment : StatusBarThemeFragment(), MainActivity.OnBackPressedListene
         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)
-                    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())
-                } catch (e: Exception) {
-                    // Do nothing
-                }
+            try {
+                val intent = Intent(Intent.ACTION_DIAL)
+                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())
+            } catch (e: Exception) {
+                // Do nothing
             }
         }
         ivCall.setOnLongClickListener {
@@ -299,13 +292,6 @@ class MainFragment : StatusBarThemeFragment(), MainActivity.OnBackPressedListene
         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?) {
@@ -347,8 +333,4 @@ class MainFragment : StatusBarThemeFragment(), MainActivity.OnBackPressedListene
 //            }
         }
     }
-
-    companion object {
-        const val REQUEST_PHONE_CALL = 1
-    }
 }

+ 2 - 0
app/src/main/java/com/sduduzog/slimlauncher/ui/main/MakeSlimAdminDialog.kt

@@ -1,3 +1,5 @@
+@file:Suppress("unused")
+
 package com.sduduzog.slimlauncher.ui.main
 
 import android.app.AlertDialog

+ 0 - 1
app/src/main/java/com/sduduzog/slimlauncher/ui/main/setup/SplashFragment.kt

@@ -11,7 +11,6 @@ import androidx.navigation.Navigation
 import com.sduduzog.slimlauncher.R
 import com.sduduzog.slimlauncher.data.App
 import com.sduduzog.slimlauncher.ui.main.MainViewModel
-import kotlinx.android.synthetic.main.home_setup_fragment.*
 import kotlinx.android.synthetic.main.splash_fragment.*
 
 class SplashFragment : PagerHelperFragment(), ChooseAppsDialog.Companion.OnChooseAppsListener {

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

@@ -1,9 +0,0 @@
-<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>

+ 1 - 1
app/src/main/res/drawable/ic_chevron_left.xml → app/src/main/res/drawable-v21/ic_drag_handle.xml

@@ -5,5 +5,5 @@
     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" />
+        android:pathData="M20,9H4v2h16V9zM4,15h16v-2H4v2z" />
 </vector>

二進制
app/src/main/res/drawable/clock_zoomed.webp


二進制
app/src/main/res/drawable/clock_zoomed2.webp


+ 1 - 1
app/src/main/res/drawable/ic_drag_handle.xml

@@ -4,6 +4,6 @@
     android:viewportWidth="24.0"
     android:viewportHeight="24.0">
     <path
-        android:fillColor="?android:colorForeground"
+        android:fillColor="?attr/colorAccent"
         android:pathData="M20,9H4v2h16V9zM4,15h16v-2H4v2z" />
 </vector>

二進制
app/src/main/res/drawable/nav_options.webp


二進制
app/src/main/res/drawable/nav_options2.webp


二進制
app/src/main/res/drawable/nav_options3.webp


二進制
app/src/main/res/drawable/screenshot.webp


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

@@ -1,277 +0,0 @@
-<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:contentDescription="@string/dialer_chevron"
-        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>

+ 0 - 49
app/src/main/res/layout/home_setup_fragment.xml

@@ -1,49 +0,0 @@
-<?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"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:id="@+id/home_setup_fragment"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:context=".ui.main.setup.HomeSetupFragment">
-
-    <!-- TODO: Update blank fragment layout -->
-
-    <Button
-        android:id="@+id/setup_choose_button"
-        style="@style/Widget.AppCompat.Button.Borderless"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginBottom="16dp"
-        android:text="@string/setup_choose_apps"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent" />
-
-    <ImageView
-        android:id="@+id/imageView"
-        android:layout_width="300dp"
-        android:layout_height="300dp"
-        android:layout_marginStart="8dp"
-        android:layout_marginTop="64dp"
-        android:layout_marginEnd="8dp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        app:srcCompat="@drawable/ic_my_phone" />
-
-    <TextView
-        android:id="@+id/textView11"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="8dp"
-        android:layout_marginLeft="8dp"
-        android:layout_marginTop="256dp"
-        android:layout_marginEnd="8dp"
-        android:layout_marginRight="8dp"
-        android:text="This is what your home screen will look like...\nbut neater!"
-        android:textSize="18sp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="@+id/imageView" />
-
-</androidx.constraintlayout.widget.ConstraintLayout>

+ 4 - 2
app/src/main/res/layout/main_bottom_sheet.xml

@@ -112,7 +112,8 @@
             android:padding="16dp"
             app:layout_constraintStart_toStartOf="parent"
             app:layout_constraintTop_toTopOf="parent"
-            app:srcCompat="@drawable/ic_call" />
+            app:srcCompat="@drawable/ic_call"
+            android:layout_marginLeft="8dp" />
 
         <ImageView
             android:id="@+id/ivExpand"
@@ -138,7 +139,8 @@
             android:padding="16dp"
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintTop_toTopOf="parent"
-            app:srcCompat="@drawable/ic_photo_camera" />
+            app:srcCompat="@drawable/ic_photo_camera"
+            android:layout_marginRight="8dp" />
     </androidx.constraintlayout.widget.ConstraintLayout>
 
 

+ 0 - 1
app/src/main/res/layout/main_content.xml

@@ -5,7 +5,6 @@
     android:id="@+id/main_content"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="?android:colorBackground"
     tools:showIn="@layout/main_fragment">
 
     <TextView

+ 1 - 1
app/src/main/res/layout/notes_list_fragment.xml

@@ -31,7 +31,7 @@
         android:layout_height="wrap_content"
         android:layout_gravity="bottom|end"
         android:layout_margin="16dp"
-        android:src="@drawable/ic_edit"
+        app:srcCompat="@drawable/ic_edit"
         app:layout_anchorGravity="bottom|end" />
 
 </androidx.coordinatorlayout.widget.CoordinatorLayout>

+ 7 - 3
app/src/main/res/layout/settings_list_item.xml

@@ -30,7 +30,9 @@
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
+        app:layout_constraintTop_toTopOf="parent"
+        android:layout_marginLeft="16dp"
+        android:layout_marginRight="8dp" />
 
     <Button
         android:id="@+id/item_button"
@@ -43,7 +45,8 @@
         android:text="@string/settings_list_item_button_set_app"
         app:layout_constraintBottom_toBottomOf="@+id/item_text"
         app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintTop_toTopOf="@+id/item_text" />
+        app:layout_constraintTop_toTopOf="@+id/item_text"
+        android:layout_marginRight="8dp" />
 
     <ImageView
         android:id="@+id/item_dragger"
@@ -58,6 +61,7 @@
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintTop_toTopOf="parent"
-        app:srcCompat="@drawable/ic_drag_handle" />
+        app:srcCompat="@drawable/ic_drag_handle"
+        android:layout_marginRight="8dp" />
 
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 1 - 2
app/src/main/res/layout/setup_fragment.xml

@@ -1,7 +1,6 @@
 <androidx.viewpager.widget.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/setup_view_pager"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="?android:colorBackground">
+    android:layout_height="match_parent">
 
 </androidx.viewpager.widget.ViewPager>

+ 0 - 1
app/src/main/res/layout/splash_fragment.xml

@@ -5,7 +5,6 @@
     android:id="@+id/splash_fragment"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="?android:colorBackground"
     tools:context=".ui.main.setup.SplashFragment">
 
     <ImageView

+ 2 - 8
app/src/main/res/navigation/nav_graph.xml

@@ -13,9 +13,7 @@
         <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" />
@@ -65,9 +63,5 @@
         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>

+ 0 - 2
app/src/main/res/values-sw600dp/dimens.xml

@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources></resources>

+ 0 - 23
app/src/main/res/values/strings.xml

@@ -49,7 +49,6 @@
 
     <string name="settings_list_item_button_set_app">Set app</string>
     <string name="settings_list_item_text">Slot empty</string>
-    <string name="settings_list_item_subtext">Swipe left/right to remove an app. Drag handlebars to reorder. Long press to rename</string>
     <string name="settings_button_change_theme">Change</string>
     <string name="about_title">Slim launcher</string>
     <string name="about_text">
@@ -60,11 +59,6 @@
     <string name="main_photo_camera_icon">photo camera icon</string>
     <string name="setup_button_start">start</string>
 
-    <string name="setup_text_lets_get_you_set_up">
-    "Lets get you set up!\n Just a few tweaks and your new home screen will be ready for you."
-    </string>
-
-    <string name="setup_button_next">next</string>
     <string name="setup_button_finish">Finish</string>
 
     <string name="no_app_selected_toast_msg">Choose at least one app</string>
@@ -73,7 +67,6 @@
 
     <string name="notes_date_placeholder">Edited at %s</string>
 
-    <string name="dialer_chevron">deleter</string>
     <string name="settings_item_icon_drag_handler">Dragger</string>
 
     <string name="setup_choose_theme">Choose Theme</string>
@@ -83,22 +76,6 @@
     <string name="setup_text_teal">Teal</string>
     <string name="setup_text_candy">Candy</string>
     <string name="setup_text_pastel">Pastel</string>
-    <string name="setup_we_re_almost_done">We\'re almost done!</string>
-    <string name="setup_expand_note">1. To open Slim options, click the arrow or swipe upwards from it.</string>
-    <string name="setup_note_camera">3. Press the camera icon to launch the default camera app</string>
-    <string name="setup_note_dialer">2. Press the dialer icon to open the default dialer</string>
-    <string name="screenshot_nav">Nav screenshot</string>
-    <string name="setup_dialer_note2">2. Press the dialer icon to open the built-in dialer(experimental). Press and hold, open the default</string>
-    <string name="setup_your_home_screen">Your home screen</string>
-    <string name="setup_screen_description">
-        "This is what your home screen will look like.\n\n"
-        "You should pick five of the apps you use the most.\n\n"
-        "You can later change them in Preferences."
-    </string>
-    <string name="setup_choose_apps">Choose apps</string>
-    <string name="setup_home_screenshot">Screenshot</string>
-    <string name="setup_clock_type_text_description">This is also changeable in preferences. Whether you prefer a 12hr clock type or a 24hr clock type</string>
-    <string name="setup_clock_type">Clock Type</string>
 
 
     <!-- Content Description For Image Resources-->

+ 0 - 5
app/src/test/java/com/sduduzog/slimlauncher/ExampleUnitTest.java

@@ -1,5 +0,0 @@
-package com.sduduzog.slimlauncher;
-
-public class ExampleUnitTest {
-
-}