Преглед изворни кода

Changed ui a bit. Added theming

sduduzog пре 7 година
родитељ
комит
ac41e1251a
39 измењених фајлова са 593 додато и 273 уклоњено
  1. 6 3
      app/build.gradle
  2. 1 1
      app/proguard-rules.pro
  3. 1 3
      app/src/androidTest/java/com/sduduzog/slimlauncher/ExampleInstrumentedTest.kt
  4. 8 5
      app/src/main/AndroidManifest.xml
  5. 29 7
      app/src/main/java/com/sduduzog/slimlauncher/MainActivity.kt
  6. 1 1
      app/src/main/java/com/sduduzog/slimlauncher/MainViewModel.kt
  7. 8 8
      app/src/main/java/com/sduduzog/slimlauncher/data/App.kt
  8. 2 2
      app/src/main/java/com/sduduzog/slimlauncher/data/AppDao.kt
  9. 1 1
      app/src/main/java/com/sduduzog/slimlauncher/data/AppRepository.kt
  10. 2 0
      app/src/main/java/com/sduduzog/slimlauncher/data/AppRoomDatabase.java
  11. 1 1
      app/src/main/java/com/sduduzog/slimlauncher/data/HomeApp.kt
  12. 2 2
      app/src/main/java/com/sduduzog/slimlauncher/ui/apps/AppsFragment.kt
  13. 2 2
      app/src/main/java/com/sduduzog/slimlauncher/ui/apps/AppsListAdapter.kt
  14. 4 23
      app/src/main/java/com/sduduzog/slimlauncher/ui/apps/SettingsFragment.kt
  15. 2 2
      app/src/main/java/com/sduduzog/slimlauncher/ui/apps/SettingsListAdapter.kt
  16. 21 0
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/AboutFragment.kt
  17. 90 4
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/MainFragment.kt
  18. 34 0
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/ThemeChooserDialog.kt
  19. 3 3
      app/src/main/res/drawable/ic_baseline_more_vert_24px.xml
  20. 9 0
      app/src/main/res/drawable/ic_expand.xml
  21. 9 0
      app/src/main/res/drawable/ic_more.xml
  22. 1 1
      app/src/main/res/layout/apps_fragment.xml
  23. 1 1
      app/src/main/res/layout/apps_list_item.xml
  24. 37 0
      app/src/main/res/layout/fragment_about.xml
  25. 0 111
      app/src/main/res/layout/fragment_settings.xml
  26. 5 6
      app/src/main/res/layout/main_activity.xml
  27. 89 0
      app/src/main/res/layout/main_bottom_sheet.xml
  28. 59 0
      app/src/main/res/layout/main_content.xml
  29. 4 48
      app/src/main/res/layout/main_fragment.xml
  30. 2 3
      app/src/main/res/layout/settings_apps_list_item.xml
  31. 50 0
      app/src/main/res/layout/settings_fragment.xml
  32. 2 2
      app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
  33. 2 2
      app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
  34. 12 5
      app/src/main/res/navigation/nav_graph.xml
  35. 41 0
      app/src/main/res/values-v21/styles.xml
  36. 14 7
      app/src/main/res/values/colors.xml
  37. 11 1
      app/src/main/res/values/strings.xml
  38. 26 16
      app/src/main/res/values/styles.xml
  39. 1 2
      app/src/test/java/com/sduduzog/slimlauncher/ExampleUnitTest.kt

+ 6 - 3
app/build.gradle

