beautusg 7 лет назад
Родитель
Сommit
befbaefe3c
38 измененных файлов с 5 добавлено и 1827 удалено
  1. 0 9
      app/src/main/java/com/sduduzog/slimlauncher/MainActivity.kt
  2. 0 5
      app/src/main/java/com/sduduzog/slimlauncher/Observer.kt
  3. 0 7
      app/src/main/java/com/sduduzog/slimlauncher/Subject.kt
  4. 0 87
      app/src/main/java/com/sduduzog/slimlauncher/data/DataRepository.kt
  5. 2 2
      app/src/main/java/com/sduduzog/slimlauncher/dialogs/RenameAppDialog.kt
  6. 0 28
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/AboutFragment.kt
  7. 0 57
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/MainViewModel.kt
  8. 0 40
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/StatusBarThemeFragment.kt
  9. 0 51
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/settings/AppsFragment.kt
  10. 0 67
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/settings/AppsListAdapter.kt
  11. 0 100
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/settings/SettingsFragment.kt
  12. 0 136
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/settings/SettingsListAdapter.kt
  13. 0 35
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/settings/ThemeChooserDialog.kt
  14. 0 82
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/setup/ChooseAppsDialog.kt
  15. 0 5
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/setup/OnPagerListener.kt
  16. 0 7
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/setup/PagerHelperFragment.kt
  17. 0 72
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/setup/SetupFragment.kt
  18. 0 48
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/setup/SplashFragment.kt
  19. 0 61
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/setup/ThemeSetupFragment.kt
  20. 0 9
      app/src/main/res/drawable/ic_expand.xml
  21. 0 3
      app/src/main/res/drawable/ic_my_phone.xml
  22. 0 12
      app/src/main/res/drawable/ic_slim.xml
  23. 0 9
      app/src/main/res/drawable/ic_text_fields.xml
  24. 0 38
      app/src/main/res/layout/about_fragment.xml
  25. 0 11
      app/src/main/res/layout/apps_fragment.xml
  26. 0 13
      app/src/main/res/layout/apps_list_item.xml
  27. 0 134
      app/src/main/res/layout/main_bottom_sheet.xml
  28. 0 77
      app/src/main/res/layout/main_content.xml
  29. 0 13
      app/src/main/res/layout/main_fragment.xml
  30. 0 17
      app/src/main/res/layout/main_list_item.xml
  31. 0 193
      app/src/main/res/layout/settings_fragment.xml
  32. 0 67
      app/src/main/res/layout/settings_list_item.xml
  33. 0 6
      app/src/main/res/layout/setup_fragment.xml
  34. 0 77
      app/src/main/res/layout/splash_fragment.xml
  35. 0 188
      app/src/main/res/layout/theme_setup_fragment.xml
  36. 1 1
      app/src/main/res/navigation/nav_graph.xml
  37. 1 1
      app/src/main/res/values/dimens.xml
  38. 1 59
      app/src/main/res/values/strings.xml

+ 0 - 9
app/src/main/java/com/sduduzog/slimlauncher/MainActivity.kt

@@ -5,10 +5,8 @@ import android.content.res.Resources
 import android.os.Bundle
 import android.view.View
 import androidx.appcompat.app.AppCompatActivity
-import androidx.lifecycle.ViewModelProviders
 import androidx.navigation.NavController
 import androidx.navigation.Navigation.findNavController
-import com.sduduzog.slimlauncher.ui.main.MainViewModel
 import com.sduduzog.slimlauncher.utils.Publisher
 import com.sduduzog.slimlauncher.utils.Subscriber
 
