Pārlūkot izejas kodu

bug fix on permissions

sduduzog 7 gadi atpakaļ
vecāks
revīzija
a702208335
36 mainītis faili ar 479 papildinājumiem un 512 dzēšanām
  1. 4 4
      app/build.gradle
  2. 1 1
      app/src/main/AndroidManifest.xml
  3. 3 0
      app/src/main/java/com/sduduzog/slimlauncher/MainActivity.kt
  4. 2 1
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/HomeAppsAdapter.kt
  5. 0 95
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/HomeFragment.kt
  6. 86 57
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/MainFragment.kt
  7. 18 0
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/notes/NoteFragment.kt
  8. 23 0
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/notes/NotesListFragment.kt
  9. 66 0
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/notes/VerticalViewPager.kt
  10. 1 7
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/settings/SettingsListAdapter.kt
  11. 0 9
      app/src/main/res/drawable-v21/ic_call.xml
  12. 0 12
      app/src/main/res/drawable-v21/ic_photo_camera.xml
  13. 1 1
      app/src/main/res/drawable/ic_call.xml
  14. 9 0
      app/src/main/res/drawable/ic_dashboard_black_24dp.xml
  15. 9 0
      app/src/main/res/drawable/ic_edit.xml
  16. 1 1
      app/src/main/res/drawable/ic_expand.xml
  17. 2 2
      app/src/main/res/drawable/ic_home_black_24dp.xml
  18. 9 0
      app/src/main/res/drawable/ic_note.xml
  19. 9 0
      app/src/main/res/drawable/ic_notifications_black_24dp.xml
  20. 2 2
      app/src/main/res/drawable/ic_photo_camera.xml
  21. 0 16
      app/src/main/res/layout-sw600dp/main_activity.xml
  22. 0 19
      app/src/main/res/layout-sw600dp/main_list_item.xml
  23. 0 147
      app/src/main/res/layout-v21/settings_fragment.xml
  24. 0 54
      app/src/main/res/layout/home_framgent.xml
  25. 14 6
      app/src/main/res/layout/main_bottom_sheet.xml
  26. 52 3
      app/src/main/res/layout/main_content.xml
  27. 1 1
      app/src/main/res/layout/main_fragment.xml
  28. 75 0
      app/src/main/res/layout/note_fragment.xml
  29. 35 0
      app/src/main/res/layout/notes_list_fragment.xml
  30. 8 0
      app/src/main/res/navigation/nav_graph.xml
  31. 0 43
      app/src/main/res/values-v21/styles.xml
  32. 0 6
      app/src/main/res/values-w820dp/dimens.xml
  33. 13 7
      app/src/main/res/values/colors.xml
  34. 4 0
      app/src/main/res/values/dimens.xml
  35. 9 7
      app/src/main/res/values/strings.xml
  36. 22 11
      app/src/main/res/values/styles.xml

+ 4 - 4
app/build.gradle

@@ -10,10 +10,10 @@ android {
     compileSdkVersion 28
     defaultConfig {
         applicationId "com.sduduzog.slimlauncher"
-        minSdkVersion 15
+        minSdkVersion 21
         targetSdkVersion 28
-        versionCode 16
-        versionName "2.0.0"
+        versionCode 19
+        versionName "2.0.3"
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         vectorDrawables.useSupportLibrary = true
     }
@@ -24,7 +24,6 @@ android {
         }
         debug {
             minifyEnabled false
-            applicationIdSuffix ".debug"
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
         }
     }
@@ -55,6 +54,7 @@ dependencies {
 
     // 3rd Party libs
     implementation 'com.daasuu:EasingInterpolator:1.0.0'
+    // implementation 'com.getbase:floatingactionbutton:1.10.1'
 
     // Test libs
     testImplementation 'junit:junit:4.12'

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

@@ -3,7 +3,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     package="com.sduduzog.slimlauncher">
 
-    <uses-permission android:name="android.permission.SET_ALARM" />
+    <uses-permission android:name="com.android.alarm.permission.SET_ALARM" />
 
     <application
         android:allowBackup="false"

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

@@ -72,6 +72,9 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
                     return R.style.AppTealTheme
                 }
                 4 -> {
+                    return R.style.AppCandyTheme
+                }
+                5 -> {
                     return R.style.AppPinkTheme
                 }
             }

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

@@ -9,6 +9,7 @@ import android.view.View
 import android.view.ViewGroup
 import android.widget.TextView
 import android.widget.Toast
+import androidx.fragment.app.Fragment
 import androidx.lifecycle.Observer
 import androidx.lifecycle.ViewModelProviders
 import androidx.recyclerview.widget.RecyclerView
@@ -16,7 +17,7 @@ import com.sduduzog.slimlauncher.R
 import com.sduduzog.slimlauncher.ui.main.model.HomeApp
 import com.sduduzog.slimlauncher.ui.main.model.MainViewModel
 
