Bläddra i källkod

chore: removed notes and tasks from the app

beautusg 7 år sedan
förälder
incheckning
715c9d563b
34 ändrade filer med 215 tillägg och 1843 borttagningar
  1. 5 5
      app/build.gradle
  2. 0 49
      app/src/androidTest/java/com/sduduzog/slimlauncher/DBTest.kt
  3. 0 17
      app/src/main/java/com/sduduzog/slimlauncher/MainActivity.kt
  4. 0 72
      app/src/main/java/com/sduduzog/slimlauncher/adapters/NotesAdapter.kt
  5. 0 55
      app/src/main/java/com/sduduzog/slimlauncher/adapters/TasksAdapter.kt
  6. 0 27
      app/src/main/java/com/sduduzog/slimlauncher/data/BaseDao.kt
  7. 9 4
      app/src/main/java/com/sduduzog/slimlauncher/data/BaseDatabase.kt
  8. 0 36
      app/src/main/java/com/sduduzog/slimlauncher/data/MainViewModel.kt
  9. 1 84
      app/src/main/java/com/sduduzog/slimlauncher/data/Repository.kt
  10. 0 29
      app/src/main/java/com/sduduzog/slimlauncher/data/model/Note.kt
  11. 0 19
      app/src/main/java/com/sduduzog/slimlauncher/data/model/Task.kt
  12. 0 57
      app/src/main/java/com/sduduzog/slimlauncher/dialogs/RenameNoteDialog.kt
  13. 0 2
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/HomeFragment.kt
  14. 0 61
      app/src/main/java/com/sduduzog/slimlauncher/ui/main/TasksFragment.kt
  15. 0 98
      app/src/main/java/com/sduduzog/slimlauncher/ui/notes/EditNoteFragment.kt
  16. 0 54
      app/src/main/java/com/sduduzog/slimlauncher/ui/notes/NoteFragment.kt
  17. 0 191
      app/src/main/java/com/sduduzog/slimlauncher/ui/notes/NotesFragment.kt
  18. 0 174
      app/src/main/java/com/sduduzog/slimlauncher/ui/notes/VoiceNoteFragment.kt
  19. 0 8
      app/src/main/java/com/sduduzog/slimlauncher/utils/OnShitDoneToNotesListener.kt
  20. 0 90
      app/src/main/java/com/sduduzog/slimlauncher/utils/VoiceRecorder.kt
  21. 0 59
      app/src/main/res/layout/edit_note_fragment.xml
  22. 0 10
      app/src/main/res/layout/home_fragment.xml
  23. 0 146
      app/src/main/res/layout/home_motion_end.xml
  24. 0 146
      app/src/main/res/layout/home_motion_start.xml
  25. 0 54
      app/src/main/res/layout/note_fragment.xml
  26. 0 63
      app/src/main/res/layout/notes_fragment.xml
  27. 0 24
      app/src/main/res/layout/notes_fragment_list_item.xml
  28. 0 62
      app/src/main/res/layout/tasks_fragment.xml
  29. 0 8
      app/src/main/res/layout/tasks_fragment_list_item.xml
  30. 0 84
      app/src/main/res/layout/voice_note_fragment.xml
  31. 0 50
      app/src/main/res/navigation/nav_graph.xml
  32. 198 4
      app/src/main/res/xml/home_motion_scene.xml
  33. 2 1
      docs/index.html
  34. BIN
      docs/main.css

+ 5 - 5
app/build.gradle

@@ -40,14 +40,14 @@ dependencies {
     // Support Libraries
     implementation 'androidx.appcompat:appcompat:1.0.2'
     implementation 'androidx.recyclerview:recyclerview:1.0.0'
-    implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha4'
+    implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha5'
 
     // Arch Components
-    implementation 'androidx.core:core-ktx:1.1.0-alpha05'
+    implementation 'androidx.core:core-ktx:1.1.0-beta01'
     implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
     implementation 'android.arch.navigation:navigation-fragment:1.0.0'
-    implementation 'androidx.room:room-runtime:2.1.0-alpha06'
-    kapt "androidx.room:room-compiler:2.1.0-alpha06"
+    implementation 'androidx.room:room-runtime:2.1.0-beta01'
+    kapt "androidx.room:room-compiler:2.1.0-beta01"
     kapt "androidx.lifecycle:lifecycle-compiler:2.0.0"
 
     //3rd party libs
@@ -57,7 +57,7 @@ dependencies {
     // Test libs
     testImplementation 'junit:junit:4.12'
     testImplementation 'org.mockito:mockito-core:2.19.0'
-    androidTestImplementation 'androidx.room:room-testing:2.1.0-alpha06'
+    androidTestImplementation 'androidx.room:room-testing:2.1.0-beta01'
     androidTestImplementation 'androidx.test:runner:1.1.1'
     androidTestImplementation 'androidx.test:rules:1.1.1'
     androidTestImplementation 'androidx.annotation:annotation:1.0.2'

+ 0 - 49
app/src/androidTest/java/com/sduduzog/slimlauncher/DBTest.kt

@@ -8,8 +8,6 @@ import androidx.test.platform.app.InstrumentationRegistry
 import com.sduduzog.slimlauncher.data.BaseDao
 import com.sduduzog.slimlauncher.data.BaseDatabase
 import com.sduduzog.slimlauncher.data.model.HomeApp
-import com.sduduzog.slimlauncher.data.model.Note
-import com.sduduzog.slimlauncher.data.model.Task
 import org.hamcrest.CoreMatchers.equalTo
 import org.junit.After
 import org.junit.Assert.assertThat
@@ -17,7 +15,6 @@ import org.junit.Before
 import org.junit.Rule
 import org.junit.Test
 import org.junit.runner.RunWith
-import java.util.*
 import java.util.concurrent.CountDownLatch
 import java.util.concurrent.TimeUnit
 
@@ -64,50 +61,4 @@ class DBTest {
         appsLiveData.removeObserver(observer)
         assertThat(appsInstalled.size, equalTo(1))
     }
-
-    @Test
-    @Throws(InterruptedException::class)
-    fun testInsertLiveDataNotes() {
-        val note = Note("TestNote", Date().time)
-        baseDao!!.add(note)
-
-        var notes: List<Note> = listOf()
-
-        val latch = CountDownLatch(1)
-
-        val notesLiveData = baseDao!!.notes
-
-        val observer = Observer<List<Note>> {
-            notes = it
-            latch.countDown()
-        }
-
-        notesLiveData.observeForever(observer)
-        latch.await(2, TimeUnit.SECONDS)
-        notesLiveData.removeObserver(observer)
-        assertThat(notes.size, equalTo(1))
-    }
-
-    @Test
-    @Throws(InterruptedException::class)
-    fun testInsertLiveDataTasks() {
-        val task = Task("TestTask", false, 0)
-        baseDao!!.add(task)
-
-        var tasks: List<Task> = listOf()
-
-        val latch = CountDownLatch(1)
-
-        val tasksLiveData = baseDao!!.tasks
-
-        val observer = Observer<List<Task>> {
-            tasks = it
-            latch.countDown()
-        }
-
-        tasksLiveData.observeForever(observer)
-        latch.await(2, TimeUnit.SECONDS)
-        tasksLiveData.removeObserver(observer)
-        assertThat(tasks.size, equalTo(1))
-    }
 }

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

@@ -1,7 +1,6 @@
 package com.sduduzog.slimlauncher
 
 import android.content.SharedPreferences
-import android.content.pm.PackageManager
 import android.content.res.Resources
 import android.os.Bundle
 import android.view.View
@@ -10,9 +9,6 @@ import androidx.navigation.NavController
 import androidx.navigation.Navigation.findNavController
 import com.sduduzog.slimlauncher.utils.BaseFragment
 import com.sduduzog.slimlauncher.utils.HomeWatcher
-import com.sduduzog.slimlauncher.utils.Permissions
-import com.sduduzog.slimlauncher.utils.VoiceRecorder
-import java.io.File
 
 
 class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceChangeListener, HomeWatcher.OnHomePressedListener {
@@ -97,19 +93,6 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
         navigator.popBackStack(R.id.homeFragment, false)
     }
 
-    override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) {
-        when (requestCode) {
-            Permissions.RECORD_AUDIO -> {
-                if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
-                    val file = File(filesDir, getString(R.string.audio_file_path))
-                    val dir = file.canonicalPath
-                    VoiceRecorder.getInstance().startRecording(dir)
-                }
-                return
-            }
-        }
-    }
-
     private fun showSystemUI() {
         window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_LAYOUT_STABLE)
     }

+ 0 - 72
app/src/main/java/com/sduduzog/slimlauncher/adapters/NotesAdapter.kt

@@ -1,72 +0,0 @@
-package com.sduduzog.slimlauncher.adapters
-
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.TextView
-import androidx.recyclerview.widget.RecyclerView
-import com.sduduzog.slimlauncher.R
-import com.sduduzog.slimlauncher.data.model.Note
-import com.sduduzog.slimlauncher.utils.OnItemActionListener
-import com.sduduzog.slimlauncher.utils.OnShitDoneToNotesListener
-
-class NotesAdapter(private val listener: OnShitDoneToNotesListener) : RecyclerView.Adapter<NotesAdapter.ViewHolder>() , OnItemActionListener{
-
-    private val notes: MutableList<Note> = mutableListOf()
-    private var indexOfRemovedNote = 0
-
-    override fun getItemCount(): Int = notes.size
-
-    override fun onBindViewHolder(holder: ViewHolder, position: Int) {
-        val note = notes[position]
-        if (note.title.isNullOrEmpty()){
-            holder.itemTitle.visibility = View.GONE
-        } else {
-            holder.itemTitle.text = note.title
-            holder.itemTitle.visibility = View.VISIBLE
-        }
-        holder.itemSnippet.text = note.body
-        holder.itemView.setOnClickListener { listener.onView(note) }
-    }
-
-    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
-        val view = LayoutInflater.from(parent.context).inflate(R.layout.notes_fragment_list_item, parent, false)
-        return ViewHolder(view)
-    }
-
-    fun setItems(list: List<Note>) {
-        val size = notes.size
-        notes.clear()
-        notes.addAll(list)
-        if (size > list.size) {
-            notifyItemRemoved(indexOfRemovedNote)
-        } else notifyDataSetChanged()
-    }
-
-    override fun onViewIdle() {
-        // do nothing
-    }
-
-    override fun onViewMoved(oldPosition: Int, newPosition: Int): Boolean {
-        // do nothing
-        return false
-    }
-
-    override fun onViewSwiped(position: Int) {
-        indexOfRemovedNote = position
-        if (position < notes.size) {
-            val note = notes[position]
-            listener.onDelete(note)
-        } else
-            notifyDataSetChanged()
-    }
-
-    inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
-        val itemTitle: TextView = itemView.findViewById(R.id.notes_fragment_list_item_title)
-        val itemSnippet: TextView = itemView.findViewById(R.id.notes_fragment_list_item_snippet)
-
-        override fun toString(): String {
-            return super.toString() + " '${itemTitle.text}'"
-        }
-    }
-}