@@ -16,7 +14,6 @@ import com.sduduzog.slimlauncher.utils.Subscriber
 class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceChangeListener, Publisher {
 
     private lateinit var settings: SharedPreferences
-    private lateinit var viewModel: MainViewModel
     private lateinit var navigator: NavController
     private val subscribers: MutableSet<Subscriber> = mutableSetOf()
 
@@ -39,12 +36,6 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
         settings = getSharedPreferences(getString(R.string.prefs_settings), MODE_PRIVATE)
         settings.registerOnSharedPreferenceChangeListener(this)
         navigator = findNavController(this, R.id.nav_host_fragment)
-        viewModel = ViewModelProviders.of(this).get(MainViewModel::class.java)
-    }
-
-    override fun onStart() {
-        super.onStart()
-        viewModel.refreshApps()
     }
 
     override fun onResume() {

+ 0 - 5
app/src/main/java/com/sduduzog/slimlauncher/Observer.kt

@@ -1,5 +0,0 @@
-package com.sduduzog.slimlauncher
-
-interface Observer {
-    fun update(on: String)
-}

+ 0 - 7
app/src/main/java/com/sduduzog/slimlauncher/Subject.kt

@@ -1,7 +0,0 @@
-package com.sduduzog.slimlauncher
-
-abstract class Subject {
-    abstract fun attachObserver(o: Observer)
-    abstract fun detachObserver(o: Observer)
-    abstract fun notifyObservers()
-}

+ 0 - 87
app/src/main/java/com/sduduzog/slimlauncher/data/DataRepository.kt

@@ -1,12 +1,8 @@
 package com.sduduzog.slimlauncher.data
 
 import android.app.Application
-import android.content.Intent
-import android.content.pm.PackageManager
-import android.content.pm.ResolveInfo
 import android.os.AsyncTask
 import androidx.lifecycle.LiveData
-import java.util.*
 
 class DataRepository(application: Application) {
 
@@ -14,46 +10,14 @@ class DataRepository(application: Application) {
     private val appDao: AppDao = db.appDao()
     private val noteDao: NoteDao = db.noteDao()
     private var _apps: LiveData<List<App>> = appDao.apps
-    private var _homeApps: LiveData<List<HomeApp>> = appDao.homeApps
     private var _notes: LiveData<List<Note>> = noteDao.notes
 
-    private var pm: PackageManager = application.packageManager
-
-    val homeApps: LiveData<List<HomeApp>>
-        get() = _homeApps
-
     val apps: LiveData<List<App>>
         get() = _apps
 
     val notes: LiveData<List<Note>>
         get() = _notes
 
-    fun insertHomeApp(app: HomeApp) {
-        InsertHomeAppAsyncTask(appDao).execute(app)
-    }
-
-    fun deleteHomeApp(app: HomeApp) {
-        DeleteHomeAppAsyncTask(appDao).execute(app)
-    }
-
-    fun clearHomeApps() {
-        ClearHomeAppsAsyncTask(appDao).execute()
-    }
-
-    fun updateApps(list: List<HomeApp>) {
-        for (app in list) {
-            UpdateAppsAsyncTask(appDao).execute(app)
-        }
-    }
-
-    fun refreshApps() {
-        RefreshAppsAsyncTask(appDao).execute(pm)
-    }
-
-    fun renameApp(app: HomeApp) {
-        UpdateAppsAsyncTask(appDao).execute(app)
-    }
-
     fun saveNote(note: Note) {
         SaveNoteAsyncTask(noteDao).execute(note)
     }
@@ -66,57 +30,6 @@ class DataRepository(application: Application) {
         DeleteNoteAsyncTask(noteDao).execute(note)
     }
 
-    private class InsertHomeAppAsyncTask internal constructor(private val mAsyncTaskDao: AppDao) : AsyncTask<HomeApp, Void, Void>() {
-
-        override fun doInBackground(vararg params: HomeApp): Void? {
-            mAsyncTaskDao.add(params[0])
-            return null
-        }
-    }
-
-    private class DeleteHomeAppAsyncTask internal constructor(private val mAsyncTaskDao: AppDao) : AsyncTask<HomeApp, Void, Void>() {
-
-        override fun doInBackground(vararg params: HomeApp): Void? {
-            mAsyncTaskDao.remove(params[0])
-            return null
-        }
-    }
-
-    private class ClearHomeAppsAsyncTask internal constructor(private val mAsyncTaskDao: AppDao) : AsyncTask<Void, Void, Void>() {
-
-        override fun doInBackground(vararg params: Void): Void? {
-            mAsyncTaskDao.clearHomeApps()
-            return null
-        }
-    }
-
-    private class UpdateAppsAsyncTask internal constructor(private val mAsyncTaskDao: AppDao) : AsyncTask<HomeApp, Void, Void>() {
-
-        override fun doInBackground(vararg params: HomeApp): Void? {
-            mAsyncTaskDao.updateHomeApp(params[0])
-            return null
-        }
-    }
-
-    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, ResolveInfo.DisplayNameComparator(pm))
-            for (i in activitiesList.indices) {
-                val item = activitiesList[i]
-                val activity = item.activityInfo
-                val app = App(activitiesList[i].loadLabel(pm).toString(), activity.applicationInfo.packageName, activity.name)
-                mAsyncTaskDao.insert(app)
-            }
-            return null
-        }
-    }
-
     private class SaveNoteAsyncTask internal constructor(private val mAsyncTaskDao: NoteDao) : AsyncTask<Note, Void, Void>() {
 
         override fun doInBackground(vararg params: Note): Void? {

+ 2 - 2
app/src/main/java/com/sduduzog/slimlauncher/dialogs/RenameAppDialog.kt

@@ -9,7 +9,7 @@ import androidx.fragment.app.DialogFragment
 import com.sduduzog.slimlauncher.R
 import com.sduduzog.slimlauncher.data.HomeApp
 import com.sduduzog.slimlauncher.data.MainViewModel
-import kotlinx.android.synthetic.main.settings_fragment.*
+import kotlinx.android.synthetic.main.customise_apps_fragment.*
 
 class RenameAppDialog : DialogFragment() {
 
@@ -17,7 +17,7 @@ class RenameAppDialog : DialogFragment() {
     private lateinit var model: MainViewModel
 
     override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
-        val view = LayoutInflater.from(context).inflate(R.layout.settings_rename_app, settingsAppList)
+        val view = LayoutInflater.from(context).inflate(R.layout.settings_rename_app, customise_apps_fragment)
         val editText = view.findViewById<EditText>(R.id.rename_editText)
         editText.text.append(app.appName)
         val builder = AlertDialog.Builder(context!!)

+ 0 - 28
app/src/main/java/com/sduduzog/slimlauncher/ui/main/AboutFragment.kt

@@ -1,28 +0,0 @@
-package com.sduduzog.slimlauncher.ui.main
-
-
-import android.os.Bundle
-import android.text.method.LinkMovementMethod
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.fragment.app.Fragment
-import com.sduduzog.slimlauncher.BuildConfig
-import com.sduduzog.slimlauncher.R
-import kotlinx.android.synthetic.main.about_fragment.*
-
-
-class AboutFragment : Fragment() {
-
-    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
-                              savedInstanceState: Bundle?): View? {
-        // Inflate the layout for this fragment
-        return inflater.inflate(R.layout.about_fragment, container, false)
-    }
-
-    override fun onActivityCreated(savedInstanceState: Bundle?) {
-        super.onActivityCreated(savedInstanceState)
-        aboutVersionText.text = getString(R.string.about_title, BuildConfig.VERSION_NAME)
-        aboutDescriptionText.movementMethod = LinkMovementMethod.getInstance()
-    }
-}

+ 0 - 57
app/src/main/java/com/sduduzog/slimlauncher/ui/main/MainViewModel.kt

@@ -1,57 +0,0 @@
-package com.sduduzog.slimlauncher.ui.main
-
-import android.app.Application
-import androidx.lifecycle.AndroidViewModel
-import androidx.lifecycle.LiveData
-import com.sduduzog.slimlauncher.data.App
-import com.sduduzog.slimlauncher.data.DataRepository
-import com.sduduzog.slimlauncher.data.HomeApp
-
-class MainViewModel(application: Application) : AndroidViewModel(application) {
-    private var _repository: DataRepository = DataRepository.getInstance(application)
-    private var _homeApps: LiveData<List<HomeApp>>
-    private var _apps: LiveData<List<App>>
-
-    init {
-        _homeApps = _repository.homeApps
-        _apps = _repository.apps
-    }
-
-    val homeApps: LiveData<List<HomeApp>>
-        get() = _homeApps
-
-    val apps: LiveData<List<App>>
-        get() = _apps
-
-    fun deleteApp(app: HomeApp) {
-        _repository.deleteHomeApp(app)
-    }
-
-    fun updateApps(list: List<HomeApp>) {
-        _repository.updateApps(list)
-    }
-
-    fun refreshApps() {
-        _repository.refreshApps()
-    }
-
-    fun addToHomeScreen(app: HomeApp) {
-        _repository.insertHomeApp(app)
-    }
-
-    fun renameApp(app: HomeApp) {
-        _repository.renameApp(app)
-    }
-
-    fun clearHomeApps() {
-        _repository.clearHomeApps()
-    }
-
-    fun addToHomeScreen(apps: List<App>) {
-        for (i in apps.indices) {
-            val app = apps[i]
-            val home = HomeApp(app.appName, app.packageName, app.activityName, i)
-            _repository.insertHomeApp(home)
-        }
-    }
-}

+ 0 - 40
app/src/main/java/com/sduduzog/slimlauncher/ui/main/StatusBarThemeFragment.kt

@@ -1,40 +0,0 @@
-package com.sduduzog.slimlauncher.ui.main
-
-import android.os.Build
-import android.util.TypedValue
-import android.view.View
-import androidx.appcompat.app.AppCompatActivity
-import androidx.fragment.app.Fragment
-import com.sduduzog.slimlauncher.R
-
-abstract class StatusBarThemeFragment : Fragment() {
-
-
-    /**
-     * @return [android.view.View] of the [androidx.fragment.app.Fragment] extending this class to apply flags to
-     */
-    abstract fun getFragmentView(): View
-
-
-    override fun onResume() {
-        super.onResume()
-        // When the Fragment resumes, check the theme and set the status bar color accordingly.
-        val settings = context!!.getSharedPreferences(getString(R.string.prefs_settings), AppCompatActivity.MODE_PRIVATE)
-        val active = settings.getInt(getString(R.string.prefs_settings_key_theme), 0)
-
-
-        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
-            when (active) {
-                0, 3, 5 -> {
-                    val flags = activity!!.window.decorView.systemUiVisibility or View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
-                    getFragmentView().systemUiVisibility = flags
-                }
-
-            }
-            val value = TypedValue()
-            context!!.theme.resolveAttribute(R.attr.colorPrimary, value, true)
-            activity!!.window.statusBarColor = value.data
-        }
-    }
-
-}

+ 0 - 51
app/src/main/java/com/sduduzog/slimlauncher/ui/main/settings/AppsFragment.kt

@@ -1,51 +0,0 @@
-package com.sduduzog.slimlauncher.ui.main.settings
-
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.fragment.app.Fragment
-import androidx.lifecycle.ViewModelProviders
-import androidx.navigation.Navigation
-import com.sduduzog.slimlauncher.R
-import com.sduduzog.slimlauncher.ui.main.MainViewModel
-import kotlinx.android.synthetic.main.apps_fragment.*
-
-
-class AppsFragment : Fragment() {
-
-    private lateinit var viewModel: MainViewModel
-    private lateinit var mAdapter: AppsListAdapter
-    private var appIndex: Int = 0
-
-    override fun onCreate(savedInstanceState: Bundle?) {
-        super.onCreate(savedInstanceState)
-        arguments.apply {
-            appIndex = this!!.getInt("index")
-        }
-    }
-
-    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
-                              savedInstanceState: Bundle?): View? {
-        return inflater.inflate(R.layout.apps_fragment, container, false)
-    }
-
-    override fun onActivityCreated(savedInstanceState: Bundle?) {
-        super.onActivityCreated(savedInstanceState)
-        viewModel = ViewModelProviders.of(this).get(MainViewModel::class.java)
-
-        mAdapter = AppsListAdapter(this, InteractionHandler(), appIndex)
-        appList.adapter = mAdapter
-    }
-
-    inner class InteractionHandler : OnAppsChooserListener {
-        override fun onAppChosen() {
-            val nav = Navigation.findNavController(appList)
-            nav.popBackStack()
-        }
-    }
-
-    interface OnAppsChooserListener {
-        fun onAppChosen()
-    }
-}

+ 0 - 67
app/src/main/java/com/sduduzog/slimlauncher/ui/main/settings/AppsListAdapter.kt

@@ -1,67 +0,0 @@
-package com.sduduzog.slimlauncher.ui.main.settings
-
-
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.TextView
-import androidx.fragment.app.Fragment
-import androidx.lifecycle.Observer
-import androidx.lifecycle.ViewModelProviders
-import androidx.recyclerview.widget.RecyclerView
-import com.sduduzog.slimlauncher.R
-import com.sduduzog.slimlauncher.data.App
-import com.sduduzog.slimlauncher.data.HomeApp
-import com.sduduzog.slimlauncher.ui.main.MainViewModel
-import com.sduduzog.slimlauncher.ui.main.settings.AppsFragment.OnAppsChooserListener
-import kotlinx.android.synthetic.main.apps_list_item.view.*
-
-
-class AppsListAdapter(fragment: Fragment,
-                      private val mListener: OnAppsChooserListener?,
-                      private val appIndex: Int)
-    : RecyclerView.Adapter<AppsListAdapter.ViewHolder>() {
-
-    private var mValues: List<App> = listOf()
-    private var viewModel: MainViewModel = ViewModelProviders.of(fragment).get(MainViewModel::class.java)
-
-    init {
-        viewModel.apps.observe(fragment, Observer {
-            if (it != null) {
-                mValues = it
-                notifyDataSetChanged()
-            }
-        })
-    }
-
-    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
-        val view = LayoutInflater.from(parent.context)
-                .inflate(R.layout.apps_list_item, parent, false)
-        return ViewHolder(view)
-    }
-
-    override fun onBindViewHolder(holder: ViewHolder, position: Int) {
-        val item = mValues.elementAt(position)
-        holder.mLabelView.text = item.appName
-        with(holder.mView) {
-            tag = item
-            setOnClickListener {
-                val app = it.tag as App
-                val homeApp = HomeApp(app.appName, app.packageName, app.activityName, appIndex)
-                viewModel.addToHomeScreen(homeApp)
-                mListener?.onAppChosen()
-            }
-        }
-    }
-
-    override fun getItemCount(): Int = mValues.size
-
-
-    inner class ViewHolder(val mView: View) : RecyclerView.ViewHolder(mView) {
-        val mLabelView: TextView = mView.label
-
-        override fun toString(): String {
-            return super.toString() + " '" + mLabelView.text + "'"
-        }
-    }
-}

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