-class HomeAppsAdapter(private var fragment: HomeFragment)
+class HomeAppsAdapter(private var fragment: Fragment)
     : RecyclerView.Adapter<HomeAppsAdapter.ViewHolder>() {
 
     private var apps: List<HomeApp> = listOf()

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

@@ -1,95 +0,0 @@
-package com.sduduzog.slimlauncher.ui.main
-
-
-import android.content.BroadcastReceiver
-import android.content.Context
-import android.content.Intent
-import android.content.IntentFilter
-import android.os.Build
-import android.os.Bundle
-import android.util.Log
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.fragment.app.Fragment
-import com.sduduzog.slimlauncher.R
-import kotlinx.android.synthetic.main.home_framgent.*
-import java.text.SimpleDateFormat
-import java.util.*
-
-class HomeFragment : Fragment() {
-
-    @Suppress("PropertyName")
-    val TAG: String = "HomeFragment"
-
-    private lateinit var adapter: HomeAppsAdapter
-    private lateinit var receiver: BroadcastReceiver
-
-    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
-                              savedInstanceState: Bundle?): View? {
-        Log.d(TAG, "onCreateView")
-        return inflater.inflate(R.layout.home_framgent, container, false)
-    }
-
-    override fun onActivityCreated(savedInstanceState: Bundle?) {
-        super.onActivityCreated(savedInstanceState)
-        Log.d(TAG, "onActivityCreated")
-        clockTextView.setOnClickListener {
-            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
-                val intent = Intent(android.provider.AlarmClock.ACTION_SHOW_ALARMS)
-                intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
-                startActivity(intent)
-            }
-        }
-        adapter = HomeAppsAdapter(this)
-        mainAppsList.adapter = adapter
-    }
-
-    override fun onStart() {
-        super.onStart()
-        Log.d(TAG, "onStart")
-        receiver = ClockReceiver()
-        activity?.registerReceiver(receiver, IntentFilter(Intent.ACTION_TIME_TICK))
-    }
-
-    override fun onResume() {
-        super.onResume()
-        Log.d(TAG, "onResume")
-        updateUi()
-    }
-
-    override fun onStop() {
-        super.onStop()
-        activity?.unregisterReceiver(receiver)
-    }
-
-    inner class ClockReceiver : BroadcastReceiver() {
-        override fun onReceive(ctx: Context?, intent: Intent?) {
-            updateUi()
-        }
-    }
-
-    fun updateUi() {
-        val twenty4Hour = context?.getSharedPreferences(getString(R.string.prefs_settings), Context.MODE_PRIVATE)
-                ?.getBoolean(getString(R.string.prefs_settings_key_clock_type), false)
-        val date = Date()
-        if (twenty4Hour as Boolean) {
-            val fWatchTime = SimpleDateFormat("HH:mm", Locale.ENGLISH)
-            clockTextView.text = fWatchTime.format(date)
-            clockAmPm.visibility = View.GONE
-        } else {
-            val fWatchTime = SimpleDateFormat("hh:mm", Locale.ENGLISH)
-            val fWatchTimeAP = SimpleDateFormat("aa", Locale.ENGLISH)
-            clockTextView.text = fWatchTime.format(date)
-            clockAmPm.text = fWatchTimeAP.format(date)
-            clockAmPm.visibility = View.VISIBLE
-        }
-        val fWatchDate = SimpleDateFormat("EEE, MMM dd", Locale.ENGLISH)
-        dateTextView.text = fWatchDate.format(date)
-    }
-
-    companion object {
-        @JvmStatic
-        fun newInstance() = HomeFragment()
-    }
-}

+ 86 - 57
app/src/main/java/com/sduduzog/slimlauncher/ui/main/MainFragment.kt

@@ -1,12 +1,11 @@
 package com.sduduzog.slimlauncher.ui.main
 
 import android.animation.ObjectAnimator
-import android.content.ActivityNotFoundException
-import android.content.Context
-import android.content.Intent
+import android.content.*
 import android.net.Uri
 import android.os.Build
 import android.os.Bundle
+import android.provider.AlarmClock
 import android.provider.MediaStore
 import android.provider.Settings
 import android.util.Log
@@ -15,28 +14,26 @@ import android.view.View
 import android.view.ViewGroup
 import android.widget.FrameLayout
 import androidx.fragment.app.Fragment
-import androidx.fragment.app.FragmentManager
-import androidx.fragment.app.FragmentPagerAdapter
 import androidx.navigation.Navigation
 import com.daasuu.ei.Ease
 import com.daasuu.ei.EasingInterpolator
 import com.google.android.material.bottomsheet.BottomSheetBehavior
-import com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_COLLAPSED
-import com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_HALF_EXPANDED
 import com.sduduzog.slimlauncher.MainActivity
 import com.sduduzog.slimlauncher.R
 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 sheetBehavior: BottomSheetBehavior<FrameLayout>
-    private var mSectionsPagerAdapter: SectionsPagerAdapter? = null
-
     @Suppress("PropertyName")
     val TAG: String = "MainFragment"
 