+ 0 - 55
app/src/main/java/com/sduduzog/slimlauncher/adapters/TasksAdapter.kt

@@ -1,55 +0,0 @@
-package com.sduduzog.slimlauncher.adapters
-
-import android.content.Context
-import android.text.Spanned
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.widget.CheckBox
-import androidx.core.text.HtmlCompat
-import androidx.core.text.HtmlCompat.FROM_HTML_MODE_LEGACY
-import androidx.recyclerview.widget.RecyclerView
-import com.sduduzog.slimlauncher.R
-import com.sduduzog.slimlauncher.data.MainViewModel
-import com.sduduzog.slimlauncher.data.model.Task
-
-class TasksAdapter(private val context: Context, private val viewModel: MainViewModel) : RecyclerView.Adapter<TasksAdapter.ViewHolder>() {
-
-    private var tasks: List<Task> = listOf()
-
-    override fun getItemCount(): Int = tasks.size
-
-    override fun onBindViewHolder(holder: ViewHolder, position: Int) {
-        val task = tasks[position]
-        if (task.isCompleted) {
-            holder.checkBox.isChecked = true
-            val text = context.getString(R.string.tasks_fragment_list_item_complete, task.body)
-            val styledText: Spanned = HtmlCompat.fromHtml(text, FROM_HTML_MODE_LEGACY)
-            holder.checkBox.text = styledText
-        } else {
-            holder.checkBox.isChecked = false
-            holder.checkBox.text = task.body
-        }
-        holder.checkBox.setOnClickListener {
-            task.isCompleted = !task.isCompleted
-            viewModel.update(task)
-        }
-    }
-
-    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
-        val view = LayoutInflater.from(parent.context).inflate(R.layout.tasks_fragment_list_item, parent, false)
-        return ViewHolder(view)
-    }
-
-    fun setItems(list: List<Task>) {
-        this.tasks = list
-        notifyDataSetChanged()
-    }
-
-    inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
-        val checkBox: CheckBox = itemView.findViewById(R.id.tasks_fragment_list_item)
-        override fun toString(): String {
-            return super.toString() + " '${checkBox.text}'"
-        }
-    }
-}

+ 0 - 27
app/src/main/java/com/sduduzog/slimlauncher/data/BaseDao.kt

@@ -3,8 +3,6 @@ package com.sduduzog.slimlauncher.data
 import androidx.lifecycle.LiveData
 import androidx.room.*
 import com.sduduzog.slimlauncher.data.model.HomeApp
-import com.sduduzog.slimlauncher.data.model.Note
-import com.sduduzog.slimlauncher.data.model.Task
 
 @Dao
 interface BaseDao {
@@ -12,37 +10,12 @@ interface BaseDao {
     @get:Query("SELECT * FROM home_apps ORDER BY sorting_index ASC")
     val apps: LiveData<List<HomeApp>>
 
-    @get:Query("SELECT * FROM `notes` ORDER BY `id` DESC")
-    val notes: LiveData<List<Note>>
-
-    @get:Query("SELECT * FROM `tasks` ORDER BY `sorting_index` DESC")
-    val tasks: LiveData<List<Task>>
-
     @Insert(onConflict = OnConflictStrategy.REPLACE)
     fun add(app: HomeApp)
 
-    @Insert(onConflict = OnConflictStrategy.REPLACE)
-    fun add(note: Note)
-
-    @Insert(onConflict = OnConflictStrategy.REPLACE)
-    fun add(task: Task)
-
     @Update(onConflict = OnConflictStrategy.REPLACE)
     fun update(vararg apps: HomeApp)
 
-    @Update(onConflict = OnConflictStrategy.REPLACE)
-    fun update(vararg note: Note)
-
-    @Update(onConflict = OnConflictStrategy.REPLACE)
-    fun update(vararg task: Task)
-
     @Delete
     fun remove(vararg app: HomeApp)
-
-    @Delete
-    fun remove(vararg note: Note)
-
-    @Delete
-    fun remove(vararg task: Task)
-
 }

+ 9 - 4
app/src/main/java/com/sduduzog/slimlauncher/data/BaseDatabase.kt

@@ -7,11 +7,9 @@ import androidx.room.RoomDatabase
 import androidx.room.migration.Migration
 import androidx.sqlite.db.SupportSQLiteDatabase
 import com.sduduzog.slimlauncher.data.model.HomeApp
-import com.sduduzog.slimlauncher.data.model.Note
-import com.sduduzog.slimlauncher.data.model.Task
 
 
-@Database(entities = [HomeApp::class, Note::class, Task::class], version = 5, exportSchema = false)
+@Database(entities = [HomeApp::class], version = 6, exportSchema = false)
 abstract class BaseDatabase : RoomDatabase() {
 
     abstract fun baseDao(): BaseDao
@@ -30,7 +28,8 @@ abstract class BaseDatabase : RoomDatabase() {
                                     MIGRATION_1_2,
                                     MIGRATION_2_3,
                                     MIGRATION_3_4,
-                                    MIGRATION_4_5
+                                    MIGRATION_4_5,
+                                    MIGRATION_5_6
                             )
                             .build()
                 }
@@ -75,5 +74,11 @@ abstract class BaseDatabase : RoomDatabase() {
                 database.execSQL("ALTER TABLE `notes` ADD COLUMN `filename` TEXT")
             }
         }
+        private val MIGRATION_5_6 = object : Migration(5, 6) {
+            override fun migrate(database: SupportSQLiteDatabase) {
+                database.execSQL("DROP TABLE IF EXISTS `notes`")
+                database.execSQL("DROP TABLE IF EXISTS `tasks`")
+            }
+        }
     }
 }

+ 0 - 36
app/src/main/java/com/sduduzog/slimlauncher/data/MainViewModel.kt

@@ -6,21 +6,15 @@ import androidx.lifecycle.LiveData
 import androidx.lifecycle.MutableLiveData
 import com.sduduzog.slimlauncher.data.model.App
 import com.sduduzog.slimlauncher.data.model.HomeApp