@@ -1,100 +0,0 @@
-package com.sduduzog.slimlauncher.ui.main.settings
-
-
-import android.content.Context.MODE_PRIVATE
-import android.graphics.Canvas
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.core.content.edit
-import androidx.recyclerview.widget.ItemTouchHelper
-import androidx.recyclerview.widget.RecyclerView
-import com.sduduzog.slimlauncher.R
-import com.sduduzog.slimlauncher.ui.main.OnItemActionListener
-import com.sduduzog.slimlauncher.ui.main.StatusBarThemeFragment
-import kotlinx.android.synthetic.main.settings_fragment.*
-
-
-class SettingsFragment : StatusBarThemeFragment() {
-
-    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
-                              savedInstanceState: Bundle?): View? {
-        return inflater.inflate(R.layout.settings_fragment, container, false)
-    }
-
-    override fun onActivityCreated(savedInstanceState: Bundle?) {
-        super.onActivityCreated(savedInstanceState)
-        val adapter = SettingsListAdapter(this)
-        settingsAppList.adapter = adapter
-        val listener: OnItemActionListener = adapter
-
-        val simpleItemTouchCallback = object : ItemTouchHelper.Callback() {
-
-            override fun onChildDraw(c: Canvas, recyclerView: RecyclerView,
-                                     viewHolder: RecyclerView.ViewHolder, dX: Float,
-                                     dY: Float, actionState: Int, isCurrentlyActive: Boolean) {
-                if (isCurrentlyActive) {
-                    viewHolder.itemView.alpha = 0.5f
-                } else {
-                    viewHolder.itemView.alpha = 1f
-                }
-                super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive)
-            }
-
-            override fun clearView(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder) {
-                super.clearView(recyclerView, viewHolder)
-                listener.onViewIdle()
-            }
-
-            override fun getMovementFlags(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder): Int {
-                val dragFlags = ItemTouchHelper.UP or ItemTouchHelper.DOWN
-                val swipeFlags = ItemTouchHelper.LEFT or ItemTouchHelper.RIGHT
-                return makeMovementFlags(dragFlags, swipeFlags)
-            }
-
-            override fun onMove(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder,
-                                target: RecyclerView.ViewHolder): Boolean {
-                return listener.onViewMoved(viewHolder.adapterPosition, target.adapterPosition)
-            }
-
-            override fun onSwiped(viewHolder: RecyclerView.ViewHolder, direction: Int) {
-                //adapter.deleteAppFromList(viewHolder.adapterPosition)
-                listener.onViewSwiped(viewHolder.adapterPosition)
-            }
-
-            override fun isLongPressDragEnabled() = false
-        }
-
-        val itemTouchHelper = ItemTouchHelper(simpleItemTouchCallback)
-
-        itemTouchHelper.attachToRecyclerView(settingsAppList)
-
-        adapter.setItemTouchHelper(itemTouchHelper)
-
-        buttonChangeTheme.setOnClickListener {
-            val themeChooserDialog = ThemeChooserDialog.getThemeChooser()
-            themeChooserDialog.showNow(fragmentManager, "THEME_CHOOSER")
-        }
-        initComponents()
-    }
-
-    override fun getFragmentView(): View = settings_fragment
-
-    private fun initComponents() {
-        val settings = context!!.getSharedPreferences(getString(R.string.prefs_settings), MODE_PRIVATE)
-        clockSwitch.isChecked = settings.getBoolean(getString(R.string.prefs_settings_key_time_format), false)
-        clockSwitch.setOnCheckedChangeListener { _, b ->
-            settings.edit {
-                putBoolean(getString(R.string.prefs_settings_key_time_format), b)
-            }
-        }
-
-        statusBarSwitch.isChecked = settings.getBoolean(getString(R.string.prefs_settings_key_toggle_status_bar), false)
-        statusBarSwitch.setOnCheckedChangeListener { _, b ->
-            settings.edit {
-                putBoolean(getString(R.string.prefs_settings_key_toggle_status_bar), b)
-            }
-        }
-    }
-}

+ 0 - 136
app/src/main/java/com/sduduzog/slimlauncher/ui/main/settings/SettingsListAdapter.kt