+    private lateinit var adapter: HomeAppsAdapter
+    private lateinit var receiver: BroadcastReceiver
+    private lateinit var sheetBehavior: BottomSheetBehavior<FrameLayout>
 
     override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
                               savedInstanceState: Bundle?): View {
@@ -46,8 +43,9 @@ class MainFragment : Fragment() {
     override fun onActivityCreated(savedInstanceState: Bundle?) {
         super.onActivityCreated(savedInstanceState)
         Log.d(TAG, "onActivityCreated")
-        mSectionsPagerAdapter = SectionsPagerAdapter(childFragmentManager)
-        container.adapter = mSectionsPagerAdapter
+        adapter = HomeAppsAdapter(this)
+        mainAppsList.adapter = adapter
+
         sheetBehavior = BottomSheetBehavior.from(bottomSheet)
         optionsView.alpha = 0.0f
         setEventListeners()
@@ -56,9 +54,18 @@ class MainFragment : Fragment() {
     override fun onStart() {
         super.onStart()
         Log.d(TAG, "onStart")
+        receiver = ClockReceiver()
+        activity?.registerReceiver(receiver, IntentFilter(Intent.ACTION_TIME_TICK))
+
         doBounceAnimation(ivExpand)
-        sheetBehavior.state = STATE_COLLAPSED
-        mSectionsPagerAdapter?.notifyDataSetChanged()
+        sheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
+    }
+
+
+    override fun onResume() {
+        super.onResume()
+        Log.d(TAG, "onResume")
+        updateUi()
     }
 
     override fun onAttach(context: Context?) {
@@ -66,45 +73,29 @@ class MainFragment : Fragment() {
         with(context as MainActivity) {
             this.onBackPressedListener = object : MainActivity.OnBackPressedListener {
                 override fun onBackPressed() {
-                    sheetBehavior.state = STATE_COLLAPSED
+                    sheetBehavior.state = BottomSheetBehavior.STATE_COLLAPSED
                 }
             }
         }
     }
 
-    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))
+    override fun onStop() {
+        super.onStop()
+        activity?.unregisterReceiver(receiver)
     }
 
     private fun setEventListeners() {
         bottomSheet.setOnClickListener {
 
+        }
+        clockTextView.setOnClickListener {
+            try{
+                val intent = Intent(AlarmClock.ACTION_SHOW_ALARMS)
+                intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
+                startActivity(intent)
+            } finally {
+                // Do nothing
+            }
         }
         sheetBehavior.setBottomSheetCallback(object : BottomSheetBehavior.BottomSheetCallback() {
             override fun onSlide(p0: View, p1: Float) {
@@ -118,7 +109,7 @@ class MainFragment : Fragment() {
 
             override fun onStateChanged(bottomSheet: View, newState: Int) {
                 iconTray.visibility = View.GONE
-                if (newState == STATE_COLLAPSED) {
+                if (newState == BottomSheetBehavior.STATE_COLLAPSED) {
                     iconTray.visibility = View.VISIBLE
                 }
             }
@@ -132,6 +123,7 @@ class MainFragment : Fragment() {
             }
         } else changeLauncherText.visibility = View.GONE
         aboutText.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_openAboutFragment))
+        notesText.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_openNotesListFragment))
         ivCall.setOnClickListener {
             try {
                 val intent = Intent(Intent.ACTION_DIAL)
@@ -150,26 +142,63 @@ class MainFragment : Fragment() {
         }
 
         ivExpand.setOnClickListener {
-            if (sheetBehavior.state == STATE_COLLAPSED) sheetBehavior.state = STATE_HALF_EXPANDED
+            if (sheetBehavior.state == BottomSheetBehavior.STATE_COLLAPSED) sheetBehavior.state = BottomSheetBehavior.STATE_HALF_EXPANDED
         }
     }
 
-    inner class SectionsPagerAdapter(fm: FragmentManager) : FragmentPagerAdapter(fm) {
-
-        override fun getItem(position: Int): Fragment {
-            return HomeFragment.newInstance()
+    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))
+    }
 
-        override fun getCount(): Int {
-            // Show 3 total pages.
-            return 1
+    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()
+    }
+
+    fun updateUi() {
+        val twenty4Hour = context?.getSharedPreferences(getString(R.string.prefs_settings), Context.MODE_PRIVATE)
+                ?.getBoolean(getString(R.string.prefs_settings_key_clock_type), false)
+        val date = Date()
+        if (twenty4Hour as Boolean) {
+            val fWatchTime = SimpleDateFormat("HH:mm", Locale.ENGLISH)
+            clockTextView.text = fWatchTime.format(date)
+            clockAmPm.visibility = View.GONE
+        } else {
+            val fWatchTime = SimpleDateFormat("hh:mm", Locale.ENGLISH)
+            val fWatchTimeAP = SimpleDateFormat("aa", Locale.ENGLISH)
+            clockTextView.text = fWatchTime.format(date)
+            clockAmPm.text = fWatchTimeAP.format(date)
+            clockAmPm.visibility = View.VISIBLE
         }
+        val fWatchDate = SimpleDateFormat("EEE, MMM dd", Locale.ENGLISH)
+        dateTextView.text = fWatchDate.format(date)
+    }
 
-        override fun getPageTitle(position: Int): CharSequence? {
-            when (position) {
-                0 -> return "Home"
-            }
-            return null
+    inner class ClockReceiver : BroadcastReceiver() {
+        override fun onReceive(ctx: Context?, intent: Intent?) {
+            updateUi()
         }
     }
+
 }

+ 18 - 0
app/src/main/java/com/sduduzog/slimlauncher/ui/main/notes/NoteFragment.kt

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

+ 23 - 0
app/src/main/java/com/sduduzog/slimlauncher/ui/main/notes/NotesListFragment.kt

@@ -0,0 +1,23 @@
+package com.sduduzog.slimlauncher.ui.main.notes
+
+
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import androidx.fragment.app.Fragment
+import com.sduduzog.slimlauncher.R
+
+
+class NotesListFragment : Fragment() {
+
+    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
+                              savedInstanceState: Bundle?): View? {
+        // Inflate the layout for this fragment
+        return inflater.inflate(R.layout.notes_list_fragment, container, false)
+    }
+
+//    override fun onActivityCreated(savedInstanceState: Bundle?) {
+//        super.onActivityCreated(savedInstanceState)
+//    }
+}

+ 66 - 0
app/src/main/java/com/sduduzog/slimlauncher/ui/main/notes/VerticalViewPager.kt

@@ -0,0 +1,66 @@
+package com.sduduzog.slimlauncher.ui.main.notes
+
+import android.content.Context
+import android.util.AttributeSet
+import android.view.MotionEvent
+import android.view.View
+import androidx.viewpager.widget.ViewPager
+
+
+class VerticalViewPager @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : ViewPager(context, attrs) {
+
+    init {
+        init()
+    }
+
+    override fun canScrollHorizontally(direction: Int): Boolean {
+        return false
+    }
+
+    override fun canScrollVertically(direction: Int): Boolean {
+        return super.canScrollHorizontally(direction)
+    }
+
+    private fun init() {
+        setPageTransformer(true, VerticalPageTransformer())
+        overScrollMode = View.OVER_SCROLL_NEVER
+    }
+
+    override fun onInterceptTouchEvent(ev: MotionEvent): Boolean {
+        val toIntercept = super.onInterceptTouchEvent(flipXY(ev))
+        flipXY(ev)
+        return toIntercept
+    }
+
+    override fun onTouchEvent(ev: MotionEvent): Boolean {
+        val toHandle = super.onTouchEvent(flipXY(ev))
+        flipXY(ev)
+        return toHandle
+    }
+
+    private fun flipXY(ev: MotionEvent): MotionEvent {
+        val width = width.toFloat()
+        val height = height.toFloat()
+        val x = ev.y / height * width
+        val y = ev.x / width * height
+        ev.setLocation(x, y)
+        return ev
+    }
+
+    private class VerticalPageTransformer : ViewPager.PageTransformer {
+        override fun transformPage(view: View, position: Float) {
+            val pageWidth = view.getWidth()
+            val pageHeight = view.getHeight()
+            if (position < -1) {
+                view.setAlpha(0F)
+            } else if (position <= 1) {
+                view.setAlpha(1F)
+                view.setTranslationX(pageWidth * -position)
+                val yPosition = position * pageHeight
+                view.setTranslationY(yPosition)
+            } else {
+                view.setAlpha(0F)
+            }
+        }
+    }
+}

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

@@ -43,6 +43,7 @@ class SettingsListAdapter(private val fragment: Fragment) : RecyclerView.Adapter
             holder.itemButton.visibility = View.GONE
         } else {
             holder.itemText.text = fragment.getString(R.string.settings_list_item_text)
+            holder.itemText.alpha = .3f
             holder.itemButton.visibility = View.VISIBLE
             val bundle = Bundle()
             bundle.putInt("index", position)
@@ -53,13 +54,6 @@ class SettingsListAdapter(private val fragment: Fragment) : RecyclerView.Adapter
 
     override fun getItemCount() = if (displayedApps.size != 5) displayedApps.size + 1 else displayedApps.size
 
-//    fun deleteAppFromList(position: Int) {
-//        deletedFrom = position
-//        if (position < displayedApps.size) {
-//            viewModel.deleteApp(displayedApps[position])
-//        } else
-//            notifyDataSetChanged()
-//    }
 
     private fun updateApps(newList: List<HomeApp>) {
         val size = displayedApps.size

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

@@ -1,9 +0,0 @@
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-    android:width="24dp"
-    android:height="24dp"
-    android:viewportWidth="24.0"
-    android:viewportHeight="24.0">
-    <path
-        android:fillColor="?android:colorForeground"
-        android:pathData="M6.62,10.79c1.44,2.83 3.76,5.14 6.59,6.59l2.2,-2.2c0.27,-0.27 0.67,-0.36 1.02,-0.24 1.12,0.37 2.33,0.57 3.57,0.57 0.55,0 1,0.45 1,1V20c0,0.55 -0.45,1 -1,1 -9.39,0 -17,-7.61 -17,-17 0,-0.55 0.45,-1 1,-1h3.5c0.55,0 1,0.45 1,1 0,1.25 0.2,2.45 0.57,3.57 0.11,0.35 0.03,0.74 -0.25,1.02l-2.2,2.2z" />
-</vector>

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

@@ -1,12 +0,0 @@
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-    android:width="24dp"
-    android:height="24dp"
-    android:viewportWidth="24.0"
-    android:viewportHeight="24.0">
-    <path
-        android:fillColor="?android:colorForeground"
-        android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0" />
-    <path
-        android:fillColor="?android:colorForeground"
-        android:pathData="M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z" />
-</vector>

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

@@ -4,6 +4,6 @@
     android:viewportWidth="24.0"
     android:viewportHeight="24.0">
     <path
-        android:fillColor="@color/colorAccent"
+        android:fillColor="?android:colorForeground"
         android:pathData="M6.62,10.79c1.44,2.83 3.76,5.14 6.59,6.59l2.2,-2.2c0.27,-0.27 0.67,-0.36 1.02,-0.24 1.12,0.37 2.33,0.57 3.57,0.57 0.55,0 1,0.45 1,1V20c0,0.55 -0.45,1 -1,1 -9.39,0 -17,-7.61 -17,-17 0,-0.55 0.45,-1 1,-1h3.5c0.55,0 1,0.45 1,1 0,1.25 0.2,2.45 0.57,3.57 0.11,0.35 0.03,0.74 -0.25,1.02l-2.2,2.2z" />
 </vector>

+ 9 - 0
app/src/main/res/drawable/ic_dashboard_black_24dp.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="#FF000000"
+        android:pathData="M3,13h8L11,3L3,3v10zM3,21h8v-6L3,15v6zM13,21h8L21,11h-8v10zM13,3v6h8L21,3h-8z" />
+</vector>

+ 9 - 0
app/src/main/res/drawable/ic_edit.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="#FFFFFFFF"
+        android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>
+</vector>

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

@@ -4,6 +4,6 @@
     android:viewportWidth="24.0"
     android:viewportHeight="24.0">
     <path
-        android:fillColor="@color/colorAccent"
+        android:fillColor="?android:colorForeground"
         android:pathData="M12,8l-6,6 1.41,1.41L12,10.83l4.59,4.58L18,14z" />
 </vector>

+ 2 - 2
app/src/main/res/drawable-v21/ic_expand.xml → app/src/main/res/drawable/ic_home_black_24dp.xml

@@ -4,6 +4,6 @@
     android:viewportWidth="24.0"
     android:viewportHeight="24.0">
     <path
-        android:fillColor="?android:colorForeground"
-        android:pathData="M12,8l-6,6 1.41,1.41L12,10.83l4.59,4.58L18,14z" />
+        android:fillColor="#FF000000"
+        android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z" />
 </vector>

+ 9 - 0
app/src/main/res/drawable/ic_note.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="#FF000000"
+        android:pathData="M22,10l-6,-6L4,4c-1.1,0 -2,0.9 -2,2v12.01c0,1.1 0.9,1.99 2,1.99l16,-0.01c1.1,0 2,-0.89 2,-1.99v-8zM15,5.5l5.5,5.5L15,11L15,5.5z"/>
+</vector>

+ 9 - 0
app/src/main/res/drawable/ic_notifications_black_24dp.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="#FF000000"
+        android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4c0,1.1 0.89,2 2,2zM18,16v-5c0,-3.07 -1.64,-5.64 -4.5,-6.32L13.5,4c0,-0.83 -0.67,-1.5 -1.5,-1.5s-1.5,0.67 -1.5,1.5v0.68C7.63,5.36 6,7.92 6,11v5l-2,2v1h16v-1l-2,-2z" />
+</vector>

+ 2 - 2
app/src/main/res/drawable/ic_photo_camera.xml

@@ -4,9 +4,9 @@
     android:viewportWidth="24.0"
     android:viewportHeight="24.0">
     <path
-        android:fillColor="@color/colorAccent"
+        android:fillColor="?android:colorForeground"
         android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0" />
     <path
-        android:fillColor="@color/colorAccent"
+        android:fillColor="?android:colorForeground"
         android:pathData="M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z" />
 </vector>

+ 0 - 16
app/src/main/res/layout-sw600dp/main_activity.xml

@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<merge xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:id="@+id/main_activity_container"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:context=".MainActivity">
-
-    <fragment xmlns:app="http://schemas.android.com/apk/res-auto"
-        android:id="@+id/nav_host_fragment"
-        android:name="androidx.navigation.fragment.NavHostFragment"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        app:defaultNavHost="true"
-        app:navGraph="@navigation/nav_graph" />
-</merge>

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

@@ -1,19 +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="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginTop="16dp"
-        android:layout_marginBottom="16dp"
-        android:textSize="64sp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
-</androidx.constraintlayout.widget.ConstraintLayout>

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

@@ -1,147 +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/frameLayout"
-    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_marginTop="16dp"
-        android:text="@string/settings_title"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
-
-    <androidx.recyclerview.widget.RecyclerView
-        android:id="@+id/settingsAppList"
-        android:layout_width="0dp"
-        android:layout_height="0dp"
-        android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginEnd="16dp"
-        android:layout_marginRight="16dp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/textView9"
-        tools:listitem="@layout/settings_list_item" />
-
-    <TextView
-        android:id="@+id/textView2"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="24dp"
-        android:layout_marginTop="16dp"
-        android:text="@string/settings_text_use_24_hour_clock"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="24sp"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/textView3" />
-
-    <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:buttonTint="?android:colorForeground"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintTop_toTopOf="@+id/textView2" />
-
-    <TextView
-        android:id="@+id/textView4"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/settings_text_tap_to_check_between_24_hour_or_12_hour"
-        app:layout_constraintStart_toStartOf="@+id/textView2"
-        app:layout_constraintTop_toBottomOf="@+id/textView2" />
-
-    <View
-        android:id="@+id/divider"
-        android:layout_width="0dp"
-        android:layout_height="1dp"
-        android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginTop="16dp"
-        android:layout_marginEnd="16dp"
-        android:layout_marginRight="16dp"
-        android:background="?android:attr/listDivider"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/textView4" />
-
-    <TextView
-        android:id="@+id/changeThemeText"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="24dp"
-        android:layout_marginTop="8dp"
-        android:text="@string/main_options_change_theme"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="24sp"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/divider" />
-
-    <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" />
-
-    <View
-        android:id="@+id/divider2"
-        android:layout_width="0dp"
-        android:layout_height="1dp"
-        android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginTop="16dp"
-        android:layout_marginEnd="16dp"
-        android:layout_marginRight="16dp"
-        android:background="?android:attr/listDivider"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/textView7" />
-
-    <TextView
-        android:id="@+id/textView8"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="24dp"
-        android:layout_marginTop="8dp"
-        android:text="@string/settings_text_home_screen_apps"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="24sp"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/divider2" />
-
-    <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:text="@string/settings_button_change_theme"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/divider" />
-
-    <TextView
-        android:id="@+id/textView9"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginEnd="8dp"
-        android:text="@string/settings_list_item_subtext"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="@+id/textView8"
-        app:layout_constraintTop_toBottomOf="@+id/textView8" />
-
-</androidx.constraintlayout.widget.ConstraintLayout>

+ 0 - 54
app/src/main/res/layout/home_framgent.xml

@@ -1,54 +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">
-
-    <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" />
-
-    <androidx.recyclerview.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="androidx.recyclerview.widget.LinearLayoutManager"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        tools:listitem="@layout/main_list_item" />
-
-    <TextView
-        android:id="@+id/clockAmPm"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="16dp"
-        android:textSize="18sp"
-        app:layout_constraintStart_toEndOf="@+id/clockTextView"
-        app:layout_constraintTop_toTopOf="@+id/clockTextView" />
-
-</androidx.constraintlayout.widget.ConstraintLayout>

+ 14 - 6
app/src/main/res/layout/main_bottom_sheet.xml

@@ -8,7 +8,7 @@
     app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
     app:behavior_hideable="false"
     app:behavior_peekHeight="60dp"
-    tools:context=".MainActivity">
+    tools:context="com.sduduzog.slimlauncher.ui.main.MainFragment">
 
 
     <androidx.cardview.widget.CardView
@@ -41,13 +41,14 @@
                 app:layout_constraintTop_toTopOf="parent" />
 
             <TextView
-                android:id="@+id/deviceSettingsText"
+                android:id="@+id/notesText"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_margin="8dp"
                 android:padding="8dp"
-                android:text="@string/main_options_settings"
-                android:textSize="24sp" />
+                android:text="@string/main_options_text_notes"
+                android:textSize="24sp"
+                android:visibility="gone" />
 
             <TextView
                 android:id="@+id/settingsText"
@@ -58,6 +59,15 @@
                 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"
@@ -99,7 +109,6 @@
             android:layout_width="0dp"
             android:layout_height="wrap_content"
             android:layout_marginStart="8dp"
-            android:layout_marginLeft="8dp"
             android:contentDescription="@string/main_call_icon"
             android:padding="16dp"
             app:layout_constraintStart_toStartOf="parent"
@@ -126,7 +135,6 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginEnd="8dp"
-            android:layout_marginRight="8dp"
             android:contentDescription="@string/main_photo_camera_icon"
             android:padding="16dp"
             app:layout_constraintEnd_toEndOf="parent"

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

@@ -1,6 +1,55 @@
-<androidx.viewpager.widget.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
+<?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/container"
+    android:id="@+id/main_content"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    tools:context="com.sduduzog.slimlauncher.ui.main.MainFragment" />
+    tools:showIn="@layout/main_fragment">
+
+    <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" />
+
+    <androidx.recyclerview.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="androidx.recyclerview.widget.LinearLayoutManager"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        tools:listitem="@layout/main_list_item" />
+
+    <TextView
+        android:id="@+id/clockAmPm"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="16dp"
+        android:textSize="18sp"
+        app:layout_constraintStart_toEndOf="@+id/clockTextView"
+        app:layout_constraintTop_toTopOf="@+id/clockTextView" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>

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

@@ -10,4 +10,4 @@
 
     <include layout="@layout/main_bottom_sheet" />
 
-</androidx.coordinatorlayout.widget.CoordinatorLayout>
+</androidx.coordinatorlayout.widget.CoordinatorLayout>

+ 75 - 0
app/src/main/res/layout/note_fragment.xml

@@ -0,0 +1,75 @@
+<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/frameLayout3"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context="com.sduduzog.slimlauncher.ui.main.notes.NoteFragment">
+
+
+    <EditText
+        android:id="@+id/titleEditText"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="8dp"
+        android:layout_marginTop="8dp"
+        android:layout_marginEnd="8dp"
+        android:background="@android:color/transparent"
+        android:ems="10"
+        android:hint="@string/note_fragment_hint_title"
+        android:inputType="textPersonName"
+        android:padding="8dp"
+        android:textSize="24sp"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        tools:ignore="Autofill,LabelFor" />
+
+    <EditText
+        android:id="@+id/bodyEditText"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="8dp"
+        android:layout_marginTop="8dp"
+        android:layout_marginEnd="8dp"
+        android:background="@android:color/transparent"
+        android:ems="10"
+        android:hint="@string/note_fragment_hint_body"
+        android:inputType="textAutoCorrect|textAutoComplete|textMultiLine|textImeMultiLine"
+        android:padding="8dp"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/titleEditText"
+        tools:ignore="Autofill,LabelFor" />
+
+    <TextView
+        android:id="@+id/textTitle"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="8dp"
+        android:layout_marginTop="8dp"
+        android:layout_marginEnd="8dp"
+        android:padding="8dp"
+        android:text="@string/note_fragment_hint_title"
+        android:textSize="24sp"
+        android:visibility="gone"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <TextView
+        android:id="@+id/textBody"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="8dp"
+        android:layout_marginTop="8dp"
+        android:layout_marginEnd="8dp"
+        android:padding="8dp"
+        android:text="@string/note_fragment_hint_body"
+        android:textSize="18sp"
+        android:visibility="gone"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/textTitle" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 35 - 0
app/src/main/res/layout/notes_list_fragment.xml

@@ -0,0 +1,35 @@
+<androidx.coordinatorlayout.widget.CoordinatorLayout 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/frameLayout2"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:fitsSystemWindows="true"
+    tools:context="com.sduduzog.slimlauncher.ui.main.notes.NotesListFragment">
+
+    <com.google.android.material.appbar.AppBarLayout
+        android:layout_width="match_parent"
+        android:layout_height="?attr/actionBarSize"
+        app:elevation="10dp">
+
+        <androidx.appcompat.widget.Toolbar
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            app:title="Hello" />
+    </com.google.android.material.appbar.AppBarLayout>
+
+    <androidx.recyclerview.widget.RecyclerView
+        android:id="@+id/notesList"
+        app:layout_behavior="@string/appbar_scrolling_view_behavior"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"/>
+
+    <com.google.android.material.floatingactionbutton.FloatingActionButton
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="bottom|end"
+        android:layout_margin="16dp"
+        app:layout_anchorGravity="bottom|end"
+        android:src="@drawable/ic_edit" />
+
+</androidx.coordinatorlayout.widget.CoordinatorLayout>

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

@@ -16,6 +16,9 @@
         <action
             android:id="@+id/action_openAboutFragment"
             app:destination="@id/aboutFragment" />
+        <action
+            android:id="@+id/action_openNotesListFragment"
+            app:destination="@+id/notesListFragment" />
     </fragment>
     <fragment
         android:id="@+id/settingsFragment"
@@ -45,4 +48,9 @@
             android:id="@+id/action_setupFragment_to_mainFragment2"
             app:destination="@id/mainFragment" />
     </fragment>
+    <fragment
+        android:id="@+id/notesListFragment"
+        android:name="com.sduduzog.slimlauncher.ui.main.notes.NotesListFragment"
+        android:label="notes_list_fragment"
+        tools:layout="@layout/notes_list_fragment" />
 </navigation>

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

@@ -1,43 +0,0 @@
-<?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>
-        <item name="android:colorForeground">@android:color/white</item>
-    </style>
-
-    <style name="AppGreyTheme" parent="@style/AppDarkTheme">
-        <item name="colorPrimary">@color/colorBlueGrey</item>
-        <item name="colorPrimaryDark">@color/colorBlueGreyDark</item>
-        <item name="android:colorBackground">@color/colorBlueGrey</item>
-        <item name="android:statusBarColor">?attr/colorPrimaryDark</item>
-    </style>
-
-    <style name="AppPinkTheme" parent="AppDarkTheme">
-        <item name="colorPrimary">@color/colorPink</item>
-        <item name="colorPrimaryDark">@color/colorPinkDark</item>
-        <item name="android:colorBackground">@color/colorPink</item>
-        <item name="android:colorForeground">@android:color/white</item>
-        <item name="colorAccent">@color/colorAccent</item>
-        <item name="android:statusBarColor">@color/colorPinkDark</item>
-        <item name="android:textColorPrimaryInverse">@color/primaryDarkColor</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="AppDarkTheme">
-        <item name="colorPrimary">@color/colorTeal</item>
-        <item name="colorPrimaryDark">@color/colorTealDark</item>
-        <item name="android:colorBackground">@color/colorTeal</item>
-        <item name="android:colorForeground">@android:color/white</item>
-        <item name="android:statusBarColor">@color/colorTealDark</item>
-    </style>
-</resources>

+ 0 - 6
app/src/main/res/values-w820dp/dimens.xml

@@ -1,6 +0,0 @@
-<resources>
-    <!-- Example customization of dimensions originally defined in res/values/dimens.xml
-         (such as screen margins) for screens with more than 820dp of available width. This
-         would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
-    <!--<dimen name="activity_horizontal_margin">64dp</dimen>-->
-</resources>

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

@@ -1,17 +1,23 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-    <color name="colorAccent">#795548</color>
+    <color name="colorAccent">#37474F</color>
 
     <color name="primaryColor">#212121</color>
     <color name="primaryDarkColor">#000000</color>
 
-    <color name="colorBlueGrey">#607d8b</color>
-    <color name="colorBlueGreyDark">#455a64</color>
+    <color name="colorBlueGrey">#37474F</color>
+    <color name="colorBlueGreyDark">#263238</color>
 
-    <color name="colorPink">#F06292</color>
-    <color name="colorPinkDark">#E91E63</color>
+    <color name="colorPink">#FCE4EC</color>
+    <color name="colorPinkDark">#F8BBD0</color>
 
-    <color name="colorTeal">#009688</color>
-    <color name="colorTealDark">#00796b</color>
+    <color name="colorTeal">#E0F2F1</color>
+    <color name="colorTealDark">#B2DFDB</color>
+
+    <color name="inverseTextColor">#E0E0E0</color>
+    <color name="inverseAccentColor">#607d8b</color>
+
+    <color name="colorCandy">#f06292</color>
+    <color name="colorCandyDark">#e91e63</color>
 
 </resources>

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

@@ -5,4 +5,8 @@
     <!-- Default screen margins, per the Android Design guidelines. -->
     <!--<dimen name="activity_horizontal_margin">16dp</dimen>-->
     <!--<dimen name="activity_vertical_margin">16dp</dimen>-->
+
+    <!-- Default screen margins, per the Android Design guidelines. -->
+    <dimen name="activity_horizontal_margin">16dp</dimen>
+    <dimen name="activity_vertical_margin">16dp</dimen>
 </resources>

+ 9 - 7
app/src/main/res/values/strings.xml

@@ -9,6 +9,7 @@
         <item>Jupiter</item>
         <item>Teal</item>
         <item>Candy</item>
+        <item>Pastel</item>
     </string-array>
 
     <string-array name="clock_types">
@@ -18,21 +19,27 @@
 
     <string name="prefs_settings">settings</string>
     <string name="prefs_settings_key_theme">key_theme</string>
+
+    <!--main package strings-->
     <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">Settings</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="hello_blank_fragment">Hello blank fragment</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_item_button_remove">remove</string>-->
     <string name="settings_title">Preferences</string>
 
     <string name="settings_list_item_button_set_app">Set app</string>
@@ -89,10 +96,5 @@
 
     <string name="no_app_selected_toast_msg">Choose at least one app</string>
     <string name="choose_apps_title">Choose Apps</string>
-    <!--<string name="action_settings">Settings</string>-->
-    <!--<string name="section_format">Hello World from section: %1$d</string>-->
-
-    <!-- TODO: Remove or change this placeholder text -->
-    <!--<string name="hello_blank_fragment">Hello blank fragment</string>-->
 
 </resources>

+ 22 - 11
app/src/main/res/values/styles.xml

@@ -1,8 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
 <resources>
 
     <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="AppDarkTheme" parent="@style/Theme.AppCompat.NoActionBar">
@@ -10,28 +12,37 @@
         <item name="colorPrimary">@color/primaryColor</item>
         <item name="colorPrimaryDark">@color/primaryDarkColor</item>
         <item name="android:colorBackground">@color/primaryDarkColor</item>
-        <item name="android:colorForeground">@android:color/white</item>
+        <item name="android:statusBarColor">?android:attr/colorPrimaryDark</item>
+        <item name="android:colorForeground">@color/inverseTextColor</item>
     </style>
 
     <style name="AppGreyTheme" parent="@style/AppDarkTheme">
         <item name="colorPrimary">@color/colorBlueGrey</item>
         <item name="colorPrimaryDark">@color/colorBlueGreyDark</item>
         <item name="android:colorBackground">@color/colorBlueGrey</item>
+        <item name="android:statusBarColor">?attr/colorPrimaryDark</item>
+        <item name="cardBackgroundColor">@color/colorBlueGreyDark</item>
+        <item name="colorAccent">@color/inverseAccentColor</item>
     </style>
 
-    <style name="AppTealTheme" parent="AppDarkTheme">
-        <item name="colorPrimary">@color/colorTeal</item>
-        <item name="colorPrimaryDark">@color/colorTealDark</item>
-        <item name="android:colorBackground">@color/colorTeal</item>
-        <item name="android:colorForeground">@android:color/white</item>
+    <style name="AppCandyTheme" parent="AppDarkTheme">
+        <item name="colorPrimary">@color/colorCandy</item>
+        <item name="colorPrimaryDark">@color/colorCandyDark</item>
+        <item name="android:colorBackground">@color/colorCandy</item>
+        <item name="android:statusBarColor">@color/colorCandyDark</item>
     </style>
 
-    <style name="AppPinkTheme" parent="AppDarkTheme">
+    <style name="AppPinkTheme" parent="AppTheme">
         <item name="colorPrimary">@color/colorPink</item>
         <item name="colorPrimaryDark">@color/colorPinkDark</item>
         <item name="android:colorBackground">@color/colorPink</item>
-        <item name="android:colorForeground">@android:color/white</item>
-        <item name="colorAccent">@color/colorAccent</item>
-        <item name="android:textColorPrimaryInverse">@color/primaryDarkColor</item>
+        <item name="android:statusBarColor">@color/colorPinkDark</item>
+    </style>
+
+    <style name="AppTealTheme" parent="AppTheme">
+        <item name="colorPrimary">@color/colorTeal</item>
+        <item name="colorPrimaryDark">@color/colorTealDark</item>
+        <item name="android:colorBackground">@color/colorTeal</item>
+        <item name="android:statusBarColor">@color/colorTealDark</item>
     </style>
-</resources>
+</resources>