-import com.sduduzog.slimlauncher.data.model.Note
-import com.sduduzog.slimlauncher.data.model.Task
 
 class MainViewModel(application: Application) : AndroidViewModel(application) {
 
     private val _baseRepository = Repository(application)
 
     private var _apps: LiveData<List<HomeApp>>
-    private var _notes: LiveData<List<Note>>
-    private var _tasks: LiveData<List<Task>>
 
     init {
         _apps = _baseRepository.apps
-        _notes = _baseRepository.notes
-        _tasks = _baseRepository.tasks
     }
 
     val apps: LiveData<List<HomeApp>>
@@ -28,46 +22,16 @@ class MainViewModel(application: Application) : AndroidViewModel(application) {
 
     val installedApps = MutableLiveData<List<App>>()
 
-    val notes: LiveData<List<Note>>
-        get() = _notes
-
-    val tasks: LiveData<List<Task>>
-        get() = _tasks
-
     fun add(app: App) {
         val index = _apps.value!!.size
         _baseRepository.add(HomeApp.from(app, index))
     }
 
-    fun add(note: Note) {
-        _baseRepository.add(note)
-    }
-
-    fun add(task: Task) {
-        _baseRepository.add(task)
-    }
-
     fun update(vararg args: HomeApp) {
         _baseRepository.update(*args)
     }
 
-    fun update(vararg args: Note) {
-        _baseRepository.update(*args)
-    }
-
-    fun update(vararg args: Task) {
-        _baseRepository.update(*args)
-    }
-
     fun remove(vararg app: HomeApp) {
         _baseRepository.remove(*app)
     }
-
-    fun remove(note: Note) {
-        _baseRepository.remove(note)
-    }
-
-    fun remove(vararg args: Task) {
-        _baseRepository.remove(*args)
-    }
 }

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

@@ -4,8 +4,6 @@ import android.app.Application
 import android.os.AsyncTask
 import androidx.lifecycle.LiveData
 import com.sduduzog.slimlauncher.data.model.HomeApp
-import com.sduduzog.slimlauncher.data.model.Note
-import com.sduduzog.slimlauncher.data.model.Task
 
 class Repository(application: Application) {
 
@@ -14,55 +12,22 @@ class Repository(application: Application) {
     private val baseDao: BaseDao = database.baseDao()
 
     private val _apps = baseDao.apps
-    private val _notes = baseDao.notes
-    private val _tasks = baseDao.tasks
-
 
     val apps: LiveData<List<HomeApp>>
         get() = _apps
 
-    val notes: LiveData<List<Note>>
-        get() = _notes
-
-    val tasks: LiveData<List<Task>>
-        get() = _tasks
-
     fun add(app: HomeApp) {
         AddAppAsyncTask(baseDao).execute(app)
     }
 
-    fun add(args: Note) {
-        AddNoteAsyncTask(baseDao).execute(args)
-    }
-
-    fun add(args: Task) {
-        AddTaskAsyncTask(baseDao).execute(args)
-    }
-
     fun update(vararg list: HomeApp) {
         UpdateAppAsyncTask(baseDao).execute(*list)
     }
 
-    fun update(vararg args: Note) {
-        UpdateNotesAsyncTask(baseDao).execute(*args)
-    }
-
-    fun update(vararg args: Task) {
-        UpdateTaskAsyncTask(baseDao).execute(*args)
-    }
-
     fun remove(vararg app: HomeApp) {
         RemoveAppAsyncTask(baseDao).execute(*app)
     }
 
-    fun remove(note: Note) {
-        RemoveNoteAsyncTask(baseDao).execute(note)
-    }
-
-    fun remove(vararg args: Task) {
-        RemoveTaskAsyncTask(baseDao).execute(*args)
-    }
-
     private class AddAppAsyncTask(private val mAsyncTaskDao: BaseDao) : AsyncTask<HomeApp, Void, Void>() {
 
         override fun doInBackground(vararg params: HomeApp): Void? {
@@ -71,22 +36,6 @@ class Repository(application: Application) {
         }
     }
 
-    private class AddNoteAsyncTask(private val mAsyncTaskDao: BaseDao) : AsyncTask<Note, Void, Void>() {
-
-        override fun doInBackground(vararg params: Note): Void? {
-            mAsyncTaskDao.add(params[0])
-            return null
-        }
-    }
-
-    private class AddTaskAsyncTask(private val mAsyncTaskDao: BaseDao) : AsyncTask<Task, Void, Void>() {
-
-        override fun doInBackground(vararg params: Task): Void? {
-            mAsyncTaskDao.add(params[0])
-            return null
-        }
-    }
-
     private class UpdateAppAsyncTask(private val mAsyncTaskDao: BaseDao) : AsyncTask<HomeApp, Void, Void>() {
 
         override fun doInBackground(vararg params: HomeApp): Void? {
@@ -95,22 +44,6 @@ class Repository(application: Application) {
         }
     }
 
-    private class UpdateNotesAsyncTask(private val mAsyncTaskDao: BaseDao) : AsyncTask<Note, Void, Void>() {
-
-        override fun doInBackground(vararg params: Note): Void? {
-            mAsyncTaskDao.update(*params)
-            return null
-        }
-    }
-
-    private class UpdateTaskAsyncTask(private val mAsyncTaskDao: BaseDao) : AsyncTask<Task, Void, Void>() {
-
-        override fun doInBackground(vararg params: Task): Void? {
-            mAsyncTaskDao.update(*params)
-            return null
-        }
-    }
-
     private class RemoveAppAsyncTask(private val mAsyncTaskDao: BaseDao) : AsyncTask<HomeApp, Void, Void>() {
 
         override fun doInBackground(vararg params: HomeApp): Void? {
@@ -118,20 +51,4 @@ class Repository(application: Application) {
             return null
         }
     }
-
-    private class RemoveNoteAsyncTask(private val mAsyncTaskDao: BaseDao) : AsyncTask<Note, Void, Void>() {
-
-        override fun doInBackground(vararg params: Note): Void? {
-            mAsyncTaskDao.remove(*params)
-            return null
-        }
-    }
-
-    private class RemoveTaskAsyncTask(private val mAsyncTaskDao: BaseDao) : AsyncTask<Task, Void, Void>() {
-
-        override fun doInBackground(vararg params: Task): Void? {
-            mAsyncTaskDao.remove(*params)
-            return null
-        }
-    }
-}
+}

+ 0 - 29
app/src/main/java/com/sduduzog/slimlauncher/data/model/Note.kt

@@ -1,29 +0,0 @@
-package com.sduduzog.slimlauncher.data.model
-
-import androidx.room.ColumnInfo
-import androidx.room.Entity
-import androidx.room.PrimaryKey
-import java.io.Serializable
-
-
-@Entity(tableName = "notes")
-data class Note(
-        @field:ColumnInfo(name = "id")
-        @PrimaryKey
-        var id: Long,
-        @field:ColumnInfo(name = "body")
-        var body: String,
-        @field:ColumnInfo(name = "title")
-        var title: String? = null,
-        @field:ColumnInfo(name = "edited")
-        var edited: Long = -1L,
-        @field:ColumnInfo(name = "type")
-        var type: Int = 0,
-        @field:ColumnInfo(name = "filename")
-        var filename: String? = null
-) : Serializable {
-    companion object {
-        const val TYPE_TEXT = 0
-        const val TYPE_VOICE = 2
-    }
-}

+ 0 - 19
app/src/main/java/com/sduduzog/slimlauncher/data/model/Task.kt

@@ -1,19 +0,0 @@
-package com.sduduzog.slimlauncher.data.model
-
-import androidx.room.ColumnInfo
-import androidx.room.Entity
-import androidx.room.PrimaryKey
-
-@Entity(tableName = "tasks")
-data class Task(
-        @field:ColumnInfo(name = "body")
-        val body: String,
-        @field:ColumnInfo(name = "is_complete")
-        var isCompleted: Boolean,
-        @field:ColumnInfo(name = "sorting_index")
-        var sortingIndex: Int
-) {
-    @field:ColumnInfo(name = "id")
-    @PrimaryKey(autoGenerate = true)
-    var id: Int? = null
-}

+ 0 - 57
app/src/main/java/com/sduduzog/slimlauncher/dialogs/RenameNoteDialog.kt

@@ -1,57 +0,0 @@
-package com.sduduzog.slimlauncher.dialogs
-
-import android.app.Dialog
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.widget.EditText
-import android.widget.Toast
-import androidx.appcompat.app.AlertDialog
-import androidx.fragment.app.DialogFragment
-import com.sduduzog.slimlauncher.R
-import com.sduduzog.slimlauncher.data.MainViewModel
-import com.sduduzog.slimlauncher.data.model.Note
-import kotlinx.android.synthetic.main.voice_note_fragment.*
-
-class RenameNoteDialog : DialogFragment() {
-
-    private lateinit var note: Note
-    private lateinit var viewModel: MainViewModel
-
-    override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
-        val view = LayoutInflater.from(context).inflate(R.layout.rename_dialog_edit_text, voice_note_fragment, false)
-        val editText: EditText = view.findViewById(R.id.rename_editText)
-        editText.text.append(note.title)
-        val builder = AlertDialog.Builder(context!!)
-        builder.setTitle("Rename Audio")
-        builder.setView(view)
-        builder.setPositiveButton("DONE") { _, _ ->
-            val name = editText.text.toString()
-            updateNote(name)
-        }
-        editText.setOnEditorActionListener { v, _, _ ->
-            val title = v.text.toString()
-            updateNote(title)
-            this@RenameNoteDialog.dismiss()
-            true
-        }
-        return builder.create()
-    }
-
-    private fun updateNote(newTitle: String) {
-        if (newTitle.isNotEmpty()) {
-            note.title = newTitle
-            viewModel.update(note)
-        } else {
-            Toast.makeText(context, "Couldn't save, title shouldn't be empty", Toast.LENGTH_LONG).show()
-        }
-    }
-
-    companion object {
-        fun getInstance(note: Note, viewModel: MainViewModel): RenameNoteDialog {
-            return RenameNoteDialog().apply {
-                this.note = note
-                this.viewModel = viewModel
-            }
-        }
-    }
-}

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

@@ -55,9 +55,7 @@ class HomeFragment : BaseFragment(), OnLaunchAppListener {
         })
 
         setEventListeners()
-        home_fragment_tasks.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_homeFragment_to_tasksFragment))
         home_fragment_options.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_homeFragment_to_optionsFragment))
-        home_fragment_notes.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_homeFragment_to_notesFragment))
     }
 
     override fun onStart() {

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

@@ -1,61 +0,0 @@
-package com.sduduzog.slimlauncher.ui.main
-
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.lifecycle.Observer
-import androidx.lifecycle.ViewModelProviders
-import com.sduduzog.slimlauncher.R
-import com.sduduzog.slimlauncher.adapters.TasksAdapter
-import com.sduduzog.slimlauncher.data.MainViewModel
-import com.sduduzog.slimlauncher.data.model.Task
-import com.sduduzog.slimlauncher.utils.BaseFragment
-import kotlinx.android.synthetic.main.tasks_fragment.*
-
-class TasksFragment : BaseFragment() {
-
-    override fun getFragmentView(): ViewGroup = tasks_fragment
-
-    private lateinit var viewModel: MainViewModel
-
-    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
-        return inflater.inflate(R.layout.tasks_fragment, container, false)
-    }
-
-    override fun onActivityCreated(savedInstanceState: Bundle?) {
-        super.onActivityCreated(savedInstanceState)
-
-        activity?.let {
-            viewModel = ViewModelProviders.of(it).get(MainViewModel::class.java)
-        } ?: throw Error("Activity null, something here is fucked up")
-        val adapter = TasksAdapter(context!!, viewModel)
-        tasks_fragment_list.adapter = adapter
-        viewModel.tasks.observe(this, Observer {
-            it?.let { list ->
-                adapter.setItems(list)
-            }
-        })
-
-        tasks_fragment_input.setOnEditorActionListener { v, _, _ ->
-            val body = v.text.toString()
-            val task = Task(body, false, viewModel.tasks.value.orEmpty().size)
-            if (body.isNotBlank()) viewModel.add(task)
-            v.text = ""
-            true
-        }
-        tasks_fragment_clear.setOnClickListener {
-            val tasks = viewModel.tasks.value.orEmpty().filter { it.isCompleted }
-            viewModel.remove(*tasks.toTypedArray())
-        }
-
-        tasks_fragment_sort.setOnClickListener {
-            val tasks = viewModel.tasks.value.orEmpty().sortedBy { it.sortingIndex }
-            var count = 0
-            tasks.filter { it.isCompleted }.forEach { it.sortingIndex = count++ }
-            tasks.filter { !it.isCompleted }.forEach { it.sortingIndex = count++ }
-            viewModel.update(*tasks.toTypedArray())
-        }
-
-    }
-}

+ 0 - 98
app/src/main/java/com/sduduzog/slimlauncher/ui/notes/EditNoteFragment.kt