@@ -1,136 +0,0 @@
-package com.sduduzog.slimlauncher.ui.main.settings
-
-import android.annotation.SuppressLint
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.MotionEvent
-import android.view.View
-import android.view.ViewGroup
-import android.widget.Button
-import android.widget.ImageView
-import android.widget.TextView
-import androidx.fragment.app.Fragment
-import androidx.lifecycle.Observer
-import androidx.lifecycle.ViewModelProviders
-import androidx.recyclerview.widget.ItemTouchHelper
-import androidx.recyclerview.widget.RecyclerView
-import com.google.android.material.snackbar.Snackbar
-import com.sduduzog.slimlauncher.R
-import com.sduduzog.slimlauncher.data.HomeApp
-import com.sduduzog.slimlauncher.ui.main.MainViewModel
-import com.sduduzog.slimlauncher.ui.main.OnItemActionListener
-
-class SettingsListAdapter(private val fragment: Fragment) : RecyclerView.Adapter<SettingsListAdapter.AppViewHolder>(), OnItemActionListener {
-
-    private var deletedFromIndex = 0
-    private var renamedOnIndex = -1
-    private lateinit var inflater: LayoutInflater
-    private var displayedApps: ArrayList<HomeApp> = arrayListOf()
-    private var viewModel: MainViewModel = ViewModelProviders.of(fragment).get(MainViewModel::class.java)
-
-    private lateinit var touchHelper: ItemTouchHelper
-
-    init {
-        viewModel.homeApps.observe(fragment, Observer {
-            updateApps(it.orEmpty())
-        })
-    }
-
-    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AppViewHolder {
-        inflater = LayoutInflater.from(parent.context)
-        val view = inflater.inflate(R.layout.settings_list_item, parent, false)
-        return AppViewHolder(view)
-    }
-
-    @SuppressLint("ClickableViewAccessibility")
-    override fun onBindViewHolder(holder: AppViewHolder, position: Int) {
-        if (position < displayedApps.size) {
-            val app = displayedApps[position]
-            with(app) {
-                holder.itemText.text = this.appName
-            }
-            holder.itemButton.visibility = View.GONE
-            holder.itemDragger.visibility = View.VISIBLE
-            holder.itemDragger.setOnTouchListener { _, motionEvent ->
-                if (motionEvent.actionMasked == MotionEvent.ACTION_DOWN) {
-                    touchHelper.startDrag(holder)
-                }
-                false
-            }
-
-            holder.itemView.setOnClickListener {
-                val snackbar = Snackbar.make(it, "You're still in preferences, silly. Go back to the home screen to start this app", Snackbar.LENGTH_LONG)
-                snackbar.show()
-            }
-
-            holder.itemView.setOnLongClickListener {
-//                RenameAppDialog.rename(app, viewModel).show(fragment.childFragmentManager, "SettingsListAdapter")
-                renamedOnIndex = position
-                true
-            }
-        } else {
-            holder.itemText.text = fragment.getString(R.string.settings_list_item_text)
-            holder.itemText.alpha = .3f
-            holder.itemButton.visibility = View.VISIBLE
-            holder.itemDragger.visibility = View.GONE
-            val bundle = Bundle()
-            bundle.putInt("index", position)
-//            holder.itemButton.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_openAppsFragment, bundle))
-        }
-    }
-
-    override fun getItemCount() = if (displayedApps.size != 5) displayedApps.size + 1 else displayedApps.size
-
-
-    private fun updateApps(newList: List<HomeApp>) {
-        val size = displayedApps.size
-        displayedApps.clear()
-        displayedApps.addAll(newList)
-        when {
-            size > newList.size -> notifyItemRemoved(deletedFromIndex)
-            size < newList.size -> notifyItemRangeChanged(size, displayedApps.size - size)
-            renamedOnIndex != -1 -> {
-                notifyItemChanged(renamedOnIndex)
-                renamedOnIndex = -1
-            }
-        }
-    }
-
-    override fun onViewMoved(oldPosition: Int, newPosition: Int): Boolean {
-        if ((oldPosition < displayedApps.size) and (newPosition < displayedApps.size)) {
-            val app1 = displayedApps[oldPosition]
-            val app2 = displayedApps[newPosition]
-            app1.sortingIndex = newPosition
-            app2.sortingIndex = oldPosition
-
-            displayedApps[oldPosition] = app2
-            displayedApps[newPosition] = app1
-            notifyItemMoved(oldPosition, newPosition)
-            return true
-        }
-        return false
-    }
-
-    override fun onViewSwiped(position: Int) {
-        deletedFromIndex = position
-        if (position < displayedApps.size) {
-            viewModel.deleteApp(displayedApps[position])
-        } else
-            notifyDataSetChanged()
-    }
-
-    override fun onViewIdle() {
-        viewModel.updateApps(displayedApps)
-    }
-
-    fun setItemTouchHelper(touchHelper: ItemTouchHelper) {
-        this.touchHelper = touchHelper
-    }
-
-    inner class AppViewHolder(view: View)// Bind item views here
-        : RecyclerView.ViewHolder(view) {
-        val itemText: TextView = view.findViewById(R.id.item_text)
-        val itemButton: Button = view.findViewById(R.id.item_button)
-        val itemDragger: ImageView = view.findViewById(R.id.item_dragger)
-    }
-}

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

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

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

@@ -1,82 +0,0 @@
-package com.sduduzog.slimlauncher.ui.main.setup
-
-import android.app.AlertDialog
-import android.app.Dialog
-import android.content.Intent
-import android.content.pm.ResolveInfo
-import android.os.Bundle
-import android.widget.Toast
-import androidx.fragment.app.DialogFragment
-import com.sduduzog.slimlauncher.R
-import com.sduduzog.slimlauncher.data.App
-import java.util.*
-
-class ChooseAppsDialog : DialogFragment() {
-    private lateinit var listener: OnChooseAppsListener
-    private lateinit var apps: MutableList<App>
-    private lateinit var checkedItems: BooleanArray
-
-    override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
-        val pm = activity!!.packageManager
-        val main = Intent(Intent.ACTION_MAIN, null)
-        main.addCategory(Intent.CATEGORY_LAUNCHER)
-        val launchables = pm.queryIntentActivities(main, 0)
-        Collections.sort(launchables,
-                ResolveInfo.DisplayNameComparator(pm))
-        apps = mutableListOf()
-        for (i in launchables.indices) {
-            val item = launchables[i]
-            val activity = item.activityInfo
-            val app = App(launchables[i].loadLabel(pm).toString(), activity.applicationInfo.packageName, activity.name)
-            apps.add(app)
-        }
-        val appNames = arrayOfNulls<String>(apps.size)
-        checkedItems = BooleanArray(apps.size)
-        for (i in apps.indices) {
-            appNames[i] = apps[i].appName
-        }
-
-        val builder = AlertDialog.Builder(context!!)
-        builder.setMultiChoiceItems(appNames, checkedItems) { _, i, b ->
-            checkedItems[i] = b
-            if (checkedItems.filter { it }.size == 5) {
-                setApps()
-                dismiss()
-            }
-
-        }
-        builder.setPositiveButton("Done") { _, _ ->
-            if (checkedItems.none { it }) {
-                Toast.makeText(context, getString(R.string.no_app_selected_toast_msg), Toast.LENGTH_SHORT).show()
-            } else {
-                setApps()
-            }
-        }
-        builder.setTitle(getString(R.string.choose_apps_title))
-
-        return builder.create()
-    }
-
-    private fun setApps() {
-        val list = mutableListOf<App>()
-        for (i in checkedItems.indices) {
-            if (checkedItems[i]) {
-                list.add(apps[i])
-            }
-        }
-        listener.onChooseApps(list)
-    }
-
-    companion object {
-
-        fun getInstance(listener: OnChooseAppsListener): ChooseAppsDialog {
-            return ChooseAppsDialog().apply {
-                this.listener = listener
-            }
-        }
-
-        interface OnChooseAppsListener {
-            fun onChooseApps(apps: List<App>)
-        }
-    }
-}

+ 0 - 5
app/src/main/java/com/sduduzog/slimlauncher/ui/main/setup/OnPagerListener.kt

@@ -1,5 +0,0 @@
-package com.sduduzog.slimlauncher.ui.main.setup
-
-interface OnPagerListener {
-    fun onPage(position: Int)
-}

+ 0 - 7
app/src/main/java/com/sduduzog/slimlauncher/ui/main/setup/PagerHelperFragment.kt

@@ -1,7 +0,0 @@
-package com.sduduzog.slimlauncher.ui.main.setup
-
-import androidx.fragment.app.Fragment
-
-abstract class PagerHelperFragment : Fragment() {
-    var listener: OnPagerListener? = null
-}

+ 0 - 72
app/src/main/java/com/sduduzog/slimlauncher/ui/main/setup/SetupFragment.kt

@@ -1,72 +0,0 @@
-package com.sduduzog.slimlauncher.ui.main.setup
-
-
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.fragment.app.Fragment
-import androidx.fragment.app.FragmentManager
-import androidx.fragment.app.FragmentPagerAdapter
-import com.sduduzog.slimlauncher.R
-import com.sduduzog.slimlauncher.ui.main.StatusBarThemeFragment
-import kotlinx.android.synthetic.main.setup_fragment.*
-
-
-class SetupFragment : StatusBarThemeFragment() {
-
-    private lateinit var onPagerListener: OnPagerListener
-    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
-                              savedInstanceState: Bundle?): View? {
-        // Inflate the layout for this fragment
-        return inflater.inflate(R.layout.setup_fragment, container, false)
-    }
-
-    override fun onActivityCreated(savedInstanceState: Bundle?) {
-        super.onActivityCreated(savedInstanceState)
-
-        setup_view_pager.adapter = SectionsPagerAdapter(childFragmentManager)
-
-        setup_view_pager.setOnTouchListener { _, _ -> true }
-    }
-
-    override fun onStart() {
-        super.onStart()
-        onPagerListener = object : OnPagerListener {
-            override fun onPage(position: Int) {
-                setup_view_pager.currentItem = position
-            }
-        }
-    }
-
-    override fun getFragmentView(): View = setup_view_pager
-
-    inner class SectionsPagerAdapter(fm: FragmentManager) : FragmentPagerAdapter(fm) {
-
-        override fun getItem(position: Int): Fragment {
-            return when (position) {
-                1 -> ThemeSetupFragment.newInstance().apply {
-                    this.listener = onPagerListener
-                }
-                else -> SplashFragment.newInstance().apply {
-                    this.listener = onPagerListener
-                }
-            }
-        }
-
-        override fun getCount(): Int {
-            return 5
-        }
-
-        override fun getPageTitle(position: Int): CharSequence? {
-            when (position) {
-                0 -> return "Splash screen"
-                1 -> return "Home setup"
-                2 -> return "Clock setup"
-                3 -> return "Theme setup"
-                4 -> return "Dialer setup"
-            }
-            return null
-        }
-    }
-}

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