@@ -10,10 +10,11 @@ android {
         applicationId "com.sduduzog.slimlauncher"
         minSdkVersion 15
         targetSdkVersion 28
-        versionCode 4
-        versionName "0.1.2"
+        versionCode 5
+        versionName "1.0.0"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
-        versionNameSuffix '-beta3'
+        versionNameSuffix '-beta'
+        vectorDrawables.useSupportLibrary = true
     }
     buildTypes {
         release {
@@ -45,4 +46,6 @@ dependencies {
     implementation 'android.arch.lifecycle:extensions:1.1.1'
     annotationProcessor "android.arch.lifecycle:compiler:1.1.1"
     implementation 'com.android.support:cardview-v7:28.0.0'
+    implementation 'com.android.support:design:28.0.0'
+    implementation 'com.daasuu:EasingInterpolator:1.0.0'
 }

+ 1 - 1
app/proguard-rules.pro

@@ -11,7 +11,7 @@
 #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
 #   public *;
 #}
-
+-keep class com.daasuu.** { *; }
 # Uncomment this to preserve the line number information for
 # debugging stack traces.
 #-keepattributes SourceFile,LineNumberTable

+ 1 - 3
app/src/androidTest/java/com/sduduzog/slimlauncher/ExampleInstrumentedTest.kt

@@ -2,12 +2,10 @@ package com.sduduzog.slimlauncher
 
 import android.support.test.InstrumentationRegistry
 import android.support.test.runner.AndroidJUnit4
-
+import org.junit.Assert.assertEquals
 import org.junit.Test
 import org.junit.runner.RunWith
 
-import org.junit.Assert.*
-
 /**
  * Instrumented test, which will execute on an Android device.
  *

+ 8 - 5
app/src/main/AndroidManifest.xml

@@ -3,23 +3,26 @@
     xmlns:tools="http://schemas.android.com/tools"
     package="com.sduduzog.slimlauncher">
 
-    <uses-permission android:name="android.permission.SET_ALARM"/>
+    <uses-permission android:name="android.permission.SET_ALARM" />
 
     <application
         android:allowBackup="false"
+        android:configChanges="orientation|keyboardHidden|screenSize"
         android:icon="@mipmap/ic_launcher"
         android:label="@string/app_name"
-        android:configChanges="orientation|keyboardHidden|screenSize"
         android:roundIcon="@mipmap/ic_launcher_round"
         android:supportsRtl="true"
-        android:theme="@style/AppLightTheme"
+        android:theme="@style/AppTheme"
+        tools:ignore="GoogleAppIndexingWarning"
 
-        tools:ignore="GoogleAppIndexingWarning">
-        <activity android:name=".MainActivity"
+        tools:replace="android:allowBackup">
+        <activity
+            android:name=".MainActivity"
             android:launchMode="singleTask"
             android:stateNotNeeded="true">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
+
                 <category android:name="android.intent.category.HOME" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <category android:name="android.intent.category.LAUNCHER" />

+ 29 - 7
app/src/main/java/com/sduduzog/slimlauncher/MainActivity.kt

@@ -8,7 +8,6 @@ import android.support.v7.app.AppCompatActivity
 import androidx.navigation.NavController
 import androidx.navigation.NavDestination
 import androidx.navigation.Navigation.findNavController
-import com.sduduzog.slimlauncher.ui.main.MainViewModel
 
 
 class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceChangeListener, NavController.OnNavigatedListener {
@@ -16,8 +15,9 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
     private lateinit var settings: SharedPreferences
     private val label = "main_fragment"
     private lateinit var currentLabel: String
-
+    var fragmentBackPressed: IOnBackPressed? = null
     private lateinit var viewModel: MainViewModel
+    private val TAG: String = "MainActivity"
 
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
@@ -42,16 +42,33 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
         val theme = super.getTheme()
         settings = getSharedPreferences("settings", MODE_PRIVATE)
 
-        val active = settings.getBoolean("theme", false)
-        if (active) {
-            theme.applyStyle(R.style.AppDarkTheme, true)
-        } else {
-            theme.applyStyle(R.style.AppLightTheme, true)
+        val active = settings.getInt("theme", 0)
+        when (active) {
+            0 -> {
+                theme.applyStyle(R.style.AppTheme, true)
+            }
+            1 -> {
+                theme.applyStyle(R.style.AppDarkTheme, true)
+            }
+            2 -> {
+                theme.applyStyle(R.style.AppGreyTheme, true)
+            }
+            3 -> {
+                theme.applyStyle(R.style.AppTealTheme, true)
+            }
+            4 -> {
+                theme.applyStyle(R.style.AppPinkTheme, true)
+            }
         }
         return theme
     }
 
     override fun onBackPressed() {
+        if (fragmentBackPressed != null) {
+            if (fragmentBackPressed?.onBackPressed() as Boolean) {
+                return
+            }
+        }
         if (currentLabel != label)
             super.onBackPressed()
     }
@@ -59,4 +76,9 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
     override fun onNavigated(controller: NavController, destination: NavDestination) {
         currentLabel = destination.label.toString()
     }
+
+    interface IOnBackPressed {
+        fun onBackPressed(): Boolean
+    }
+
 }

+ 1 - 1
app/src/main/java/com/sduduzog/slimlauncher/ui/main/MainViewModel.kt → app/src/main/java/com/sduduzog/slimlauncher/MainViewModel.kt

@@ -1,4 +1,4 @@
-package com.sduduzog.slimlauncher.ui.main
+package com.sduduzog.slimlauncher
 
 import android.app.Application
 import android.arch.lifecycle.AndroidViewModel

+ 8 - 8
app/src/main/java/com/sduduzog/slimlauncher/data/App.kt

@@ -5,12 +5,12 @@ import android.arch.persistence.room.Entity
 import android.arch.persistence.room.PrimaryKey
 
 @Entity(tableName = "apps")
-class App{
-        @field:ColumnInfo(name = "app_name")
-        lateinit var appName: String
-        @PrimaryKey
-        @field:ColumnInfo(name = "package_name")
-        lateinit var packageName: String
-        @field:ColumnInfo(name = "activity_name")
-        lateinit var activityName: String
+class App {
+    @field:ColumnInfo(name = "app_name")
+    lateinit var appName: String
+    @PrimaryKey
+    @field:ColumnInfo(name = "package_name")
+    lateinit var packageName: String
+    @field:ColumnInfo(name = "activity_name")
+    lateinit var activityName: String
 }

+ 2 - 2
app/src/main/java/com/sduduzog/slimlauncher/data/AppDao.kt

@@ -7,10 +7,10 @@ import android.arch.persistence.room.*
 interface AppDao {
 
 
-    @get:Query("SELECT * FROM apps WHERE package_name NOT IN (SELECT apps.package_name from apps JOIN home_apps ON home_apps.package_name=apps.package_name)")
+    @get:Query("SELECT * FROM apps WHERE package_name NOT IN (SELECT apps.package_name from apps JOIN home_apps ON home_apps.package_name=apps.package_name) ORDER BY app_name ASC")
     val apps: LiveData<List<App>>
 
-    @get:Query("SELECT * FROM home_apps")
+    @get:Query("SELECT * FROM home_apps ORDER BY app_name ASC")
     val homeApps: LiveData<List<HomeApp>>
 
     @Insert(onConflict = OnConflictStrategy.IGNORE)

+ 1 - 1
app/src/main/java/com/sduduzog/slimlauncher/data/AppRepository.kt

@@ -23,7 +23,7 @@ class AppRepository(application: Application) {
         get() = _homeApps
 
     val apps: LiveData<List<App>>
-    get() = _apps
+        get() = _apps
 
     fun insert(app: HomeApp) {
         InsertAsyncTask(appDao).execute(app)

+ 2 - 0
app/src/main/java/com/sduduzog/slimlauncher/data/AppRoomDatabase.java

@@ -8,6 +8,7 @@ import android.content.Context;
 @Database(entities = {App.class, HomeApp.class}, version = 1, exportSchema = false)
 public abstract class AppRoomDatabase extends RoomDatabase {
     private static volatile AppRoomDatabase INSTANCE;
+
     static AppRoomDatabase getDatabase(final Context context) {
         if (INSTANCE == null) {
             synchronized (AppRoomDatabase.class) {
@@ -20,5 +21,6 @@ public abstract class AppRoomDatabase extends RoomDatabase {
         }
         return INSTANCE;
     }
+
     public abstract AppDao appDao();
 }

+ 1 - 1
app/src/main/java/com/sduduzog/slimlauncher/data/HomeApp.kt

@@ -5,7 +5,7 @@ import android.arch.persistence.room.Entity
 import android.arch.persistence.room.PrimaryKey
 
 @Entity(tableName = "home_apps")
-class HomeApp{
+class HomeApp {
     @field:ColumnInfo(name = "app_name")
     lateinit var appName: String
     @PrimaryKey

+ 2 - 2
app/src/main/java/com/sduduzog/slimlauncher/ui/apps/AppsFragment.kt

@@ -11,9 +11,9 @@ import android.view.LayoutInflater
 import android.view.View
 import android.view.ViewGroup
 import androidx.navigation.Navigation
+import com.sduduzog.slimlauncher.MainViewModel
 import com.sduduzog.slimlauncher.R
 import com.sduduzog.slimlauncher.data.App
-import com.sduduzog.slimlauncher.ui.main.MainViewModel
 import java.util.*
 
 
@@ -26,7 +26,7 @@ class AppsFragment : Fragment() {
 
     override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
                               savedInstanceState: Bundle?): View? {
-        val view = inflater.inflate(R.layout.fragment_apps_list, container, false)
+        val view = inflater.inflate(R.layout.apps_fragment, container, false)
         val pm = activity!!.packageManager
         val main = Intent(Intent.ACTION_MAIN, null)
 

+ 2 - 2
app/src/main/java/com/sduduzog/slimlauncher/ui/apps/AppsListAdapter.kt

@@ -11,7 +11,7 @@ import com.sduduzog.slimlauncher.data.App
 
 import com.sduduzog.slimlauncher.ui.apps.AppsFragment.OnListFragmentInteractionListener
 
-import kotlinx.android.synthetic.main.fragment_app.view.*
+import kotlinx.android.synthetic.main.apps_list_item.view.*
 
 
 class AppsListAdapter(
@@ -30,7 +30,7 @@ class AppsListAdapter(
 
     override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
         val view = LayoutInflater.from(parent.context)
-                .inflate(R.layout.fragment_app, parent, false)
+                .inflate(R.layout.apps_list_item, parent, false)
         return ViewHolder(view)
     }
 

+ 4 - 23
app/src/main/java/com/sduduzog/slimlauncher/ui/main/SettingsFragment.kt → app/src/main/java/com/sduduzog/slimlauncher/ui/apps/SettingsFragment.kt

@@ -1,11 +1,8 @@
-package com.sduduzog.slimlauncher.ui.main
+package com.sduduzog.slimlauncher.ui.apps
 
 
 import android.arch.lifecycle.Observer
 import android.arch.lifecycle.ViewModelProviders
-import android.content.Context.MODE_PRIVATE
-import android.content.Intent
-import android.os.Build
 import android.os.Bundle
 import android.support.v4.app.Fragment
 import android.support.v7.widget.LinearLayoutManager
@@ -13,9 +10,10 @@ import android.view.LayoutInflater
 import android.view.View
 import android.view.ViewGroup
 import androidx.navigation.Navigation
+import com.sduduzog.slimlauncher.MainViewModel
 import com.sduduzog.slimlauncher.R
 import com.sduduzog.slimlauncher.data.HomeApp
-import kotlinx.android.synthetic.main.fragment_settings.*
+import kotlinx.android.synthetic.main.settings_fragment.*
 
 
 class SettingsFragment : Fragment() {
@@ -25,7 +23,7 @@ class SettingsFragment : Fragment() {
 
     override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
                               savedInstanceState: Bundle?): View? {
-        return inflater.inflate(R.layout.fragment_settings, container, false)
+        return inflater.inflate(R.layout.settings_fragment, container, false)
     }
 
     override fun onActivityCreated(savedInstanceState: Bundle?) {
@@ -46,24 +44,7 @@ class SettingsFragment : Fragment() {
         adapter = SettingsListAdapter(apps, InteractionHandler())
         settingsAppList.adapter = adapter
         settingsAppList.layoutManager = LinearLayoutManager(activity)
-        deviceSettingsButton.setOnClickListener {
-            startActivity(Intent(android.provider.Settings.ACTION_SETTINGS))
-        }
-        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
-            launcherSettingsButton.setOnClickListener {
-                startActivity(Intent(android.provider.Settings.ACTION_HOME_SETTINGS))
-            }
-        } else {
-            launcherSettingsButton.visibility = View.GONE
-        }
 
-        val settings = activity?.getSharedPreferences("settings", MODE_PRIVATE)
-        val active = settings?.getBoolean("theme", false)
-        themeSwitch.isChecked = active!!
-        themeSwitch.setOnCheckedChangeListener { _, b ->
-
-            settings.edit()?.putBoolean("theme", b)?.apply()
-        }
         addButton.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_openAppsFragment))
     }
 

+ 2 - 2
app/src/main/java/com/sduduzog/slimlauncher/ui/main/SettingsListAdapter.kt → app/src/main/java/com/sduduzog/slimlauncher/ui/apps/SettingsListAdapter.kt

@@ -1,4 +1,4 @@
-package com.sduduzog.slimlauncher.ui.main
+package com.sduduzog.slimlauncher.ui.apps
 
 import android.support.v7.widget.RecyclerView
 import android.view.LayoutInflater
@@ -22,7 +22,7 @@ class SettingsListAdapter(private var apps: List<HomeApp>, private val listener:
     override fun onBindViewHolder(holder: AppViewHolder, position: Int) {
         holder.labelText.text = apps[position].appName
         holder.removeButton.setOnClickListener {
-                listener.onRemove(apps[position])
+            listener.onRemove(apps[position])
         }
     }
 

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

@@ -0,0 +1,21 @@
+package com.sduduzog.slimlauncher.ui.main
+
+
+import android.os.Bundle
+import android.support.v4.app.Fragment
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import com.sduduzog.slimlauncher.R
+
+
+class AboutFragment : Fragment() {
+
+    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
+                              savedInstanceState: Bundle?): View? {
+        // Inflate the layout for this fragment
+        return inflater.inflate(R.layout.fragment_about, container, false)
+    }
+
+
+}

+ 90 - 4
app/src/main/java/com/sduduzog/slimlauncher/ui/main/MainFragment.kt

@@ -1,10 +1,15 @@
 package com.sduduzog.slimlauncher.ui.main
 
+import android.animation.ObjectAnimator
 import android.arch.lifecycle.Observer
 import android.arch.lifecycle.ViewModelProviders
 import android.content.*
+import android.net.Uri
 import android.os.Build
 import android.os.Bundle
+import android.support.constraint.ConstraintLayout
+import android.support.design.widget.BottomSheetBehavior
+import android.support.design.widget.BottomSheetBehavior.*
 import android.support.v4.app.Fragment
 import android.util.Log
 import android.view.LayoutInflater
@@ -12,17 +17,24 @@ import android.view.View
 import android.view.ViewGroup
 import android.widget.Toast
 import androidx.navigation.Navigation
+import com.daasuu.ei.Ease
+import com.daasuu.ei.EasingInterpolator
+import com.sduduzog.slimlauncher.MainViewModel
 import com.sduduzog.slimlauncher.R
 import com.sduduzog.slimlauncher.data.HomeApp
-import kotlinx.android.synthetic.main.main_fragment.*
+import kotlinx.android.synthetic.main.main_bottom_sheet.*
+import kotlinx.android.synthetic.main.main_content.*
 import java.text.SimpleDateFormat
 import java.util.*
 
+
 class MainFragment : Fragment() {
 
     private lateinit var viewModel: MainViewModel
     private lateinit var receiver: BroadcastReceiver
     private lateinit var adapter: MainAppsAdapter
+    private lateinit var sheetBehavior: BottomSheetBehavior<ConstraintLayout>
+    private lateinit var themeChooser: ThemeChooserDialog
 
     private val TAG: String = "MainFragment"
 
@@ -35,22 +47,59 @@ class MainFragment : Fragment() {
         super.onActivityCreated(savedInstanceState)
         viewModel = ViewModelProviders.of(this).get(MainViewModel::class.java)
         adapter = MainAppsAdapter(mutableSetOf(), InteractionHandler())
+        themeChooser = ThemeChooserDialog(context!!)
         mainAppsList.adapter = adapter
         viewModel.homeApps.observe(this, Observer {
             if (it != null) {
                 adapter.setApps(it)
             }
         })
-        settingsButton.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_openSettingsFragment))
         clockTextView.setOnClickListener {
             if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
                 try {
-                    startActivity(Intent(android.provider.AlarmClock.ACTION_SHOW_ALARMS))
-                }catch (e: Exception){
+                    val intent = Intent(android.provider.AlarmClock.ACTION_SHOW_ALARMS)
+                    intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
+                    startActivity(intent)
+                } catch (e: Exception) {
                     Log.e(TAG, e.message)
                 }
             }
         }
+        bottomSheet.alpha = 0.0f
+        sheetBehavior = BottomSheetBehavior.from(bottomSheet)
+
+        sheetBehavior.setBottomSheetCallback(object : BottomSheetBehavior.BottomSheetCallback() {
+            override fun onSlide(p0: View, p1: Float) {
+
+            }
+
+            override fun onStateChanged(bottomSheet: View, newState: Int) {
+                ivExpand.visibility = View.INVISIBLE
+                when (newState) {
+                    STATE_COLLAPSED -> {
+                        bottomSheet.animate().alpha(0.0f).duration = 100
+                        ivExpand.visibility = View.VISIBLE
+                    }
+                    STATE_EXPANDED -> {
+                        bottomSheet.animate().alpha(1.0f).duration = 50
+                    }
+                    STATE_DRAGGING -> {
+                        bottomSheet.alpha = 1.0f
+                    }
+                }
+            }
+        })
+        bottomSheet.setOnClickListener { }
+        changeThemeText.setOnClickListener { changeTheme() }
+        settingsText.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_openSettingsFragment))
+        deviceSettingsText.setOnClickListener { openSettings() }
+        rateAppText.setOnClickListener { rateApp() }
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+            changeLauncherText.setOnClickListener {
+                startActivity(Intent(android.provider.Settings.ACTION_HOME_SETTINGS))
+            }
+        } else changeLauncherText.visibility = View.INVISIBLE
+        aboutText.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_openAboutFragment))
         updateUi()
     }
 
@@ -58,6 +107,8 @@ class MainFragment : Fragment() {
         super.onStart()
         receiver = ClockReceiver()
         activity?.registerReceiver(receiver, IntentFilter(Intent.ACTION_TIME_TICK))
+        doBounceAnimation(ivExpand)
+        sheetBehavior.state = STATE_COLLAPSED
     }
 
     override fun onStop() {
@@ -77,6 +128,7 @@ class MainFragment : Fragment() {
         val date = Date()
         clockTextView.text = fWatchTime.format(date)
         dateTextView.text = fWatchDate.format(date)
+        doBounceAnimation(ivExpand)
     }
 
     inner class InteractionHandler : OnListFragmentInteractionListener {
@@ -100,4 +152,38 @@ class MainFragment : Fragment() {
     interface OnListFragmentInteractionListener {
         fun onLaunch(item: HomeApp)
     }
+
+    private fun doBounceAnimation(targetView: View) {
+        val animator = ObjectAnimator.ofFloat(targetView, "translationY", 0f, -20f, 0f)
+        animator.interpolator = EasingInterpolator(Ease.QUINT_OUT)
+        animator.startDelay = 1000
+        animator.duration = 1000
+        animator.repeatCount = 1
+        animator.start()
+    }
+
+    private fun rateApp() {
+        val uri = Uri.parse("market://details?id=" + context!!.packageName)
+        val goToMarket = Intent(Intent.ACTION_VIEW, uri)
+        goToMarket.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY or
+                Intent.FLAG_ACTIVITY_MULTIPLE_TASK)
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+            goToMarket.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT)
+        }
+        try {
+            startActivity(goToMarket)
+            Log.d(TAG, goToMarket.data?.query)
+        } catch (e: ActivityNotFoundException) {
+            startActivity(Intent(Intent.ACTION_VIEW,
+                    Uri.parse("http://play.google.com/store/apps/details?id=" + context!!.packageName)))
+        }
+    }
+
+    private fun openSettings() {
+        startActivity(Intent(android.provider.Settings.ACTION_SETTINGS))
+    }
+
+    private fun changeTheme() {
+        themeChooser.show(fragmentManager, TAG)
+    }
 }

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

@@ -0,0 +1,34 @@
+package com.sduduzog.slimlauncher.ui.main
+
+import android.annotation.SuppressLint
+import android.app.Dialog
+import android.content.Context
+import android.content.Context.MODE_PRIVATE
+import android.content.SharedPreferences
+import android.os.Bundle
+import android.support.v4.app.DialogFragment
+import android.support.v7.app.AlertDialog
+import android.util.Log
+import com.sduduzog.slimlauncher.R
+
+@SuppressLint("ValidFragment")
+class ThemeChooserDialog(private val ctx: Context) : DialogFragment() {
+
+    private val settings: SharedPreferences = ctx.getSharedPreferences("settings", MODE_PRIVATE)
+    private var choice: Int = 0
+
+    override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
+        val builder = AlertDialog.Builder(ctx)
+        builder.setTitle("Choose theme")
+
+
+        val active = settings.getInt("theme", 0)
+        builder.setSingleChoiceItems(R.array.themes_array, active) { _, i -> choice = i }.setPositiveButton("Done") { _, i -> Log.d("DIALOG", "val$i") }
+        return builder.create()
+    }
+
+    override fun onDestroy() {
+        super.onDestroy()
+        settings.edit().putInt("theme", choice).apply()
+    }
+}

+ 3 - 3
app/src/main/res/drawable/ic_baseline_more_vert_24px.xml

@@ -3,7 +3,7 @@
     android:height="24dp"
     android:viewportWidth="24"
     android:viewportHeight="24">
-  <path
-      android:fillColor="#FF000000"
-      android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z"/>
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z" />
 </vector>

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

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="50dp"
+    android:height="50dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="@color/colorAccent"
+        android:pathData="M12,8l-6,6 1.41,1.41L12,10.83l4.59,4.58L18,14z" />
+</vector>

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

@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="@color/colorAccent"
+        android:pathData="M6,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM18,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z" />
+</vector>

+ 1 - 1
app/src/main/res/layout/fragment_apps_list.xml → app/src/main/res/layout/apps_fragment.xml

@@ -8,4 +8,4 @@
     android:layout_marginStart="16dp"
     android:layout_marginEnd="16dp"
     app:layoutManager="android.support.v7.widget.LinearLayoutManager"
-    tools:listitem="@layout/fragment_app" />
+    tools:listitem="@layout/apps_list_item" />

+ 1 - 1
app/src/main/res/layout/fragment_app.xml → app/src/main/res/layout/apps_list_item.xml

@@ -9,5 +9,5 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_margin="@dimen/text_margin"
-        android:textAppearance="?attr/textAppearanceListItem" />
+        android:textSize="24sp" />
 </LinearLayout>

+ 37 - 0
app/src/main/res/layout/fragment_about.xml

@@ -0,0 +1,37 @@
+<android.support.constraint.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/aboutLayout"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context="com.sduduzog.slimlauncher.ui.main.AboutFragment">
+
+    <!-- TODO: Update blank fragment layout -->
+    <TextView
+        android:id="@+id/textView5"
+        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="Slim launcher"
+        android:textSize="36sp"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        tools:text="Slim launcher" />
+
+    <TextView
+        android:id="@+id/textView4"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="8dp"
+        android:layout_marginLeft="8dp"
+        android:layout_marginTop="8dp"
+        android:text="To be updated..."
+        app:layout_constraintStart_toStartOf="@+id/textView5"
+        app:layout_constraintTop_toBottomOf="@+id/textView5" />
+
+</android.support.constraint.ConstraintLayout>

+ 0 - 111
app/src/main/res/layout/fragment_settings.xml

@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<android.support.constraint.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/frameLayout"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:context=".ui.main.SettingsFragment">
-
-    <!-- TODO: Update blank fragment layout -->
-
-    <TextView
-        android:id="@+id/textView3"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="16dp"
-        android:text="Settings"
-        android:textAppearance="@style/TextAppearance.AppCompat.Large"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
-
-    <Button
-        android:id="@+id/deviceSettingsButton"
-        style="@style/Widget.AppCompat.Button.Borderless"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginEnd="8dp"
-        android:layout_marginRight="8dp"
-        android:layout_marginBottom="16dp"
-        android:text="Device settings"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent" />
-
-    <Switch
-        android:id="@+id/themeSwitch"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="16dp"
-        android:layout_marginEnd="16dp"
-        android:layout_marginRight="16dp"
-        android:padding="8dp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/textView3" />
-
-    <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="8dp"
-        android:text="Dark Theme"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="@+id/themeSwitch" />
-
-    <Button
-        android:id="@+id/addButton"
-        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:text="Add"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/themeSwitch" />
-
-    <TextView
-        android:id="@+id/textView4"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginTop="24dp"
-        android:layout_marginEnd="16dp"
-        android:layout_marginRight="16dp"
-        android:text="Favourite apps"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/themeSwitch" />
-
-    <android.support.v7.widget.RecyclerView
-        android:id="@+id/settingsAppList"
-        android:layout_width="0dp"
-        android:layout_height="0dp"
-        android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginTop="16dp"
-        android:layout_marginEnd="16dp"
-        android:layout_marginRight="16dp"
-        android:layout_marginBottom="16dp"
-        app:layout_constraintBottom_toTopOf="@+id/deviceSettingsButton"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/textView4"
-        tools:listitem="@layout/settings_apps_list_item" />
-
-    <Button
-        android:id="@+id/launcherSettingsButton"
-        style="@style/Widget.AppCompat.Button.Borderless"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="8dp"
-        android:layout_marginLeft="8dp"
-        android:layout_marginBottom="16dp"
-        android:text="launcher settings"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintStart_toStartOf="parent" />
-
-</android.support.constraint.ConstraintLayout>

+ 5 - 6
app/src/main/res/layout/main_activity.xml

@@ -5,13 +5,12 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     tools:context=".MainActivity">
-    <fragment
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
+
+    <fragment xmlns:app="http://schemas.android.com/apk/res-auto"
         android:id="@+id/nav_host_fragment"
-        xmlns:app="http://schemas.android.com/apk/res-auto"
         android:name="androidx.navigation.fragment.NavHostFragment"
-        app:navGraph="@navigation/nav_graph"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
         app:defaultNavHost="true"
-        />
+        app:navGraph="@navigation/nav_graph" />
 </FrameLayout>

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

@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.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/bottomSheet"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="?android:attr/colorBackground"
+    app:behavior_peekHeight="50dp"
+    app:behavior_skipCollapsed="true"
+    app:layout_behavior="android.support.design.widget.BottomSheetBehavior"
+    tools:context=".MainActivity"
+    tools:layout_editor_absoluteY="25dp">
+
+    <TextView
+        android:id="@+id/textView"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="16dp"
+        android:layout_marginLeft="16dp"
+        android:layout_marginTop="16dp"
+        android:text="Slim options"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <TextView
+        android:id="@+id/changeThemeText"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="32dp"
+        android:layout_marginLeft="32dp"
+        android:layout_marginTop="24dp"
+        android:text="Change theme"
+        android:textSize="24sp"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/textView" />
+
+    <TextView
+        android:id="@+id/settingsText"
+        android:layout_width="wrap_content"
+        android:layout_height="0dp"
+        android:layout_marginTop="32dp"
+        android:text="Home screen apps"
+        android:textSize="24sp"
+        app:layout_constraintStart_toStartOf="@+id/changeThemeText"
+        app:layout_constraintTop_toBottomOf="@+id/changeThemeText" />
+
+    <TextView
+        android:id="@+id/deviceSettingsText"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="32dp"
+        android:text="Open device settings"
+        android:textSize="24sp"
+        app:layout_constraintStart_toStartOf="@+id/settingsText"
+        app:layout_constraintTop_toBottomOf="@+id/settingsText" />
+
+    <TextView
+        android:id="@+id/aboutText"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="32dp"
+        android:text="About Slim"
+        android:textSize="24sp"
+        app:layout_constraintStart_toStartOf="@+id/deviceSettingsText"
+        app:layout_constraintTop_toBottomOf="@+id/deviceSettingsText" />
+
+    <TextView
+        android:id="@+id/rateAppText"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="32dp"
+        android:text="Rate the app"
+        android:textSize="24sp"
+        app:layout_constraintStart_toStartOf="@+id/aboutText"
+        app:layout_constraintTop_toBottomOf="@+id/aboutText" />
+
+    <TextView
+        android:id="@+id/changeLauncherText"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="32dp"
+        android:layout_marginLeft="32dp"
+        android:layout_marginBottom="24dp"
+        android:text="Change launcher"
+        android:textSize="16sp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintStart_toStartOf="parent" />
+</android.support.constraint.ConstraintLayout>

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

@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.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">
+
+    <TextView
+        android:id="@+id/clockTextView"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="32dp"
+        android:text="@string/main_placeholder_clock"
+        android:textSize="64sp"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <TextView
+        android:id="@+id/dateTextView"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/main_placeholder_date"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/clockTextView" />
+
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/mainAppsList"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="16dp"
+        android:layout_marginLeft="16dp"
+        android:layout_marginTop="32dp"
+        android:layout_marginEnd="16dp"
+        android:layout_marginRight="16dp"
+        app:layoutManager="android.support.v7.widget.LinearLayoutManager"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        tools:listitem="@layout/main_list_item" />
+
+    <ImageView
+        android:id="@+id/ivExpand"
+        android:layout_width="50dp"
+        android:layout_height="50dp"
+        android:layout_marginStart="8dp"
+        android:layout_marginLeft="8dp"
+        android:layout_marginEnd="8dp"
+        android:layout_marginRight="8dp"
+        android:padding="8dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:srcCompat="@drawable/ic_expand" />
+
+</android.support.constraint.ConstraintLayout>

+ 4 - 48
app/src/main/res/layout/main_fragment.xml

@@ -1,57 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
-<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
+<android.support.design.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.MainFragment">
 
-    <TextView
-        android:id="@+id/clockTextView"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="16dp"
-        android:text="00:00"
-        android:textSize="64sp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
+    <include layout="@layout/main_content" />
 
-    <Button
-        android:id="@+id/settingsButton"
-        style="@style/Widget.AppCompat.Button.Borderless"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginBottom="16dp"
-        android:text="Settings"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintStart_toStartOf="parent" />
+    <include layout="@layout/main_bottom_sheet" />
 
-    <TextView
-        android:id="@+id/dateTextView"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="Date"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/clockTextView" />
-
-    <android.support.v7.widget.RecyclerView
-        android:id="@+id/mainAppsList"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginEnd="16dp"
-        android:layout_marginRight="16dp"
-        android:layout_marginBottom="8dp"
-        app:layoutManager="android.support.v7.widget.LinearLayoutManager"
-        app:layout_constraintBottom_toTopOf="@+id/settingsButton"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/dateTextView"
-        tools:listitem="@layout/main_list_item" />
-</android.support.constraint.ConstraintLayout>
+</android.support.design.widget.CoordinatorLayout>

+ 2 - 3
app/src/main/res/layout/settings_apps_list_item.xml

@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <android.support.constraint.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/linearLayout"
     android:layout_width="match_parent"
     android:layout_height="wrap_content">
@@ -17,7 +16,7 @@
         android:layout_marginRight="8dp"
         android:layout_marginBottom="8dp"
         android:text="TextView"
-        android:textAppearance="@style/TextAppearance.AppCompat.Title"
+        android:textSize="24sp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toStartOf="@+id/settings_item_removeButton"
         app:layout_constraintStart_toStartOf="parent"
@@ -25,7 +24,7 @@
 
     <Button
         android:id="@+id/settings_item_removeButton"
-        style="@style/Widget.AppCompat.Button.Borderless.Colored"
+        style="@style/Widget.AppCompat.Button.Borderless"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:text="remove"

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

@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.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/frameLayout"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".ui.apps.SettingsFragment">
+
+    <!-- TODO: Update blank fragment layout -->
+
+    <TextView
+        android:id="@+id/textView3"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="16dp"
+        android:text="Home screen apps"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <Button
+        android:id="@+id/addButton"
+        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:text="Add"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/settingsAppList"
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        android:layout_marginStart="16dp"
+        android:layout_marginLeft="16dp"
+        android:layout_marginTop="32dp"
+        android:layout_marginEnd="16dp"
+        android:layout_marginRight="16dp"
+        android:layout_marginBottom="8dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/textView3"
+        tools:listitem="@layout/settings_apps_list_item" />
+
+</android.support.constraint.ConstraintLayout>

+ 2 - 2
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
-    <background android:drawable="@color/ic_launcher_background"/>
-    <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
+    <background android:drawable="@color/ic_launcher_background" />
+    <foreground android:drawable="@mipmap/ic_launcher_foreground" />
 </adaptive-icon>

+ 2 - 2
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
-    <background android:drawable="@color/ic_launcher_background"/>
-    <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
+    <background android:drawable="@color/ic_launcher_background" />
+    <foreground android:drawable="@mipmap/ic_launcher_foreground" />
 </adaptive-icon>

+ 12 - 5
app/src/main/res/navigation/nav_graph.xml

@@ -9,16 +9,19 @@
         android:id="@+id/mainFragment"
         android:name="com.sduduzog.slimlauncher.ui.main.MainFragment"
         android:label="main_fragment"
-        tools:layout="@layout/main_fragment" >
+        tools:layout="@layout/main_fragment">
         <action
             android:id="@+id/action_openSettingsFragment"
             app:destination="@id/settingsFragment" />
+        <action
+            android:id="@+id/action_openAboutFragment"
+            app:destination="@id/aboutFragment" />
     </fragment>
     <fragment
         android:id="@+id/settingsFragment"
-        android:name="com.sduduzog.slimlauncher.ui.main.SettingsFragment"
+        android:name="com.sduduzog.slimlauncher.ui.apps.SettingsFragment"
         android:label="fragment_settings"
-        tools:layout="@layout/fragment_settings" >
+        tools:layout="@layout/settings_fragment">
         <action
             android:id="@+id/action_openAppsFragment"
             app:destination="@+id/appsFragment" />
@@ -27,6 +30,10 @@
         android:id="@+id/appsFragment"
         android:name="com.sduduzog.slimlauncher.ui.apps.AppsFragment"
         android:label="fragment_apps_list"
-        tools:layout="@layout/fragment_apps_list" >
-    </fragment>
+        tools:layout="@layout/apps_fragment" />
+    <fragment
+        android:id="@+id/aboutFragment"
+        android:name="com.sduduzog.slimlauncher.ui.main.AboutFragment"
+        android:label="fragment_about"
+        tools:layout="@layout/fragment_about" />
 </navigation>

+ 41 - 0
app/src/main/res/values-v21/styles.xml

@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+    <style name="AppDarkTheme" parent="@style/Theme.AppCompat.NoActionBar">
+        <item name="colorAccent">@color/colorAccent</item>
+        <item name="colorPrimary">@color/primaryColor</item>
+        <item name="colorPrimaryDark">@color/primaryDarkColor</item>
+        <item name="android:colorBackground">@color/primaryDarkColor</item>
+        <item name="android:statusBarColor">?android:attr/colorPrimaryDark</item>
+    </style>
+
+    <style name="AppGreyTheme" parent="@style/AppDarkTheme">
+        <item name="colorPrimary">@color/primaryGrey</item>
+        <item name="colorPrimaryDark">@color/darkGrey</item>
+        <item name="android:colorBackground">@color/primaryGrey</item>
+        <item name="android:statusBarColor">?android:attr/colorPrimary</item>
+    </style>
+
+    <style name="AppPinkTheme" parent="@style/AppTheme">
+        <item name="colorPrimary">@color/primaryPink</item>
+        <item name="colorPrimaryDark">@color/darkPink</item>
+        <item name="android:colorBackground">@color/primaryPink</item>
+        <item name="android:colorForeground">@color/primaryColor</item>
+        <item name="colorAccent">@color/primaryTeal</item>
+        <item name="android:statusBarColor">?android:attr/colorPrimary</item>
+    </style>
+
+    <style name="AppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
+        <item name="colorAccent">@color/colorAccent</item>
+        <item name="android:colorForeground">@android:color/black</item>
+        <item name="android:statusBarColor">?android:attr/colorPrimaryDark</item>
+    </style>
+
+    <style name="AppTealTheme" parent="@style/AppTheme">
+        <item name="colorPrimary">@color/darkTeal</item>
+        <item name="colorPrimaryDark">@color/darkTeal</item>
+        <item name="android:colorBackground">@color/primaryTeal</item>
+        <item name="android:colorForeground">@color/primaryColor</item>
+        <item name="android:statusBarColor">@color/primaryTeal</item>
+    </style>
+</resources>

+ 14 - 7
app/src/main/res/values/colors.xml

@@ -1,15 +1,22 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-    <color name="colorPrimary">#008577</color>
-    <color name="colorPrimaryDark">#00574B</color>
     <color name="colorAccent">#D81B60</color>
 
     <color name="primaryColor">#212121</color>
     <color name="primaryLightColor">#484848</color>
     <color name="primaryDarkColor">#000000</color>
-    <color name="secondaryColor">#edf0f2</color>
-    <color name="secondaryLightColor">#ffffff</color>
-    <color name="secondaryDarkColor">#bbbebf</color>
-    <color name="primaryTextColor">#ffffff</color>
-    <color name="secondaryTextColor">#000000</color>
+
+
+    <color name="primaryGrey">#263238</color>
+    <color name="lightGrey">#4f5b62</color>
+    <color name="darkGrey">#000a12</color>
+
+    <color name="primaryTeal">#b2dfdb</color>
+    <color name="lightTeal">#e5ffff</color>
+    <color name="darkTeal">#82ada9</color>
+
+    <color name="primaryPink">#fce4ec</color>
+    <color name="lightPink">#ffffff</color>
+    <color name="darkPink">#c9b2ba</color>
+
 </resources>

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

@@ -1,5 +1,15 @@
 <resources>
-    <string name="app_name">Slim Launcher</string>
+    <string name="app_name">Slim</string>
+    <string name="main_placeholder_clock">00:00</string>
+    <string name="main_placeholder_date">Date</string>
+
+    <string-array name="themes_array">
+        <item>Default</item>
+        <item>Dark</item>
+        <item>Grey</item>
+        <item>Teal</item>
+        <item>Pink</item>
+    </string-array>
 
     <!-- TODO: Remove or change this placeholder text -->
     <string name="hello_blank_fragment">Hello blank fragment</string>

+ 26 - 16
app/src/main/res/values/styles.xml

@@ -1,26 +1,36 @@
 <resources>
 
     <!-- Base application theme. -->
-    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
-        <!-- Customize your theme here. -->
-        <item name="colorPrimary">@color/colorPrimary</item>
-        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
+    <style name="AppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
         <item name="colorAccent">@color/colorAccent</item>
-    </style>
-
-    <style name="AppLightTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
-        <item name="android:windowNoTitle">true</item>
-        <item name="android:windowActionBar">false</item>
-        <item name="android:windowFullscreen">true</item>
-        <item name="android:windowContentOverlay">@null</item>
+        <item name="android:colorForeground">@android:color/black</item>
     </style>
 
     <style name="AppDarkTheme" parent="@style/Theme.AppCompat.NoActionBar">
-        <item name="android:windowNoTitle">true</item>
-        <item name="android:windowActionBar">false</item>
-        <item name="android:windowFullscreen">true</item>
-        <item name="android:windowContentOverlay">@null</item>
-        <item name="android:colorBackground">@color/primaryDarkColor</item>
+        <item name="colorAccent">@color/colorAccent</item>
         <item name="colorPrimary">@color/primaryColor</item>
+        <item name="colorPrimaryDark">@color/primaryDarkColor</item>
+        <item name="android:colorBackground">@color/primaryDarkColor</item>
+    </style>
+
+    <style name="AppGreyTheme" parent="@style/AppDarkTheme">
+        <item name="colorPrimary">@color/primaryGrey</item>
+        <item name="colorPrimaryDark">@color/darkGrey</item>
+        <item name="android:colorBackground">@color/primaryGrey</item>
+    </style>
+
+    <style name="AppTealTheme" parent="@style/AppTheme">
+        <item name="colorPrimary">@color/darkTeal</item>
+        <item name="colorPrimaryDark">@color/darkTeal</item>
+        <item name="android:colorBackground">@color/primaryTeal</item>
+        <item name="android:colorForeground">@color/primaryColor</item>
+    </style>
+
+    <style name="AppPinkTheme" parent="@style/AppTheme">
+        <item name="colorPrimary">@color/primaryPink</item>
+        <item name="colorPrimaryDark">@color/darkPink</item>
+        <item name="android:colorBackground">@color/primaryPink</item>
+        <item name="android:colorForeground">@color/primaryColor</item>
+        <item name="colorAccent">@color/primaryTeal</item>
     </style>
 </resources>

+ 1 - 2
app/src/test/java/com/sduduzog/slimlauncher/ExampleUnitTest.kt

@@ -1,9 +1,8 @@
 package com.sduduzog.slimlauncher
 
+import org.junit.Assert.assertEquals
 import org.junit.Test
 
-import org.junit.Assert.*
-
 /**
  * Example local unit test, which will execute on the development machine (host).
  *