@@ -1,98 +0,0 @@
-package com.sduduzog.slimlauncher.ui.notes
-
-import android.content.Context
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import android.view.inputmethod.InputMethodManager
-import androidx.lifecycle.ViewModelProviders
-import androidx.navigation.Navigation
-import com.sduduzog.slimlauncher.R
-import com.sduduzog.slimlauncher.data.MainViewModel
-import com.sduduzog.slimlauncher.data.model.Note
-import com.sduduzog.slimlauncher.utils.BaseFragment
-import kotlinx.android.synthetic.main.edit_note_fragment.*
-import java.security.MessageDigest
-import java.util.*
-
-class EditNoteFragment : BaseFragment() {
-
-    override fun getFragmentView(): ViewGroup = edit_note_fragment
-    private lateinit var note: Note
-    private lateinit var viewModel: MainViewModel
-    private lateinit var initialDigest: String
-    override fun onCreate(savedInstanceState: Bundle?) {
-        super.onCreate(savedInstanceState)
-        arguments.let {
-            note = if (it != null && it.containsKey(getString(R.string.nav_key_note))) {
-                it.get(getString(R.string.nav_key_note)) as Note
-            } else {
-                Note(-1L, "")
-            }
-        }
-        initialDigest = hash(note.title + note.body)
-        activity?.let {
-            viewModel = ViewModelProviders.of(it).get(MainViewModel::class.java)
-        } ?: throw Error("Activity null, something here is fucked up")
-    }
-
-    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
-        return inflater.inflate(R.layout.edit_note_fragment, container, false)
-    }
-
-    override fun onActivityCreated(savedInstanceState: Bundle?) {
-        super.onActivityCreated(savedInstanceState)
-
-        if (note.edited == -1L) {
-            // Wait
-        } else {
-            edit_note_fragment_title.setText(note.title.orEmpty())
-            edit_note_fragment_body.setText(note.body)
-        }
-
-        if (edit_note_fragment_body.requestFocus()) {
-            val imm = activity!!.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
-            imm.showSoftInput(edit_note_fragment_title, InputMethodManager.SHOW_IMPLICIT)
-        }
-        edit_note_fragment_save.setOnClickListener {
-            save()?.let {
-                val bundle = Bundle()
-                bundle.putSerializable(getString(R.string.nav_key_note), it)
-                Navigation.findNavController(edit_note_fragment).navigate(R.id.action_editNoteFragment_to_noteFragment, bundle)
-            }
-        }
-        if (edit_note_fragment_body.requestFocus()) {
-            val imm = activity!!.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
-            imm.showSoftInput(edit_note_fragment_body, InputMethodManager.SHOW_IMPLICIT)
-        }
-    }
-
-    private fun hash(input: String): String {
-        val bytes = input.toByteArray(charset("UTF-8"))
-        val md = MessageDigest.getInstance("MD5")
-        md.update(bytes)
-        return String(md.digest())
-    }
-
-    private fun save(): Long? {
-        val body = edit_note_fragment_body.text.toString()
-        if (body.isEmpty()) return null
-        val title = edit_note_fragment_title.text.toString()
-        val timestamp = Date().time
-        if (note.id == -1L) {
-            val newNote = Note(timestamp, body, edited = timestamp)
-            newNote.title = title.trim()
-            newNote.body = body.trim()
-            viewModel.add(newNote)
-            return newNote.id
-        }
-        val currentDigest = hash(title + body)
-        if (initialDigest == currentDigest) return null
-        note.title = title.trim()
-        note.body = body.trim()
-        note.edited = timestamp
-        viewModel.update(note)
-        return note.id
-    }
-}

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

@@ -1,54 +0,0 @@
-package com.sduduzog.slimlauncher.ui.notes
-
-
-import android.os.Bundle
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.lifecycle.Observer
-import androidx.lifecycle.ViewModelProviders
-import androidx.navigation.Navigation
-import com.sduduzog.slimlauncher.R
-import com.sduduzog.slimlauncher.data.MainViewModel
-import com.sduduzog.slimlauncher.data.model.Note
-import com.sduduzog.slimlauncher.utils.BaseFragment
-import kotlinx.android.synthetic.main.note_fragment.*
-
-
-class NoteFragment : BaseFragment() {
-
-    override fun getFragmentView(): ViewGroup = note_fragment
-    private lateinit var viewModel: MainViewModel
-
-    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
-                              savedInstanceState: Bundle?): View? {
-        return inflater.inflate(R.layout.note_fragment, container, false)
-    }
-
-    override fun onActivityCreated(savedInstanceState: Bundle?) {
-        super.onActivityCreated(savedInstanceState)
-
-        activity?.let {
-            viewModel = ViewModelProviders.of(it).get(MainViewModel::class.java)
-        } ?: throw Error("This is just dumb")
-        var id = 0L
-        arguments.let {
-            id = if (it != null && it.containsKey(getString(R.string.nav_key_note))) {
-                it.getLong(getString(R.string.nav_key_note))
-            } else throw Exception("How did we get here??")
-        }
-        viewModel.notes.observe(this, Observer {
-            it?.let { notes ->
-                notes.firstOrNull { n -> n.id == id }?.let { note -> loadNote(note) }
-            }
-        })
-    }
-
-    private fun loadNote(note: Note) {
-        note.title?.let { title -> if (title.isNotBlank()) note_fragment_title.text = title }
-        note_fragment_body.text = note.body
-        val bundle = Bundle()
-        bundle.putSerializable(getString(R.string.nav_key_note), note)
-        note_fragment_edit.setOnClickListener(Navigation.createNavigateOnClickListener(R.id.action_noteFragment_to_editNoteFragment, bundle))
-    }
-}

+ 0 - 191
app/src/main/java/com/sduduzog/slimlauncher/ui/notes/NotesFragment.kt

@@ -1,191 +0,0 @@
-package com.sduduzog.slimlauncher.ui.notes
-
-import android.Manifest
-import android.content.pm.PackageManager
-import android.os.Bundle
-import android.os.Handler
-import android.os.SystemClock
-import android.text.format.DateUtils
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.core.app.ActivityCompat
-import androidx.core.content.ContextCompat
-import androidx.lifecycle.Observer
-import androidx.lifecycle.ViewModelProviders
-import androidx.navigation.Navigation
-import androidx.recyclerview.widget.ItemTouchHelper
-import androidx.recyclerview.widget.RecyclerView
-import com.sduduzog.slimlauncher.R
-import com.sduduzog.slimlauncher.adapters.NotesAdapter
-import com.sduduzog.slimlauncher.data.MainViewModel
-import com.sduduzog.slimlauncher.data.model.Note
-import com.sduduzog.slimlauncher.utils.*
-import kotlinx.android.synthetic.main.notes_fragment.*
-import java.io.File
-
-
-class NotesFragment : BaseFragment(), OnShitDoneToNotesListener {
-
-    override fun getFragmentView(): ViewGroup = notes_fragment
-
-    private lateinit var viewModel: MainViewModel
-    private val voiceRecorder = VoiceRecorder.getInstance()
-    private val customHandler = Handler()
-    private var timeInMilliseconds = 0L
-    private var startTime = 0L
-    private var updateTime = 0L
-    private val updateTimerThread = object : Runnable {
-        override fun run() {
-            timeInMilliseconds = SystemClock.uptimeMillis()
-            updateTime = timeInMilliseconds - startTime
-            val time = DateUtils.formatElapsedTime(updateTime / 1000)
-            notes_fragment_create_note.text = getString(R.string.notes_fragment_stop)
-            notes_fragment_counter.text = getString(R.string.notes_fragment_counter, time)
-            customHandler.postDelayed(this, 100)
-        }
-    }
-
-    private var isDeletePending = false
-    private var noteToDelete: Note? = null
-
-    private val deleteNoteThread = Runnable {
-        if (isDeletePending) {
-            noteToDelete?.let {
-                deleteNote(it)
-            }
-        }
-        notes_fragment_create_note.text = getString(R.string.notes_fragment_create_new_note)
-        isDeletePending = false
-    }
-
-    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
-        return inflater.inflate(R.layout.notes_fragment, container, false)
-    }
-
-    override fun onActivityCreated(savedInstanceState: Bundle?) {
-        super.onActivityCreated(savedInstanceState)
-        val adapter = NotesAdapter(this)
-        activity?.let {
-            viewModel = ViewModelProviders.of(it).get(MainViewModel::class.java)
-        } ?: throw Error("Activity null, something here is fucked up")
-        viewModel.notes.observe(this, Observer {
-            it?.let { list ->
-                adapter.setItems(list)
-            }
-        })
-        notes_fragment_list.adapter = adapter
-        val listener: OnItemActionListener = adapter
-        val simpleItemTouchCallback = object : ItemTouchHelper.Callback() {
-            override fun getMovementFlags(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder): Int {
-                val swipeFlags = ItemTouchHelper.LEFT or ItemTouchHelper.RIGHT
-                return makeMovementFlags(0, swipeFlags)
-            }
-
-            override fun onMove(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, target: RecyclerView.ViewHolder): Boolean {
-                // Do nothing
-                return true
-            }
-
-            override fun onSwiped(viewHolder: RecyclerView.ViewHolder, direction: Int) {
-                listener.onViewSwiped(viewHolder.adapterPosition)
-            }
-        }
-        val itemTouchHelper = ItemTouchHelper(simpleItemTouchCallback)
-        itemTouchHelper.attachToRecyclerView(notes_fragment_list)
-        notes_fragment_create_note.setOnClickListener {
-            when {
-                isDeletePending -> {
-                    isDeletePending = false
-                    adapter.notifyDataSetChanged()
-                    notes_fragment_create_note.text = getString(R.string.notes_fragment_create_new_note)
-                }
-                voiceRecorder.state == VoiceRecorder.RECORDING -> try {
-                    voiceRecorder.stopRecording()
-                    voiceRecorder.save(viewModel)
-                } catch (e: RuntimeException) {
-                    // I pray this doesn't happen
-                }
-                else -> Navigation.findNavController(notes_fragment)
-                        .navigate(R.id.action_notesFragment_to_editNoteFragment)
-            }
-        }
-        notes_fragment_create_note.setOnLongClickListener {
-            val permissionCheck = ContextCompat.checkSelfPermission(activity!!,
-                    Manifest.permission.RECORD_AUDIO)
-            val isPermissionGranted = permissionCheck == PackageManager.PERMISSION_GRANTED
-            val file = File(context!!.filesDir, getString(R.string.audio_file_path))
-            val dir = file.canonicalPath
-            if (isPermissionGranted) voiceRecorder.startRecording(dir)
-            else ActivityCompat.requestPermissions(activity!!,
-                    arrayOf(Manifest.permission.RECORD_AUDIO),
-                    Permissions.RECORD_AUDIO)
-            true
-        }
-        voiceRecorder.stateLiveData.observe(this, Observer {
-            it?.let { state ->
-                when (state) {
-                    VoiceRecorder.RECORDING -> startTimer()
-                    VoiceRecorder.IDLE -> {
-                        notes_fragment_create_note.text = getString(R.string.notes_fragment_create_new_note)
-                        stopTimer()
-                    }
-                    VoiceRecorder.ERROR -> stopTimer()
-                }
-            }
-        })
-    }
-
-    private fun startTimer() {
-        startTime = SystemClock.uptimeMillis()
-        customHandler.postDelayed(updateTimerThread, 0)
-        notes_fragment_counter.visibility = View.VISIBLE
-    }
-
-    private fun stopTimer() {
-        customHandler.removeCallbacks(updateTimerThread)
-        notes_fragment_counter.visibility = View.GONE
-    }
-
-    private fun deleteNote(note: Note) {
-        if (note.type == Note.TYPE_VOICE) context?.deleteFile(note.filename)
-        viewModel.remove(note)
-    }
-
-    override fun onStart() {
-        super.onStart()
-        voiceRecorder.onStart()
-    }
-
-    override fun onStop() {
-        super.onStop()
-        voiceRecorder.onStop()
-        customHandler.removeCallbacks(updateTimerThread)
-    }
-
-    override fun onView(note: Note) {
-        if (voiceRecorder.state == VoiceRecorder.RECORDING) return
-        val bundle = Bundle()
-        bundle.putLong(getString(R.string.nav_key_note), note.id)
-        if (note.type == Note.TYPE_TEXT)
-            Navigation.findNavController(notes_fragment)
-                    .navigate(R.id.action_notesFragment_to_noteFragment, bundle)
-        else
-            Navigation.findNavController(notes_fragment)
-                    .navigate(R.id.action_notesFragment_to_voiceNoteFragment, bundle)
-    }
-
-    override fun onDelete(note: Note) {
-        notes_fragment_create_note.text = getString(R.string.notes_fragment_undo)
-        if (isDeletePending) {
-            customHandler.removeCallbacks(deleteNoteThread)
-            noteToDelete?.let {
-                deleteNote(it)
-            }
-        }
-
-        noteToDelete = note.copy()
-        isDeletePending = true
-        customHandler.postDelayed(deleteNoteThread, 2000)
-    }
-}