@@ -1,48 +0,0 @@
-package com.sduduzog.slimlauncher.ui.main.setup
-
-
-import android.content.Context.MODE_PRIVATE
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.lifecycle.ViewModelProviders
-import com.sduduzog.slimlauncher.R
-import com.sduduzog.slimlauncher.data.App
-import com.sduduzog.slimlauncher.ui.main.MainViewModel
-import kotlinx.android.synthetic.main.splash_fragment.*
-
-class SplashFragment : PagerHelperFragment(), ChooseAppsDialog.Companion.OnChooseAppsListener {
-
-    private lateinit var viewModel: MainViewModel
-
-    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
-                              savedInstanceState: Bundle?): View? {
-        // Inflate the layout for this fragment
-        return inflater.inflate(R.layout.splash_fragment, container, false)
-    }
-
-    override fun onActivityCreated(savedInstanceState: Bundle?) {
-        super.onActivityCreated(savedInstanceState)
-        viewModel = ViewModelProviders.of(this).get(MainViewModel::class.java)
-        setup_splash_button_start.setOnClickListener {
-                ChooseAppsDialog.getInstance(this).show(childFragmentManager, "HomeSetupFragment")
-        }
-        val settings = activity!!.getSharedPreferences(getString(R.string.prefs_settings), MODE_PRIVATE)
-        if (!settings.getBoolean(getString(R.string.prefs_settings_key_fresh_install_setup), true)) {
-//            Navigation.findNavController(splash_fragment).navigate(R.id.action_setupFragment_to_mainFragment2)
-        }
-    }
-
-        override fun onChooseApps(apps: List<App>) {
-            viewModel.clearHomeApps()
-            viewModel.addToHomeScreen(apps)
-            listener?.onPage(1) // Move to next section
-        }
-
-
-    companion object {
-        @JvmStatic
-        fun newInstance() = SplashFragment()
-    }
-}

+ 0 - 61
app/src/main/java/com/sduduzog/slimlauncher/ui/main/setup/ThemeSetupFragment.kt

@@ -1,61 +0,0 @@
-package com.sduduzog.slimlauncher.ui.main.setup
-
-
-import android.content.Context
-import android.content.Context.MODE_PRIVATE
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.core.content.edit
-import com.sduduzog.slimlauncher.R
-import kotlinx.android.synthetic.main.theme_setup_fragment.*
-
-
-class ThemeSetupFragment : PagerHelperFragment(), View.OnClickListener {
-
-    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
-                              savedInstanceState: Bundle?): View? {
-        // Inflate the layout for this fragment
-        return inflater.inflate(R.layout.theme_setup_fragment, container, false)
-    }
-
-    override fun onActivityCreated(savedInstanceState: Bundle?) {
-        super.onActivityCreated(savedInstanceState)
-
-        setup_fab_candy.setOnClickListener(this)
-        setup_fab_dark.setOnClickListener(this)
-        setup_fab_default.setOnClickListener(this)
-        setup_fab_jupiter.setOnClickListener(this)
-        setup_fab_pastel.setOnClickListener(this)
-        setup_fab_teal.setOnClickListener(this)
-
-        theme_setup_button.setOnClickListener {
-            val settings = activity!!.getSharedPreferences(getString(R.string.prefs_settings), MODE_PRIVATE)
-            settings.edit {
-                putBoolean(getString(R.string.prefs_settings_key_fresh_install_setup), false)
-            }
-//            Navigation.findNavController(theme_setup_fragment).navigate(R.id.action_setupFragment_to_mainFragment2)
-        }
-    }
-
-    override fun onClick(view: View) {
-        val index = when (view.id) {
-            R.id.setup_fab_dark -> 1
-            R.id.setup_fab_jupiter -> 2
-            R.id.setup_fab_teal -> 3
-            R.id.setup_fab_candy -> 4
-            R.id.setup_fab_pastel -> 5
-            else -> 0
-        }
-        val settings = activity!!.getSharedPreferences(getString(R.string.prefs_settings), Context.MODE_PRIVATE)
-        settings.edit {
-            putInt(getString(R.string.prefs_settings_key_theme), index)
-        }
-    }
-
-    companion object {
-        @JvmStatic
-        fun newInstance() = ThemeSetupFragment()
-    }
-}

+ 0 - 9
app/src/main/res/drawable/ic_expand.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="?attr/colorAccent"
-        android:pathData="M12,8l-6,6 1.41,1.41L12,10.83l4.59,4.58L18,14z" />
-</vector>

Разница между файлами не показана из-за своего большого размера
+ 0 - 3
app/src/main/res/drawable/ic_my_phone.xml


+ 0 - 12
app/src/main/res/drawable/ic_slim.xml

@@ -1,12 +0,0 @@
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:width="200dp"
-    android:height="200dp"
-    android:viewportWidth="364.8"
-    android:viewportHeight="364.8">
-    <path
-        android:fillColor="#FF000000"
-        android:pathData="m173.79,343.55c-8.988,-0.539 -17.782,-1.74 -26.08,-3.562 -65.858,-14.457 -115.83,-67.785 -126.05,-134.52 -2.362,-15.418 -2.362,-33.222 0,-48.64 10.811,-70.572 65.882,-125.64 136.45,-136.45 15.418,-2.362 33.222,-2.362 48.64,0 70.572,10.811 125.64,65.882 136.45,136.45 1.242,8.109 1.73,14.964 1.73,24.32 0,9.356 -0.488,16.211 -1.73,24.32 -11.347,74.07 -71.37,130.67 -145.89,137.58 -6.66,0.617 -17.689,0.853 -23.52,0.504zM177.96,215.51c-10.277,-1.497 -18.477,-9.697 -19.974,-19.974 -0.192,-1.322 -0.29,1.516 -0.317,9.21l-0.039,11.12 11.12,-0.039c7.694,-0.027 10.531,-0.125 9.21,-0.317zM266.11,161.626v-54.24h-108.48l0.039,41.68c0.023,25.033 0.15,40.917 0.317,39.77 1.266,-8.695 7.378,-16.078 15.632,-18.886 12.379,-4.21 25.761,2.293 29.928,14.544 1.73,5.085 1.73,10.298 0,15.383 -2.807,8.254 -10.191,14.366 -18.886,15.632 -1.147,0.167 14.737,0.294 39.77,0.317l41.68,0.039z"
-        android:strokeWidth=".32"
-        tools:ignore="VectorPath" />
-</vector>

+ 0 - 9
app/src/main/res/drawable/ic_text_fields.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="#FF000000"
-        android:pathData="M2.5,4v3h5v12h3L10.5,7h5L15.5,4h-13zM21.5,9h-9v3h3v7h3v-7h3L21.5,9z" />
-</vector>

+ 0 - 38
app/src/main/res/layout/about_fragment.xml

@@ -1,38 +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:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:context="com.sduduzog.slimlauncher.ui.main.AboutFragment">
-
-    <TextView
-        android:id="@+id/aboutVersionText"
-        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"
-        android:text="@string/about_title"
-        android:textSize="24sp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        tools:text="Slim launcher" />
-
-    <TextView
-        android:id="@+id/aboutDescriptionText"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="16dp"
-        android:layout_marginTop="24dp"
-        android:layout_marginEnd="16dp"
-        android:text="@string/about_text"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintHorizontal_bias="0.0"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/aboutVersionText" />
-
-
-</androidx.constraintlayout.widget.ConstraintLayout>