+ 0 - 174
app/src/main/java/com/sduduzog/slimlauncher/ui/notes/VoiceNoteFragment.kt

@@ -1,174 +0,0 @@
-package com.sduduzog.slimlauncher.ui.notes
-
-import android.content.Intent
-import android.media.MediaPlayer
-import android.os.Bundle
-import android.os.Handler
-import android.os.SystemClock
-import android.text.format.DateUtils
-import android.util.Log
-import android.view.LayoutInflater
-import android.view.View
-import android.view.ViewGroup
-import androidx.appcompat.widget.PopupMenu
-import androidx.core.content.FileProvider
-import androidx.lifecycle.Observer
-import androidx.lifecycle.ViewModelProviders
-import androidx.navigation.Navigation
-import com.sduduzog.slimlauncher.R
-import com.sduduzog.slimlauncher.data.MainViewModel
-import com.sduduzog.slimlauncher.data.model.Note
-import com.sduduzog.slimlauncher.dialogs.RenameNoteDialog
-import com.sduduzog.slimlauncher.utils.BaseFragment
-import kotlinx.android.synthetic.main.voice_note_fragment.*
-import java.io.File
-
-
-class VoiceNoteFragment : BaseFragment() {
-
-    override fun getFragmentView(): ViewGroup = voice_note_fragment
-
-    private lateinit var viewModel: MainViewModel
-    private var mediaPlayer: MediaPlayer? = null
-    private val customHandler = Handler()
-    private var timeInMilliseconds = 0L
-    private var startTime = 0L
-    private var updateTime = 0L
-    private var pauseTime = 0L
-    private val updateTimerThread = object : Runnable {
-        override fun run() {
-            try {
-                timeInMilliseconds = SystemClock.uptimeMillis()
-                updateTime = (timeInMilliseconds + pauseTime) - startTime
-                val time = DateUtils.formatElapsedTime(updateTime / 1000)
-                voice_note_fragment_counter.text = getString(R.string.notes_fragment_counter, time)
-                customHandler.postDelayed(this, 10)
-            } finally {
-                // Do something
-            }
-        }
-    }
-
-    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
-        return inflater.inflate(R.layout.voice_note_fragment, container, false)
-    }
-
-    override fun onActivityCreated(savedInstanceState: Bundle?) {
-        super.onActivityCreated(savedInstanceState)
-
-        activity?.let {
-            viewModel = ViewModelProviders.of(it).get(MainViewModel::class.java)
-        } ?: throw Error("This is just dumb")
-        var id = 0L
-        arguments.let {
-            id = if (it != null && it.containsKey(getString(R.string.nav_key_note))) {
-                it.getLong(getString(R.string.nav_key_note))
-            } else throw Exception("How did we get here??")
-        }
-        viewModel.notes.observe(this, Observer {
-            it?.let { notes ->
-                notes.firstOrNull { n -> n.id == id }?.let { note -> loadNote(note) }
-            }
-        })
-        voice_note_fragment_play.setOnClickListener {
-            if (mediaPlayer!!.isPlaying) {
-                mediaPlayer?.pause()
-                pauseTimer()
-                voice_note_fragment_play.text = getString(R.string.voice_note_fragment_play)
-            } else {
-                mediaPlayer?.start()
-                startTimer()
-                voice_note_fragment_play.text = getString(R.string.voice_note_fragment_pause)
-            }
-        }
-        voice_note_fragment_stop.setOnClickListener {
-            mediaPlayer?.stop()
-            mediaPlayer?.prepare()
-            stopTimer()
-            showDuration()
-            voice_note_fragment_play.text = getString(R.string.voice_note_fragment_play)
-        }
-    }
-
-    private fun startTimer() {
-        startTime = SystemClock.uptimeMillis()
-        customHandler.postDelayed(updateTimerThread, 0)
-    }
-
-    private fun pauseTimer() {
-        pauseTime = updateTime
-        customHandler.removeCallbacks(updateTimerThread)
-    }
-
-    private fun stopTimer() {
-        pauseTime = 0L
-        customHandler.removeCallbacks(updateTimerThread)
-    }
-
-    override fun onStop() {
-        super.onStop()
-        mediaPlayer?.let {
-            if (it.isPlaying) it.stop()
-            it.release()
-        }
-        mediaPlayer = null
-    }
-
-    private fun loadNote(note: Note) {
-        note.title?.let { title -> if (title.isNotBlank()) voice_note_fragment_title.text = title }
-        voice_note_fragment_body.text = note.body
-        mediaPlayer = MediaPlayer()
-        mediaPlayer?.setOnCompletionListener {
-            stopTimer()
-            showDuration()
-            voice_note_fragment_play.text = getString(R.string.voice_note_fragment_play)
-        }
-        val imagePath = File(context!!.filesDir, getString(R.string.audio_file_path))
-        val newFile = File(imagePath, note.filename)
-        Log.d("check", newFile.absolutePath)
-        mediaPlayer?.setDataSource(newFile.absolutePath)
-        mediaPlayer?.prepare()
-        showDuration()
-        voice_note_fragment_options.setOnClickListener { showPopupMenu(it, note) }
-    }
-
-    private fun showDuration() {
-        mediaPlayer?.let {
-            val duration = it.duration
-            voice_note_fragment_counter.text = DateUtils.formatElapsedTime(duration.toLong() / 1000)
-        }
-    }
-
-
-    private fun showPopupMenu(view: View, note: Note) {
-        stopTimer()
-        showDuration()
-        voice_note_fragment_play.text = getString(R.string.voice_note_fragment_play)
-        val popup = PopupMenu(context!!, view)
-        popup.menuInflater.inflate(R.menu.voice_note_popup_menu, popup.menu)
-        popup.setOnMenuItemClickListener {
-            when {
-                it.itemId == R.id.vn_menu_rename -> RenameNoteDialog.getInstance(note, viewModel)
-                        .show(fragmentManager, "note_dialog")
-                it.itemId == R.id.vn_menu_share -> {
-                    val intent = Intent(Intent.ACTION_SEND)
-                    val imagePath = File(context!!.filesDir, getString(R.string.audio_file_path))
-                    val newFile = File(imagePath, note.filename)
-                    val contentUri = FileProvider.getUriForFile(context!!, getString(R.string.app_authority_for_file_provider), newFile)
-                    val type = context!!.contentResolver.getType(contentUri)
-                    intent.putExtra(Intent.EXTRA_STREAM, contentUri)
-                    intent.type = type
-                    intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
-                    startActivity(Intent.createChooser(intent, "Send audio note"))
-                }
-                it.itemId == R.id.vn_menu_delete -> {
-                    Navigation.findNavController(voice_note_fragment).popBackStack()
-                    context!!.deleteFile(note.filename)
-                    viewModel.remove(note)
-                }
-            }
-            true
-        }
-        popup.show()
-    }
-}

+ 0 - 8
app/src/main/java/com/sduduzog/slimlauncher/utils/OnShitDoneToNotesListener.kt

@@ -1,8 +0,0 @@
-package com.sduduzog.slimlauncher.utils
-
-import com.sduduzog.slimlauncher.data.model.Note
-
-interface OnShitDoneToNotesListener{
-    fun onView(note: Note)
-    fun onDelete(note: Note)
-}

+ 0 - 90
app/src/main/java/com/sduduzog/slimlauncher/utils/VoiceRecorder.kt

@@ -1,90 +0,0 @@
-package com.sduduzog.slimlauncher.utils
-
-import android.media.MediaRecorder
-import android.util.Log
-import androidx.lifecycle.MutableLiveData
-import com.sduduzog.slimlauncher.data.MainViewModel
-import com.sduduzog.slimlauncher.data.model.Note
-import java.io.File
-import java.io.IOException
-import java.text.DateFormat
-import java.util.*
-
-
-class VoiceRecorder private constructor() {
-
-    var state: Int = IDLE
-        set(value) {
-            stateLiveData.value = value
-            field = value
-        }
-    val stateLiveData = MutableLiveData<Int>()
-    private var note: Note? = null
-    private var mediaRecorder: MediaRecorder? = null
-
-    fun startRecording(fileDir: String) {
-        File(fileDir).mkdir()
-        val timestamp = Date().time
-        val title = "VN-$timestamp"
-        val body = "Recorded at ${DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT).format(Date(timestamp))}"
-        val filename = "$title.m4a"
-        val path = "$fileDir/$filename"
-        note = Note(timestamp, body, title, timestamp, Note.TYPE_VOICE, filename)
-        mediaRecorder?.setAudioSource(MediaRecorder.AudioSource.MIC)
-        mediaRecorder?.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4)
-        mediaRecorder?.setOutputFile(path)
-        mediaRecorder?.setAudioEncoder(MediaRecorder.AudioEncoder.HE_AAC)
-        mediaRecorder?.setAudioChannels(1)
-        mediaRecorder?.setAudioEncodingBitRate(384000)
-        mediaRecorder?.setAudioSamplingRate(44100)
-        try {
-            mediaRecorder?.prepare()
-            mediaRecorder?.start()
-            state = RECORDING
-        } catch (e: IOException) {
-            note = null
-            state = ERROR
-            Log.e("check", "$e")
-        }
-    }
-
-    fun stopRecording() {
-        mediaRecorder?.stop()
-        mediaRecorder?.reset()
-        state = IDLE
-    }
-
-    fun save(viewModel: MainViewModel) {
-        viewModel.add(note!!)
-    }
-
-    fun onStart() {
-        state = IDLE
-        mediaRecorder = MediaRecorder()
-    }
-
-    fun onStop() {
-        Log.d("check", "on stop recording")
-        mediaRecorder?.release()
-        mediaRecorder = null
-    }
-
-    companion object {
-
-        @Volatile
-        private var INSTANCE: VoiceRecorder? = null
-
-        fun getInstance(): VoiceRecorder {
-            synchronized(VoiceRecorder::class.java) {
-                if (INSTANCE == null) {
-                    INSTANCE = VoiceRecorder()
-                }
-                return INSTANCE!!
-            }
-        }
-
-        const val RECORDING = 1
-        const val IDLE = 2
-        const val ERROR = 4
-    }
-}

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

@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ScrollView 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/edit_note_fragment"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:fitsSystemWindows="true"
-    android:scrollbarStyle="insideOverlay"
-    tools:context="com.sduduzog.slimlauncher.ui.notes.EditNoteFragment">
-
-    <androidx.constraintlayout.widget.ConstraintLayout
-        android:id="@+id/edit_note_fragment_layout"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content">
-
-        <EditText
-            android:id="@+id/edit_note_fragment_title"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="16dp"
-            android:background="@android:color/transparent"
-            android:padding="12dp"
-            android:hint="@string/edit_note_fragment_untitled"
-            android:textSize="18sp"
-            android:inputType="textCapSentences"
-            app:layout_constraintEnd_toStartOf="@+id/edit_note_fragment_save"
-            app:layout_constraintStart_toStartOf="parent"
-            android:singleLine="true"
-            app:layout_constraintTop_toTopOf="parent"
-            tools:ignore="Autofill,TextFields" />
-
-        <TextView
-            android:id="@+id/edit_note_fragment_save"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="16dp"
-            android:layout_marginEnd="16dp"
-            android:layout_marginRight="16dp"
-            android:padding="12dp"
-            android:text="@string/edit_note_fragment_save"
-            android:textSize="18sp"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintTop_toTopOf="parent" />
-
-        <EditText
-            android:id="@+id/edit_note_fragment_body"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:imeOptions="normal"
-            android:inputType="textMultiLine|textCapSentences"
-            android:padding="12dp"
-            android:textSize="14sp"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toBottomOf="@id/edit_note_fragment_title"
-            tools:ignore="Autofill,LabelFor" />
-    </androidx.constraintlayout.widget.ConstraintLayout>
-</ScrollView>

+ 0 - 10
app/src/main/res/layout/home_fragment.xml

@@ -32,16 +32,6 @@
         android:textAppearance="@style/TextAppearance.AppCompat"
         android:textSize="@dimen/_12sdp" />
 
-    <TextView
-        android:id="@+id/home_fragment_tasks"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:gravity="start"
-        android:padding="@dimen/_12sdp"
-        android:text="@string/home_fragment_tasks"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="@dimen/_24ssp" />
-
     <androidx.recyclerview.widget.RecyclerView
         android:id="@+id/home_fragment_list"
         android:layout_width="0dp"

+ 0 - 146
app/src/main/res/layout/home_motion_end.xml

@@ -1,146 +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/linearLayout"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-    <TextView
-        android:id="@+id/home_fragment_time"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:alpha="-1"
-        android:text="@string/main_placeholder_clock"
-        android:textSize="@dimen/_40ssp"
-        app:layout_constraintBottom_toTopOf="@+id/home_fragment_date"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintHorizontal_bias="0.5"
-        app:layout_constraintStart_toStartOf="parent" />
-
-    <TextView
-        android:id="@+id/home_fragment_time_format"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="@dimen/_16sdp"
-        android:alpha="-1"
-        android:textSize="@dimen/_13sdp"
-        app:layout_constraintStart_toEndOf="@+id/home_fragment_time"
-        app:layout_constraintTop_toTopOf="@+id/home_fragment_time" />
-
-    <TextView
-        android:id="@+id/home_fragment_date"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:alpha="-1"
-        android:padding="@dimen/_4sdp"
-        android:text="@string/main_placeholder_date"
-        android:textSize="@dimen/_12sdp"
-        app:layout_constraintBottom_toTopOf="parent"
-        app:layout_constraintEnd_toEndOf="@+id/home_fragment_time"
-        app:layout_constraintStart_toStartOf="@+id/home_fragment_time" />
-
-    <TextView
-        android:id="@+id/home_fragment_tasks"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginBottom="@dimen/_64sdp"
-        android:alpha="-1"
-        android:gravity="start"
-        android:padding="@dimen/_12sdp"
-        android:text="@string/home_fragment_tasks"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="@dimen/_24ssp"
-        app:layout_constraintBottom_toTopOf="@+id/home_fragment_list"
-        app:layout_constraintEnd_toEndOf="@+id/home_fragment_list"
-        app:layout_constraintStart_toStartOf="@+id/home_fragment_list" />
-
-    <androidx.recyclerview.widget.RecyclerView
-        android:id="@+id/home_fragment_list"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="@dimen/_16sdp"
-        android:layout_marginLeft="@dimen/_16sdp"
-        android:layout_marginEnd="@dimen/_16sdp"
-        android:layout_marginRight="@dimen/_16sdp"
-        app:layout_constraintBottom_toTopOf="@+id/home_fragment_list_exp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintHorizontal_bias="0.5"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/home_fragment_date"
-        app:layout_constraintVertical_chainStyle="packed"
-        tools:itemCount="4"
-        tools:listitem="@layout/main_fragment_list_item" />
-
-    <androidx.recyclerview.widget.RecyclerView
-        android:id="@+id/home_fragment_list_exp"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="@dimen/_16sdp"
-        android:layout_marginLeft="@dimen/_16sdp"
-        android:layout_marginEnd="@dimen/_16sdp"
-        android:layout_marginRight="@dimen/_16sdp"
-        android:layout_marginBottom="@dimen/_32sdp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintHorizontal_bias="0.5"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/home_fragment_list"
-        tools:itemCount="3"
-        tools:listitem="@layout/main_fragment_list_item" />
-
-    <TextView
-        android:id="@+id/home_fragment_options"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="@dimen/_16sdp"
-        android:layout_marginLeft="@dimen/_16sdp"
-        android:layout_marginBottom="@dimen/_16sdp"
-        android:padding="@dimen/_8sdp"
-        android:text="@string/main_fragment_options"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="@dimen/_18ssp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintStart_toStartOf="@+id/home_fragment_list_exp" />
-
-    <TextView
-        android:id="@+id/home_fragment_notes"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginEnd="@dimen/_16sdp"
-        android:layout_marginRight="@dimen/_16sdp"
-        android:layout_marginBottom="@dimen/_16sdp"
-        android:padding="@dimen/_8sdp"
-        android:text="@string/main_fragment_notes"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="@dimen/_18ssp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="@+id/home_fragment_list_exp" />
-
-    <ImageView
-        android:id="@+id/home_fragment_call"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="@dimen/_8sdp"
-        android:layout_marginLeft="@dimen/_8sdp"
-        android:alpha="-1"
-        android:padding="@dimen/_8sdp"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="parent"
-        app:srcCompat="@drawable/ic_call"
-        tools:ignore="ContentDescription" />
-
-    <ImageView
-        android:id="@+id/home_fragment_camera"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginEnd="@dimen/_8sdp"
-        android:layout_marginRight="@dimen/_8sdp"
-        android:alpha="-1"
-        android:padding="@dimen/_8sdp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintTop_toBottomOf="parent"
-        app:srcCompat="@drawable/ic_photo_camera"
-        tools:ignore="ContentDescription" />
-
-</androidx.constraintlayout.widget.ConstraintLayout>

+ 0 - 146
app/src/main/res/layout/home_motion_start.xml

@@ -1,146 +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/linearLayout2"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-    <TextView
-        android:id="@+id/home_fragment_time"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="@dimen/_64sdp"
-        android:text="@string/main_placeholder_clock"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="@dimen/_40ssp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintHorizontal_bias="0.506"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
-
-    <TextView
-        android:id="@+id/home_fragment_time_format"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="@dimen/_10sdp"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="@dimen/_13sdp"
-        app:layout_constraintStart_toEndOf="@+id/home_fragment_time"
-        app:layout_constraintTop_toTopOf="@+id/home_fragment_time" />
-
-    <TextView
-        android:id="@+id/home_fragment_date"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:padding="@dimen/_4sdp"
-        android:text="@string/main_placeholder_date"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="@dimen/_12sdp"
-        app:layout_constraintEnd_toEndOf="@+id/home_fragment_time"
-        app:layout_constraintStart_toStartOf="@+id/home_fragment_time"
-        app:layout_constraintTop_toBottomOf="@+id/home_fragment_time" />
-
-    <TextView
-        android:id="@+id/home_fragment_tasks"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginBottom="@dimen/_4sdp"
-        android:gravity="start"
-        android:padding="@dimen/_12sdp"
-        android:text="@string/home_fragment_tasks"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="@dimen/_24ssp"
-        app:layout_constraintBottom_toTopOf="@+id/home_fragment_list"
-        app:layout_constraintEnd_toEndOf="@+id/home_fragment_list"
-        app:layout_constraintStart_toStartOf="@+id/home_fragment_list" />
-
-    <androidx.recyclerview.widget.RecyclerView
-        android:id="@+id/home_fragment_list"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="@dimen/_16sdp"
-        android:layout_marginLeft="@dimen/_16sdp"
-        android:layout_marginTop="@dimen/_32sdp"
-        android:layout_marginEnd="@dimen/_16sdp"
-        android:layout_marginRight="@dimen/_16sdp"
-        android:layout_marginBottom="@dimen/_8sdp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintHorizontal_bias="0.0"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="@+id/home_fragment_time"
-        app:layout_constraintVertical_bias="0.650"
-        tools:itemCount="4"
-        tools:listitem="@layout/main_fragment_list_item" />
-
-    <androidx.recyclerview.widget.RecyclerView
-        android:id="@+id/home_fragment_list_exp"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="@dimen/_16sdp"
-        android:layout_marginLeft="@dimen/_16sdp"
-        android:layout_marginTop="@dimen/_16sdp"
-        android:layout_marginEnd="@dimen/_16sdp"
-        android:layout_marginRight="@dimen/_16sdp"
-        android:layout_marginBottom="@dimen/_8sdp"
-        android:alpha="-2"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintHorizontal_bias="0.5"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="parent"
-        tools:itemCount="3"
-        tools:listitem="@layout/main_fragment_list_item" />
-
-    <TextView
-        android:id="@+id/home_fragment_options"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:alpha="-3"
-        android:padding="@dimen/_8sdp"
-        android:text="@string/main_fragment_options"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="@dimen/_18ssp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintStart_toStartOf="@+id/home_fragment_list_exp"
-        app:layout_constraintTop_toBottomOf="@+id/home_fragment_list_exp" />
-
-    <TextView
-        android:id="@+id/home_fragment_notes"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:alpha="-3"
-        android:padding="@dimen/_8sdp"
-        android:text="@string/main_fragment_notes"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="@dimen/_18ssp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="@+id/home_fragment_list_exp"
-        app:layout_constraintTop_toBottomOf="@+id/home_fragment_list_exp" />
-
-    <ImageView
-        android:id="@+id/home_fragment_call"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="@dimen/_8sdp"
-        android:layout_marginLeft="@dimen/_8sdp"
-        android:layout_marginBottom="@dimen/_8sdp"
-        android:padding="@dimen/_8sdp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:srcCompat="@drawable/ic_call"
-        tools:ignore="ContentDescription" />
-
-    <ImageView
-        android:id="@+id/home_fragment_camera"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginEnd="@dimen/_8sdp"
-        android:layout_marginRight="@dimen/_8sdp"
-        android:layout_marginBottom="@dimen/_8sdp"
-        android:padding="@dimen/_8sdp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:srcCompat="@drawable/ic_photo_camera"
-        tools:ignore="ContentDescription" />
-</androidx.constraintlayout.widget.ConstraintLayout>

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