+ 0 - 11
app/src/main/res/layout/apps_fragment.xml

@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<androidx.recyclerview.widget.RecyclerView 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/appList"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:layout_marginStart="16dp"
-    android:layout_marginEnd="16dp"
-    app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
-    tools:listitem="@layout/apps_list_item" />

+ 0 - 13
app/src/main/res/layout/apps_list_item.xml

@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:orientation="horizontal">
-
-    <TextView
-        android:id="@+id/label"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_margin="8dp"
-        android:textSize="24sp" />
-</LinearLayout>

+ 0 - 134
app/src/main/res/layout/main_bottom_sheet.xml

@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:id="@+id/bottomSheet"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    app:behavior_hideable="false"
-    app:behavior_peekHeight="60dp"
-    app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
-    tools:context="com.sduduzog.slimlauncher.ui.main.HomeFragment">
-
-
-    <androidx.cardview.widget.CardView
-        android:id="@+id/optionsView"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        app:cardBackgroundColor="?android:attr/colorBackground"
-        app:cardCornerRadius="0dp"
-        app:cardElevation="4dp">
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:orientation="vertical">
-
-            <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_marginStart="16dp"
-                android:layout_marginLeft="16dp"
-                android:layout_marginTop="24dp"
-                android:text="@string/main_slim_options"
-                app:layout_constraintStart_toStartOf="parent"
-                app:layout_constraintTop_toTopOf="parent" />
-
-            <TextView
-                android:id="@+id/textView12"
-                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" />
-
-            <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>
-    </androidx.cardview.widget.CardView>
-
-    <androidx.constraintlayout.widget.ConstraintLayout
-        android:id="@+id/iconTray"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:alpha="0.6">
-
-        <ImageView
-            android:id="@+id/ivCall"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="8dp"
-            android:contentDescription="@string/main_call_icon"
-            android:padding="16dp"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="parent"
-            app:srcCompat="@drawable/ic_call"
-            android:layout_marginLeft="8dp" />
-
-        <ImageView
-            android:id="@+id/ivCamera"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginEnd="8dp"
-            android:contentDescription="@string/main_photo_camera_icon"
-            android:padding="16dp"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintTop_toTopOf="parent"
-            app:srcCompat="@drawable/ic_photo_camera"
-            android:layout_marginRight="8dp" />
-    </androidx.constraintlayout.widget.ConstraintLayout>
-
-
-</FrameLayout>

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

@@ -1,77 +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/main_content"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:showIn="@layout/main_fragment">
-
-    <TextView
-        android:id="@+id/clockTextView"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/main_placeholder_clock"
-        android:layout_marginTop="@dimen/_64sdp"
-        android:textSize="@dimen/_40ssp"
-        app:layout_constraintBottom_toTopOf="@+id/dateTextView"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintHorizontal_bias="0.5"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        app:layout_constraintVertical_chainStyle="spread" />
-
-    <TextView
-        android:id="@+id/clockAmPm"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="16dp"
-        android:textSize="@dimen/_13sdp"
-        app:layout_constraintStart_toEndOf="@+id/clockTextView"
-        app:layout_constraintTop_toTopOf="@+id/clockTextView" />
-
-    <TextView
-        android:id="@+id/dateTextView"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/main_placeholder_date"
-        android:textSize="@dimen/_12sdp"
-        app:layout_constraintBottom_toTopOf="@+id/guideline"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintHorizontal_bias="0.5"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/clockTextView"
-        app:layout_constraintVertical_bias="1.0" />
-
-    <androidx.recyclerview.widget.RecyclerView
-        android:id="@+id/mainAppsList"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="16dp"
-        android:layout_marginEnd="16dp"
-        android:layout_marginRight="16dp"
-        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
-        app:layout_constraintBottom_toTopOf="@+id/guideline2"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="@+id/guideline"
-        app:layout_constraintVertical_bias="0.5"
-        tools:itemCount="5"
-        tools:listitem="@layout/main_list_item" />
-
-    <androidx.constraintlayout.widget.Guideline
-        android:id="@+id/guideline"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        app:layout_constraintGuide_begin="@dimen/_140sdp" />
-
-    <androidx.constraintlayout.widget.Guideline
-        android:id="@+id/guideline2"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        app:layout_constraintGuide_end="@dimen/main_bottom_guide_end" />
-
-
-</androidx.constraintlayout.widget.ConstraintLayout>

+ 0 - 13
app/src/main/res/layout/main_fragment.xml

@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:id="@+id/main"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:context=".ui.main.HomeFragment">
-
-    <include layout="@layout/main_content" />
-
-    <include layout="@layout/main_bottom_sheet" />
-
-</androidx.coordinatorlayout.widget.CoordinatorLayout>

+ 0 - 17
app/src/main/res/layout/main_list_item.xml

@@ -1,17 +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"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content">
-
-    <TextView
-        android:id="@+id/main_label"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_margin="@dimen/_10sdp"
-        android:textSize="@dimen/_26ssp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
-</androidx.constraintlayout.widget.ConstraintLayout>

+ 0 - 193
app/src/main/res/layout/settings_fragment.xml

@@ -1,193 +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/settings_fragment"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:context=".ui.main.settings.SettingsFragment">
-
-    <TextView
-        android:id="@+id/textView3"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginTop="24dp"
-        android:alpha="0.5"
-        android:text="@string/settings_title"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
-
-    <View
-        android:id="@+id/divider4"
-        android:layout_width="0dp"
-        android:layout_height="1dp"
-        android:layout_marginStart="16dp"
-        android:layout_marginTop="8dp"
-        android:layout_marginEnd="16dp"
-        android:background="?android:attr/listDivider"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/textView3" />
-
-    <TextView
-        android:id="@+id/textView14"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
-        android:text="@string/settings_hide_status_bar"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="18sp"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/divider4" />
-
-    <TextView
-        android:id="@+id/textView16"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginEnd="8dp"
-        android:layout_marginRight="8dp"
-        android:text="@string/settings_status_bar_when_switched"
-        app:layout_constraintEnd_toStartOf="@+id/statusBarSwitch"
-        app:layout_constraintStart_toStartOf="@+id/textView14"
-        app:layout_constraintTop_toBottomOf="@+id/textView14" />
-
-    <Switch
-        android:id="@+id/statusBarSwitch"
-        android:layout_width="wrap_content"
-        android:layout_height="48dp"
-        android:layout_marginTop="8dp"
-        android:layout_marginEnd="24dp"
-        android:layout_marginRight="24dp"
-        android:layout_marginBottom="8dp"
-        android:padding="4dp"
-        app:layout_constraintBottom_toBottomOf="@+id/textView16"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintTop_toTopOf="@+id/textView14" />
-
-    <TextView
-        android:id="@+id/textView2"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginTop="16dp"
-        android:text="@string/settings_text_use_24_hour_clock"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="18sp"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/textView16" />
-
-    <TextView
-        android:id="@+id/textView4"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginEnd="8dp"
-        android:layout_marginRight="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="48dp"
-        android:layout_marginTop="8dp"
-        android:layout_marginEnd="24dp"
-        android:layout_marginRight="24dp"
-        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/changeThemeText"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginTop="16dp"
-        android:text="@string/main_options_change_theme"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="18sp"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/textView4" />
-
-    <TextView
-        android:id="@+id/textView7"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/settings_text_tap_to_change_app_theme"
-        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_marginLeft="16dp"
-        android:layout_marginTop="8dp"
-        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_marginEnd="16dp"
-        android:background="?android:attr/listDivider"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/textView8" />
-
-    <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/divider2"
-        tools:itemCount="5"
-        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_marginTop="8dp"
-        android:layout_marginEnd="24dp"
-        android:layout_marginRight="24dp"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:visibility="gone"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintTop_toTopOf="@+id/textView2" />
-
-    <Button
-        android:id="@+id/buttonChangeTheme"
-        style="@style/Widget.AppCompat.Button.Borderless"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="8dp"
-        android:layout_marginEnd="16dp"
-        android:layout_marginRight="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_toTopOf="@+id/changeThemeText" />
-
-</androidx.constraintlayout.widget.ConstraintLayout>