@@ -1,54 +0,0 @@
-<ScrollView 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/note_fragment"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:context="com.sduduzog.slimlauncher.ui.notes.NoteFragment">
-
-    <androidx.constraintlayout.widget.ConstraintLayout
-        android:id="@+id/note_fragment_layout"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content">
-
-        <TextView
-            android:id="@+id/note_fragment_title"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="16dp"
-            android:padding="12dp"
-            android:text="@string/edit_note_fragment_untitled"
-            android:textAppearance="@style/Base.TextAppearance.AppCompat"
-            android:textSize="18sp"
-            app:layout_constraintEnd_toStartOf="@+id/note_fragment_edit"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="parent" />
-
-        <TextView
-            android:id="@+id/note_fragment_edit"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="16dp"
-            android:layout_marginEnd="16dp"
-            android:layout_marginRight="16dp"
-            android:padding="12dp"
-            android:text="@string/note_fragment_edit"
-            android:textSize="18sp"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintTop_toTopOf="parent" />
-
-        <TextView
-            android:id="@+id/note_fragment_body"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:padding="12dp"
-            android:textSize="14sp"
-            android:textAppearance="@style/Base.TextAppearance.AppCompat"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toBottomOf="@id/note_fragment_title" />
-    </androidx.constraintlayout.widget.ConstraintLayout>
-
-
-</ScrollView>
-

+ 0 - 63
app/src/main/res/layout/notes_fragment.xml

@@ -1,63 +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/notes_fragment"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:context=".ui.notes.NotesFragment">
-
-    <TextView
-        android:id="@+id/notes_fragment_title"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="16dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginTop="@dimen/_8sdp"
-        android:text="@string/main_fragment_notes"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="@dimen/_36ssp"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
-
-    <TextView
-        android:id="@+id/notes_fragment_create_note"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="16dp"
-        android:layout_marginEnd="16dp"
-        android:layout_marginRight="16dp"
-        android:padding="12dp"
-        android:text="@string/notes_fragment_create_new_note"
-        android:textSize="18sp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
-
-    <androidx.recyclerview.widget.RecyclerView
-        android:id="@+id/notes_fragment_list"
-        android:layout_width="0dp"
-        android:layout_height="0dp"
-        android:layout_marginTop="@dimen/_8sdp"
-        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/notes_fragment_create_note"
-        tools:listitem="@layout/notes_fragment_list_item">
-
-    </androidx.recyclerview.widget.RecyclerView>
-
-    <TextView
-        android:id="@+id/notes_fragment_counter"
-        android:layout_width="0dp"
-        android:layout_height="0dp"
-        android:background="?attr/colorPrimary"
-        android:gravity="center"
-        android:textSize="@dimen/_64ssp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/notes_fragment_create_note"
-        tools:visibility="gone" />
-
-</androidx.constraintlayout.widget.ConstraintLayout>

+ 0 - 24
app/src/main/res/layout/notes_fragment_list_item.xml

@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:orientation="vertical"
-    android:padding="16dp">
-
-    <TextView
-        android:id="@+id/notes_fragment_list_item_title"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:textSize="18sp" />
-
-    <TextView
-        android:id="@+id/notes_fragment_list_item_snippet"
-        android:layout_width="match_parent"
-        android:ellipsize="end"
-        android:layout_marginTop="4dp"
-        android:textSize="14sp"
-        android:textAppearance="@style/TextAppearance.AppCompat"
-        android:maxLines="5"
-        android:layout_height="wrap_content" />
-</LinearLayout>

+ 0 - 62
app/src/main/res/layout/tasks_fragment.xml

@@ -1,62 +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/tasks_fragment"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:context=".ui.main.TasksFragment">
-
-    <EditText
-        android:id="@+id/tasks_fragment_input"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:ems="10"
-        android:hint="@string/tasks_fragment_enter_a_new_task"
-        android:inputType="textCapSentences"
-        android:imeOptions="actionDone"
-        android:padding="@dimen/_12sdp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        tools:ignore="Autofill,LabelFor" />
-
-    <androidx.recyclerview.widget.RecyclerView
-        android:id="@+id/tasks_fragment_list"
-        android:layout_width="0dp"
-        android:layout_height="0dp"
-        android:layout_marginTop="@dimen/_8sdp"
-        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
-        app:layout_constraintBottom_toTopOf="@+id/tasks_fragment_sort"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/tasks_fragment_input"
-        tools:listitem="@layout/tasks_fragment_list_item" />
-
-    <TextView
-        android:id="@+id/tasks_fragment_sort"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="@dimen/_8sdp"
-        android:layout_marginLeft="@dimen/_8sdp"
-        android:layout_marginBottom="@dimen/_8sdp"
-        android:padding="@dimen/_12sdp"
-        android:text="@string/tasks_fragment_sort"
-        android:textSize="@dimen/_18ssp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintStart_toStartOf="parent" />
-
-    <TextView
-        android:id="@+id/tasks_fragment_clear"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginEnd="@dimen/_8sdp"
-        android:layout_marginRight="@dimen/_8sdp"
-        android:layout_marginBottom="@dimen/_8sdp"
-        android:padding="@dimen/_12sdp"
-        android:text="@string/tasks_fragment_clear_completed_tasks"
-        android:textSize="@dimen/_18ssp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent" />
-
-</androidx.constraintlayout.widget.ConstraintLayout>

+ 0 - 8
app/src/main/res/layout/tasks_fragment_list_item.xml

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<CheckBox xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/tasks_fragment_list_item"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:layout_margin="@dimen/_8sdp"
-    android:layout_marginTop="@dimen/_16sdp"
-    android:textSize="20sp" />

+ 0 - 84
app/src/main/res/layout/voice_note_fragment.xml

@@ -1,84 +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/voice_note_fragment"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:context="com.sduduzog.slimlauncher.ui.notes.VoiceNoteFragment">
-
-
-    <TextView
-        android:id="@+id/voice_note_fragment_title"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="16dp"
-        android:background="@android:color/transparent"
-        android:hint="@string/edit_note_fragment_untitled"
-        android:padding="12dp"
-        android:textAppearance="@style/Base.TextAppearance.AppCompat"
-        android:textSize="18sp"
-        app:layout_constraintEnd_toStartOf="@+id/voice_note_fragment_options"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
-
-    <ImageView
-        android:id="@+id/voice_note_fragment_options"
-        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_constraintTop_toTopOf="parent"
-        android:textSize="18sp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:srcCompat="@drawable/ic_more_vert"
-        tools:ignore="ContentDescription" />
-
-    <TextView
-        android:id="@+id/voice_note_fragment_body"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:padding="12dp"
-        android:textAppearance="@style/Base.TextAppearance.AppCompat"
-        android:textSize="14sp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@id/voice_note_fragment_title" />
-
-    <TextView
-        android:id="@+id/voice_note_fragment_counter"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:textAppearance="@style/Base.TextAppearance.AppCompat"
-        android:textSize="@dimen/_64ssp"
-        android:text="@string/main_placeholder_clock"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
-
-    <TextView
-        android:id="@+id/voice_note_fragment_play"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:padding="@dimen/_8sdp"
-        android:text="@string/voice_note_fragment_play"
-        android:textAppearance="@style/Base.TextAppearance.AppCompat"
-        android:textSize="@dimen/_18ssp"
-        app:layout_constraintStart_toStartOf="@+id/voice_note_fragment_counter"
-        app:layout_constraintTop_toBottomOf="@+id/voice_note_fragment_counter" />
-
-    <TextView
-        android:id="@+id/voice_note_fragment_stop"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:padding="@dimen/_8sdp"
-        android:text="@string/notes_fragment_stop"
-        android:textAppearance="@style/Base.TextAppearance.AppCompat"
-        android:textSize="@dimen/_18ssp"
-        app:layout_constraintRight_toRightOf="@+id/voice_note_fragment_counter"
-        app:layout_constraintTop_toTopOf="@+id/voice_note_fragment_play" />
-
-</androidx.constraintlayout.widget.ConstraintLayout>

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

@@ -13,12 +13,6 @@
         <action
             android:id="@+id/action_homeFragment_to_optionsFragment"
             app:destination="@id/optionsFragment" />
-        <action
-            android:id="@+id/action_homeFragment_to_notesFragment"
-            app:destination="@id/notesFragment" />
-        <action
-            android:id="@+id/action_homeFragment_to_tasksFragment"
-            app:destination="@id/tasksFragment" />
     </fragment>
     <fragment
         android:id="@+id/optionsFragment"
@@ -43,49 +37,5 @@
         android:name="com.sduduzog.slimlauncher.ui.options.AddAppFragment"
         android:label="add_app_fragment"
         tools:layout="@layout/add_app_fragment" />