+ 0 - 67
app/src/main/res/layout/settings_list_item.xml

@@ -1,67 +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"
-    android:id="@+id/settings_list_item"
-    android:layout_width="match_parent"
-    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_marginTop="8dp"
-        android:layout_marginEnd="8dp"
-        android:layout_marginBottom="8dp"
-        android:text="@string/settings_list_item_text"
-        android:textSize="24sp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        android:layout_marginLeft="16dp"
-        android:layout_marginRight="8dp" />
-
-    <Button
-        android:id="@+id/item_button"
-        style="@style/Widget.AppCompat.Button.Borderless"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="8dp"
-        android:layout_marginEnd="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"
-        app:layout_constraintTop_toTopOf="@+id/item_text"
-        android:layout_marginRight="8dp" />
-
-    <ImageView
-        android:id="@+id/item_dragger"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="8dp"
-        android:layout_marginEnd="8dp"
-        android:layout_marginBottom="8dp"
-        android:alpha="0.5"
-        android:contentDescription="@string/settings_item_icon_drag_handler"
-        android:padding="8dp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        app:srcCompat="@drawable/ic_drag_handle"
-        android:layout_marginRight="8dp" />
-
-</androidx.constraintlayout.widget.ConstraintLayout>

+ 0 - 6
app/src/main/res/layout/setup_fragment.xml

@@ -1,6 +0,0 @@
-<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">
-
-</androidx.viewpager.widget.ViewPager>

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

@@ -1,77 +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/splash_fragment"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:context=".ui.main.setup.SplashFragment">
-
-    <ImageView
-        android:id="@+id/imageView3"
-        android:layout_width="@dimen/_60sdp"
-        android:layout_height="@dimen/_60sdp"
-        android:layout_marginStart="8dp"
-        android:layout_marginLeft="8dp"
-        android:layout_marginTop="@dimen/_100sdp"
-        android:layout_marginEnd="8dp"
-        android:layout_marginRight="8dp"
-        android:contentDescription="@string/app_name"
-        android:scaleType="fitCenter"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        app:srcCompat="@drawable/ic_slim" />
-
-    <Button
-        android:id="@+id/setup_splash_button_start"
-        style="@style/Widget.AppCompat.Button.Borderless"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginEnd="16dp"
-        android:layout_marginRight="16dp"
-        android:layout_marginBottom="16dp"
-        android:text="@string/setup_button_start"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent" />
-
-    <TextView
-        android:id="@+id/textView13"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="8dp"
-        android:layout_marginLeft="8dp"
-        android:layout_marginTop="@dimen/_16sdp"
-        android:layout_marginEnd="8dp"
-        android:layout_marginRight="8dp"
-        android:text="@string/setup_welcome"
-        android:textSize="@dimen/_24sdp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/imageView3" />
-
-    <TextView
-        android:id="@+id/textView15"
-        android:layout_width="@dimen/_140sdp"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="@dimen/_110sdp"
-        android:layout_marginLeft="@dimen/_110sdp"
-        android:layout_marginTop="@dimen/_94sdp"
-        android:text="@string/setup_welcome2"
-        android:textSize="@dimen/_14sdp"
-        app:layout_constraintStart_toStartOf="@+id/imageView6"
-        app:layout_constraintTop_toTopOf="@+id/imageView6" />
-
-    <ImageView
-        android:id="@+id/imageView6"
-        android:layout_width="@dimen/_160sdp"
-        android:layout_height="@dimen/_134sdp"
-        android:layout_marginStart="@dimen/_4sdp"
-        android:layout_marginLeft="@dimen/_4sdp"
-        android:layout_marginTop="@dimen/_16sdp"
-        android:contentDescription="@string/content_description_my_phone"
-        android:scaleType="centerCrop"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/textView13"
-        app:srcCompat="@drawable/ic_my_phone" />
-</androidx.constraintlayout.widget.ConstraintLayout>

+ 0 - 188
app/src/main/res/layout/theme_setup_fragment.xml

@@ -1,188 +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/theme_setup_fragment"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:context=".ui.main.setup.ThemeSetupFragment">
-
-    <TextView
-        android:id="@+id/textView18"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="32dp"
-        android:text="@string/setup_choose_theme"
-        android:textAppearance="@style/TextAppearance.AppCompat.Headline"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
-
-    <com.google.android.material.floatingactionbutton.FloatingActionButton
-        android:id="@+id/setup_fab_default"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="8dp"
-        android:layout_marginTop="32dp"
-        android:clickable="true"
-        android:focusable="true"
-        app:srcCompat="@drawable/ic_text_fields"
-        app:backgroundTint="@color/colorWhite"
-        app:fabSize="normal"
-        app:layout_constraintEnd_toStartOf="@+id/setup_fab_dark"
-        app:layout_constraintHorizontal_bias="0.5"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/textView18"
-        android:contentDescription="@string/setup_text_default"
-        android:layout_marginLeft="8dp" />
-
-    <com.google.android.material.floatingactionbutton.FloatingActionButton
-        android:id="@+id/setup_fab_dark"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:clickable="true"
-        android:focusable="true"
-        app:srcCompat="@drawable/ic_text_fields"
-        android:contentDescription="@string/setup_text_dark"
-        android:tint="@color/darkAccentColor"
-        app:backgroundTint="@color/primaryDarkColor"
-        app:fabSize="normal"
-        app:layout_constraintEnd_toStartOf="@+id/setup_fab_jupiter"
-        app:layout_constraintHorizontal_bias="0.5"
-        app:layout_constraintStart_toEndOf="@+id/setup_fab_default"
-        app:layout_constraintTop_toTopOf="@+id/setup_fab_default" />
-
-    <com.google.android.material.floatingactionbutton.FloatingActionButton
-        android:id="@+id/setup_fab_jupiter"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginEnd="8dp"
-        android:clickable="true"
-        android:contentDescription="@string/setup_text_jupiter"
-        android:focusable="true"
-        app:srcCompat="@drawable/ic_text_fields"
-        android:tint="@color/darkAccentColor"
-        app:backgroundTint="@color/colorBlueGrey"
-        app:fabSize="normal"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintHorizontal_bias="0.5"
-        app:layout_constraintStart_toEndOf="@+id/setup_fab_dark"
-        app:layout_constraintTop_toTopOf="@+id/setup_fab_dark"
-        android:layout_marginRight="8dp" />
-
-    <com.google.android.material.floatingactionbutton.FloatingActionButton
-        android:id="@+id/setup_fab_teal"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="32dp"
-        android:clickable="true"
-        android:focusable="true"
-        android:contentDescription="@string/setup_text_teal"
-        app:srcCompat="@drawable/ic_text_fields"
-        app:backgroundTint="@color/colorTeal"
-        app:fabSize="normal"
-        app:layout_constraintEnd_toStartOf="@+id/setup_fab_candy"
-        app:layout_constraintHorizontal_bias="0.5"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/textView20" />
-
-    <com.google.android.material.floatingactionbutton.FloatingActionButton
-        android:id="@+id/setup_fab_candy"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:clickable="true"
-        android:contentDescription="@string/setup_text_candy"
-        android:focusable="true"
-        app:srcCompat="@drawable/ic_text_fields"
-        android:tint="@color/darkAccentColor"
-        app:backgroundTint="@color/colorCandy"
-        app:fabSize="normal"
-        app:layout_constraintEnd_toStartOf="@+id/setup_fab_pastel"
-        app:layout_constraintHorizontal_bias="0.5"
-        app:layout_constraintStart_toEndOf="@+id/setup_fab_teal"
-        app:layout_constraintTop_toTopOf="@+id/setup_fab_teal" />
-
-    <com.google.android.material.floatingactionbutton.FloatingActionButton
-        android:id="@+id/setup_fab_pastel"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:clickable="true"
-        android:focusable="true"
-        app:srcCompat="@drawable/ic_text_fields"
-        app:backgroundTint="@color/colorPink"
-        app:fabSize="normal"
-        app:layout_constraintEnd_toEndOf="parent"
-        android:contentDescription="@string/setup_text_pastel"
-        app:layout_constraintHorizontal_bias="0.5"
-        app:layout_constraintStart_toEndOf="@+id/setup_fab_candy"
-        app:layout_constraintTop_toTopOf="@+id/setup_fab_candy" />
-
-    <TextView
-        android:id="@+id/textView20"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="16dp"
-        android:text="@string/setup_text_default"
-        app:layout_constraintEnd_toEndOf="@+id/setup_fab_default"
-        app:layout_constraintStart_toStartOf="@+id/setup_fab_default"
-        app:layout_constraintTop_toBottomOf="@+id/setup_fab_default" />
-
-    <TextView
-        android:id="@+id/textView21"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/setup_text_dark"
-        app:layout_constraintEnd_toEndOf="@+id/setup_fab_dark"
-        app:layout_constraintStart_toStartOf="@+id/setup_fab_dark"
-        app:layout_constraintTop_toTopOf="@+id/textView20" />
-
-    <TextView
-        android:id="@+id/textView22"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/setup_text_jupiter"
-        app:layout_constraintEnd_toEndOf="@+id/setup_fab_jupiter"
-        app:layout_constraintStart_toStartOf="@+id/setup_fab_jupiter"
-        app:layout_constraintTop_toTopOf="@+id/textView21" />
-
-    <TextView
-        android:id="@+id/textView23"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="16dp"
-        android:text="@string/setup_text_teal"
-        app:layout_constraintEnd_toEndOf="@+id/setup_fab_teal"
-        app:layout_constraintStart_toStartOf="@+id/setup_fab_teal"
-        app:layout_constraintTop_toBottomOf="@+id/setup_fab_teal" />
-
-    <TextView
-        android:id="@+id/textView24"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/setup_text_candy"
-        app:layout_constraintEnd_toEndOf="@+id/setup_fab_candy"
-        app:layout_constraintStart_toStartOf="@+id/setup_fab_candy"
-        app:layout_constraintTop_toTopOf="@+id/textView23" />
-
-    <TextView
-        android:id="@+id/textView25"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/setup_text_pastel"
-        app:layout_constraintEnd_toEndOf="@+id/setup_fab_pastel"
-        app:layout_constraintStart_toStartOf="@+id/setup_fab_pastel"
-        app:layout_constraintTop_toTopOf="@+id/textView24" />
-
-    <Button
-        android:id="@+id/theme_setup_button"
-        style="@style/Widget.AppCompat.Button.Borderless"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginEnd="16dp"
-        android:layout_marginBottom="16dp"
-        android:text="@string/setup_button_finish"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        android:layout_marginRight="16dp" />
-
-</androidx.constraintlayout.widget.ConstraintLayout>

+ 1 - 1
app/src/main/res/navigation/nav_graph.xml

@@ -9,7 +9,7 @@
         android:id="@+id/homeFragment"
         android:name="com.sduduzog.slimlauncher.ui.main.HomeFragment"
         android:label="home_fragment"
-        tools:layout="@layout/main_fragment">
+        tools:layout="@layout/home_fragment">
         <action
             android:id="@+id/action_homeFragment_to_optionsFragment"
             app:destination="@id/optionsFragment" />

+ 1 - 1
app/src/main/res/values/dimens.xml

@@ -17,5 +17,5 @@
 
     <!--<dimen name="main_clock_marginTop">16dp</dimen>-->
     <!--<dimen name="main_top_guide_begin">150dp</dimen>-->
-    <dimen name="main_bottom_guide_end">56dp</dimen>
+    <!--<dimen name="main_bottom_guide_end">56dp</dimen>-->
 </resources>

+ 1 - 59
app/src/main/res/values/strings.xml

@@ -21,75 +21,16 @@
     <string name="prefs_settings_key_theme">key_theme</string>
     <string name="prefs_settings_key_time_format">clock_type</string>
     <string name="prefs_settings_key_toggle_status_bar">hide_status_bar</string>
-    <string name="prefs_settings_key_fresh_install_setup">key_fresh_install_setup</string>
-
     <!--main package strings-->
-
-    <string name="setup_welcome">Welcome!</string>
-    <string name="setup_welcome2">This is what your home screen will look like. But better! Let\'s get you setup.</string>
-
-    <string name="main_slim_options">Slim options</string>
-    <string name="main_options_change_theme">Change theme</string>
-    <string name="main_options_home_screen_apps">Preferences</string>
-    <string name="main_options_settings">Device Settings</string>
-    <string name="main_options_about_slim">About Slim</string>
-    <string name="main_options_feedback">Give us Feedback</string>
-    <string name="main_options_change_launcher">Change launcher</string>
-    <string name="main_options_text_notes">Notes</string>
-
     <string name="note_fragment_hint_title">Title</string>
     <string name="note_fragment_hint_body">Start here</string>
-
     <!--settings package strings-->
-    <string name="settings_text_use_24_hour_clock">Use 24 hour clock</string>
-    <string name="settings_text_tap_to_check_between_24_hour_or_12_hour">Tap to check between 24 hour or 12 hour</string>
-    <string name="settings_text_tap_to_change_app_theme">Choose from a variety of themes</string>
-    <string name="settings_text_home_screen_apps">Home screen apps</string>
-    <string name="settings_title">Preferences</string>
-    <string name="settings_use_slim_s_built_in_dialer">Use Slim\'s built-in dialer</string>
-    <string name="settings_faster_shortcut_to_your_calls">Faster shortcut to your calls</string>
-    <string name="settings_status_bar_when_switched">When switched on, you can still drag down from the top to reveal it</string>
-    <string name="settings_hide_status_bar">Hide status bar</string>
-
-    <string name="settings_list_item_button_set_app">Set app</string>
-    <string name="settings_list_item_text">Slot empty</string>
-    <string name="settings_button_change_theme">Change</string>
-    <string name="about_title">2019 \u00a9 Slim v%s</string>
-    <string name="about_text">
-    <a href="https://github.com/sduduzog/slim-launcher">https://github.com/sduduzog/slim-launcher</a>\n\n
-    <a href="mailto:gumedesduduzo@gmail.com">gumedesduduzo@gmail.com</a>\n\n
-    To become a beta tester <a href="https://play.google.com/apps/testing/com.sduduzog.slimlauncher">click here</a>\n\n
-    <a href="https://github.com/sduduzog/slim-launcher/issues/new">Report a bug</a>
-    </string>
-    <string name="choose_theme_dialog_title">Change theme</string>
-    <string name="main_call_icon">call icon</string>
-    <string name="main_photo_camera_icon">photo camera icon</string>
     <string name="setup_button_start">start</string>
-
-    <string name="setup_button_finish">Finish</string>
-
     <string name="no_app_selected_toast_msg">Choose at least one app</string>
     <string name="choose_apps_title">Choose Apps</string>
     <string name="choose_time_format_dialog_title">Choose Time Format</string>
-
-
     <string name="notes_date_placeholder">Edited at %s</string>
-
-    <string name="settings_item_icon_drag_handler">Dragger</string>
-
-    <string name="setup_choose_theme">Choose Theme</string>
-    <string name="setup_text_default">Default</string>
-    <string name="setup_text_dark">Dark</string>
-    <string name="setup_text_jupiter">Jupiter</string>
-    <string name="setup_text_teal">Teal</string>
-    <string name="setup_text_candy">Candy</string>
-    <string name="setup_text_pastel">Pastel</string>
-
-
     <!-- Content Description For Image Resources-->
-    <string name="content_description_my_phone">My phone</string>
-    <string name="main_admin_title">Allow Slim to lock your device</string>
-    <string name="main_admin_message">Double tapping on the free space on your home screen locks your device instantly.</string>
     <string name="main_fragment_options">Options</string>
     <string name="options_fragment_about_slim">About Slim</string>
     <string name="options_fragment_device_settings">Device Settings</string>
@@ -102,6 +43,7 @@
     <string name="menu_rename">Rename</string>
     <string name="menu_remove">Remove</string>
     <string name="customise_apps_fragment_counter">%d slots left</string>
+    <string name="choose_theme_dialog_title">Choose Theme</string>
 
 
 </resources>

Некоторые файлы не были показаны из-за большого количества измененных файлов