-    <fragment
-        android:id="@+id/noteFragment"
-        android:name="com.sduduzog.slimlauncher.ui.notes.NoteFragment"
-        android:label="note_fragment"
-        tools:layout="@layout/note_fragment">
-        <action
-            android:id="@+id/action_noteFragment_to_editNoteFragment"
-            app:destination="@id/editNoteFragment" />
-    </fragment>
-    <fragment
-        android:id="@+id/notesFragment"
-        android:name="com.sduduzog.slimlauncher.ui.notes.NotesFragment"
-        android:label="notes_fragment"
-        tools:layout="@layout/notes_fragment">
-        <action
-            android:id="@+id/action_notesFragment_to_noteFragment"
-            app:destination="@id/noteFragment" />
-        <action
-            android:id="@+id/action_notesFragment_to_editNoteFragment"
-            app:destination="@id/editNoteFragment" />
-        <action
-            android:id="@+id/action_notesFragment_to_voiceNoteFragment"
-            app:destination="@id/voiceNoteFragment" />
-    </fragment>
-    <fragment
-        android:id="@+id/tasksFragment"
-        android:name="com.sduduzog.slimlauncher.ui.main.TasksFragment"
-        android:label="tasks_fragment"
-        tools:layout="@layout/tasks_fragment" />
-    <fragment
-        android:id="@+id/editNoteFragment"
-        android:name="com.sduduzog.slimlauncher.ui.notes.EditNoteFragment"
-        android:label="edit_note_fragment"
-        tools:layout="@layout/edit_note_fragment">
-        <action
-            android:id="@+id/action_editNoteFragment_to_noteFragment"
-            app:destination="@id/noteFragment"
-            app:popUpTo="@+id/notesFragment" />
-    </fragment>
-    <fragment
-        android:id="@+id/voiceNoteFragment"
-        android:name="com.sduduzog.slimlauncher.ui.notes.VoiceNoteFragment"
-        android:label="voice_note_fragment"
-        tools:layout="@layout/voice_note_fragment" />
 
 </navigation>

+ 198 - 4
app/src/main/res/xml/home_motion_scene.xml

@@ -1,12 +1,206 @@
 <?xml version="1.0" encoding="utf-8"?>
-<MotionScene xmlns:motion="http://schemas.android.com/apk/res-auto">
+<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:motion="http://schemas.android.com/apk/res-auto">
     <Transition
-        motion:constraintSetEnd="@layout/home_motion_end"
-        motion:constraintSetStart="@layout/home_motion_start"
+        motion:constraintSetEnd="@+id/end"
+        motion:constraintSetStart="@+id/start"
         motion:duration="250">
         <OnSwipe
-            motion:touchAnchorId="@+id/home_fragment_date"
             motion:dragDirection="dragUp"
+            motion:touchAnchorId="@+id/home_fragment_date"
             motion:touchAnchorSide="bottom" />
     </Transition>
+
+    <ConstraintSet android:id="@+id/start">
+        <Constraint
+            android:id="@+id/home_fragment_time"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="@dimen/_64sdp"
+            motion:layout_constraintEnd_toEndOf="parent"
+            motion:layout_constraintHorizontal_bias="0.506"
+            motion:layout_constraintStart_toStartOf="parent"
+            motion:layout_constraintTop_toTopOf="parent" />
+
+        <Constraint
+            android:id="@+id/home_fragment_time_format"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="@dimen/_10sdp"
+            motion:layout_constraintStart_toEndOf="@+id/home_fragment_time"
+            motion:layout_constraintTop_toTopOf="@+id/home_fragment_time" />
+
+        <Constraint
+            android:id="@+id/home_fragment_date"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:padding="@dimen/_4sdp"
+            android:text="@string/main_placeholder_date"
+            motion:layout_constraintEnd_toEndOf="@+id/home_fragment_time"
+            motion:layout_constraintStart_toStartOf="@+id/home_fragment_time"
+            motion:layout_constraintTop_toBottomOf="@+id/home_fragment_time" />
+
+        <Constraint
+            android:id="@+id/home_fragment_list"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="@dimen/_16sdp"
+            android:layout_marginLeft="@dimen/_16sdp"
+            android:layout_marginTop="8dp"
+            android:layout_marginEnd="@dimen/_16sdp"
+            android:layout_marginRight="@dimen/_16sdp"
+            android:layout_marginBottom="@dimen/_8sdp"
+            motion:layout_constraintBottom_toBottomOf="parent"
+            motion:layout_constraintEnd_toEndOf="parent"
+            motion:layout_constraintHorizontal_bias="0.0"
+            motion:layout_constraintStart_toStartOf="parent"
+            motion:layout_constraintTop_toTopOf="parent"
+            motion:layout_constraintVertical_bias="0.55" />
+
+        <Constraint
+            android:id="@+id/home_fragment_list_exp"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="@dimen/_16sdp"
+            android:layout_marginLeft="@dimen/_16sdp"
+            android:layout_marginTop="@dimen/_16sdp"
+            android:layout_marginEnd="@dimen/_16sdp"
+            android:layout_marginRight="@dimen/_16sdp"
+            android:layout_marginBottom="@dimen/_8sdp"
+            android:alpha="-2"
+            motion:layout_constraintEnd_toEndOf="parent"
+            motion:layout_constraintHorizontal_bias="0.5"
+            motion:layout_constraintStart_toStartOf="parent"
+            motion:layout_constraintTop_toBottomOf="parent" />
+
+        <Constraint
+            android:id="@+id/home_fragment_options"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:alpha="-3"
+            motion:layout_constraintBottom_toBottomOf="parent"
+            motion:layout_constraintStart_toStartOf="@+id/home_fragment_list_exp"
+            motion:layout_constraintTop_toBottomOf="@+id/home_fragment_list_exp" />
+
+        <Constraint
+            android:id="@+id/home_fragment_notes"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:alpha="-3"
+            motion:layout_constraintBottom_toBottomOf="parent"
+            motion:layout_constraintEnd_toEndOf="@+id/home_fragment_list_exp"
+            motion:layout_constraintTop_toBottomOf="@+id/home_fragment_list_exp" />
+
+        <Constraint
+            android:id="@+id/home_fragment_call"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="@dimen/_8sdp"
+            android:layout_marginLeft="@dimen/_8sdp"
+            android:layout_marginBottom="@dimen/_8sdp"
+            motion:layout_constraintBottom_toBottomOf="parent"
+            motion:layout_constraintStart_toStartOf="parent" />
+
+        <Constraint
+            android:id="@+id/home_fragment_camera"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginEnd="@dimen/_8sdp"
+            android:layout_marginRight="@dimen/_8sdp"
+            android:layout_marginBottom="@dimen/_8sdp"
+            motion:layout_constraintBottom_toBottomOf="parent"
+            motion:layout_constraintEnd_toEndOf="parent" />
+    </ConstraintSet>
+
+    <ConstraintSet android:id="@+id/end">
+
+        <Constraint
+            android:id="@+id/home_fragment_time"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:alpha="-1"
+            motion:layout_constraintBottom_toTopOf="@+id/home_fragment_date"
+            motion:layout_constraintEnd_toEndOf="parent"
+            motion:layout_constraintHorizontal_bias="0.5"
+            motion:layout_constraintStart_toStartOf="parent" />
+
+        <Constraint
+            android:id="@+id/home_fragment_time_format"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="@dimen/_16sdp"
+            android:alpha="-1"
+            motion:layout_constraintStart_toEndOf="@+id/home_fragment_time"
+            motion:layout_constraintTop_toTopOf="@+id/home_fragment_time" />
+
+        <Constraint
+            android:id="@+id/home_fragment_date"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:alpha="-1"
+            motion:layout_constraintBottom_toTopOf="parent"
+            motion:layout_constraintEnd_toEndOf="@+id/home_fragment_time"
+            motion:layout_constraintStart_toStartOf="@+id/home_fragment_time" />
+
+        <Constraint
+            android:id="@+id/home_fragment_list"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="@dimen/_16sdp"
+            android:layout_marginLeft="@dimen/_16sdp"
+            android:layout_marginEnd="@dimen/_16sdp"
+            android:layout_marginRight="@dimen/_16sdp"
+            motion:layout_constraintBottom_toTopOf="@+id/home_fragment_list_exp"
+            motion:layout_constraintEnd_toEndOf="parent"
+            motion:layout_constraintHorizontal_bias="0.5"
+            motion:layout_constraintStart_toStartOf="parent"
+            motion:layout_constraintTop_toBottomOf="@+id/home_fragment_date"
+            motion:layout_constraintVertical_chainStyle="packed" />
+
+        <Constraint
+            android:id="@+id/home_fragment_list_exp"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="@dimen/_16sdp"
+            android:layout_marginLeft="@dimen/_16sdp"
+            android:layout_marginEnd="@dimen/_16sdp"
+            android:layout_marginRight="@dimen/_16sdp"
+            android:layout_marginBottom="@dimen/_32sdp"
+            motion:layout_constraintBottom_toBottomOf="parent"
+            motion:layout_constraintEnd_toEndOf="parent"
+            motion:layout_constraintHorizontal_bias="0.5"
+            motion:layout_constraintStart_toStartOf="parent"
+            motion:layout_constraintTop_toBottomOf="@+id/home_fragment_list" />
+
+        <Constraint
+            android:id="@+id/home_fragment_options"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="@dimen/_16sdp"
+            android:layout_marginLeft="@dimen/_16sdp"
+            android:layout_marginBottom="@dimen/_16sdp"
+            motion:layout_constraintBottom_toBottomOf="parent"
+            motion:layout_constraintStart_toStartOf="@+id/home_fragment_list_exp" />
+
+        <Constraint
+            android:id="@+id/home_fragment_call"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="@dimen/_8sdp"
+            android:layout_marginLeft="@dimen/_8sdp"
+            android:alpha="-1"
+            motion:layout_constraintStart_toStartOf="parent"
+            motion:layout_constraintTop_toBottomOf="parent" />
+
+        <Constraint
+            android:id="@+id/home_fragment_camera"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginEnd="@dimen/_8sdp"
+            android:layout_marginRight="@dimen/_8sdp"
+            android:alpha="-1"
+            motion:layout_constraintEnd_toEndOf="parent"
+            motion:layout_constraintTop_toBottomOf="parent" />
+
+    </ConstraintSet>
 </MotionScene>

+ 2 - 1
docs/index.html

@@ -10,7 +10,8 @@
 </head>
 
 <body>
-<h1>Hello there</h1>
+<h1>Hello there, how are you doing</h1>
+<h1>This is awesome</h1>
 </body>
 
 </html>

BIN
docs/main.css