diff --git a/.idea/misc.xml b/.idea/misc.xml index 71ba5ae..03d01bb 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,8 +3,20 @@ diff --git a/SVG/Download.svg b/SVG/Download.svg new file mode 100644 index 0000000..e553ff0 --- /dev/null +++ b/SVG/Download.svg @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/SVG/Folder.svg b/SVG/Folder.svg new file mode 100644 index 0000000..060d242 --- /dev/null +++ b/SVG/Folder.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/SVG/FolderUpdate.svg b/SVG/FolderUpdate.svg new file mode 100644 index 0000000..fc5e6f1 --- /dev/null +++ b/SVG/FolderUpdate.svg @@ -0,0 +1,21 @@ + + + + + + + + + + diff --git a/SVG/Gear.svg b/SVG/Gear.svg new file mode 100644 index 0000000..514ce9b --- /dev/null +++ b/SVG/Gear.svg @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/SVG/GearSimplified.svg b/SVG/GearSimplified.svg new file mode 100644 index 0000000..db0f7d7 --- /dev/null +++ b/SVG/GearSimplified.svg @@ -0,0 +1,9 @@ + + + + diff --git a/app/src/main/java/com/example/myapplication/MainActivity.kt b/app/src/main/java/com/example/myapplication/MainActivity.kt index 9acc6da..bf158a3 100644 --- a/app/src/main/java/com/example/myapplication/MainActivity.kt +++ b/app/src/main/java/com/example/myapplication/MainActivity.kt @@ -25,7 +25,7 @@ class MainActivity : AppCompatActivity() { // Passing each menu ID as a set of Ids because each // menu should be considered as top level destinations. val appBarConfiguration = AppBarConfiguration(setOf( - R.id.navigation_home, R.id.navigation_dashboard, R.id.navigation_notifications)) + R.id.navigation_compressing, R.id.navigation_completed,R.id.navigation_settings)) setupActionBarWithNavController(navController, appBarConfiguration) navView.setupWithNavController(navController) } diff --git a/app/src/main/java/com/example/myapplication/ui/dashboard/DashboardFragment.kt b/app/src/main/java/com/example/myapplication/ui/completed/CompletedFragment.kt similarity index 68% rename from app/src/main/java/com/example/myapplication/ui/dashboard/DashboardFragment.kt rename to app/src/main/java/com/example/myapplication/ui/completed/CompletedFragment.kt index e243ff0..d182c71 100644 --- a/app/src/main/java/com/example/myapplication/ui/dashboard/DashboardFragment.kt +++ b/app/src/main/java/com/example/myapplication/ui/completed/CompletedFragment.kt @@ -1,4 +1,4 @@ -package com.example.myapplication.ui.dashboard +package com.example.myapplication.ui.completed import android.os.Bundle import android.view.LayoutInflater @@ -7,11 +7,11 @@ import android.view.ViewGroup import android.widget.TextView import androidx.fragment.app.Fragment import androidx.lifecycle.ViewModelProvider -import com.example.myapplication.databinding.FragmentDashboardBinding +import com.example.myapplication.databinding.FragmentCompletedBinding -class DashboardFragment : Fragment() { +class CompletedFragment : Fragment() { - private var _binding: FragmentDashboardBinding? = null + private var _binding: FragmentCompletedBinding? = null // This property is only valid between onCreateView and // onDestroyView. @@ -23,12 +23,12 @@ class DashboardFragment : Fragment() { savedInstanceState: Bundle? ): View { val dashboardViewModel = - ViewModelProvider(this).get(DashboardViewModel::class.java) + ViewModelProvider(this).get(CompletedViewModel::class.java) - _binding = FragmentDashboardBinding.inflate(inflater, container, false) + _binding = FragmentCompletedBinding.inflate(inflater, container, false) val root: View = binding.root - val textView: TextView = binding.textDashboard + val textView: TextView = binding.textCompleted dashboardViewModel.text.observe(viewLifecycleOwner) { textView.text = it } diff --git a/app/src/main/java/com/example/myapplication/ui/dashboard/DashboardViewModel.kt b/app/src/main/java/com/example/myapplication/ui/completed/CompletedViewModel.kt similarity index 62% rename from app/src/main/java/com/example/myapplication/ui/dashboard/DashboardViewModel.kt rename to app/src/main/java/com/example/myapplication/ui/completed/CompletedViewModel.kt index 2a1985b..700f82a 100644 --- a/app/src/main/java/com/example/myapplication/ui/dashboard/DashboardViewModel.kt +++ b/app/src/main/java/com/example/myapplication/ui/completed/CompletedViewModel.kt @@ -1,13 +1,13 @@ -package com.example.myapplication.ui.dashboard +package com.example.myapplication.ui.completed import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel -class DashboardViewModel : ViewModel() { +class CompletedViewModel : ViewModel() { private val _text = MutableLiveData().apply { - value = "This is dashboard Fragment" + value = "This is completed Fragment" } val text: LiveData = _text } \ No newline at end of file diff --git a/app/src/main/java/com/example/myapplication/ui/notifications/NotificationsFragment.kt b/app/src/main/java/com/example/myapplication/ui/compressing/CompressingFragment.kt similarity index 56% rename from app/src/main/java/com/example/myapplication/ui/notifications/NotificationsFragment.kt rename to app/src/main/java/com/example/myapplication/ui/compressing/CompressingFragment.kt index 3c79ef4..4c99a79 100644 --- a/app/src/main/java/com/example/myapplication/ui/notifications/NotificationsFragment.kt +++ b/app/src/main/java/com/example/myapplication/ui/compressing/CompressingFragment.kt @@ -1,4 +1,4 @@ -package com.example.myapplication.ui.notifications +package com.example.myapplication.ui.compressing import android.os.Bundle import android.view.LayoutInflater @@ -7,11 +7,11 @@ import android.view.ViewGroup import android.widget.TextView import androidx.fragment.app.Fragment import androidx.lifecycle.ViewModelProvider -import com.example.myapplication.databinding.FragmentNotificationsBinding +import com.example.myapplication.databinding.FragmentCompressingBinding -class NotificationsFragment : Fragment() { +class CompressingFragment : Fragment() { - private var _binding: FragmentNotificationsBinding? = null + private var _binding: FragmentCompressingBinding? = null // This property is only valid between onCreateView and // onDestroyView. @@ -22,14 +22,14 @@ class NotificationsFragment : Fragment() { container: ViewGroup?, savedInstanceState: Bundle? ): View { - val notificationsViewModel = - ViewModelProvider(this).get(NotificationsViewModel::class.java) + val homeViewModel = + ViewModelProvider(this).get(CompressingViewModel::class.java) - _binding = FragmentNotificationsBinding.inflate(inflater, container, false) + _binding = FragmentCompressingBinding.inflate(inflater, container, false) val root: View = binding.root - val textView: TextView = binding.textNotifications - notificationsViewModel.text.observe(viewLifecycleOwner) { + val textView: TextView = binding.textCompressing + homeViewModel.text.observe(viewLifecycleOwner) { textView.text = it } return root diff --git a/app/src/main/java/com/example/myapplication/ui/notifications/NotificationsViewModel.kt b/app/src/main/java/com/example/myapplication/ui/compressing/CompressingViewModel.kt similarity index 60% rename from app/src/main/java/com/example/myapplication/ui/notifications/NotificationsViewModel.kt rename to app/src/main/java/com/example/myapplication/ui/compressing/CompressingViewModel.kt index e31dd74..3e329fc 100644 --- a/app/src/main/java/com/example/myapplication/ui/notifications/NotificationsViewModel.kt +++ b/app/src/main/java/com/example/myapplication/ui/compressing/CompressingViewModel.kt @@ -1,13 +1,13 @@ -package com.example.myapplication.ui.notifications +package com.example.myapplication.ui.compressing import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel -class NotificationsViewModel : ViewModel() { +class CompressingViewModel : ViewModel() { private val _text = MutableLiveData().apply { - value = "This is notifications Fragment" + value = "This is compressing Fragment" } val text: LiveData = _text } \ No newline at end of file diff --git a/app/src/main/java/com/example/myapplication/ui/home/HomeFragment.kt b/app/src/main/java/com/example/myapplication/ui/settings/SettingsFragment.kt similarity index 65% rename from app/src/main/java/com/example/myapplication/ui/home/HomeFragment.kt rename to app/src/main/java/com/example/myapplication/ui/settings/SettingsFragment.kt index a817f5b..6628fd9 100644 --- a/app/src/main/java/com/example/myapplication/ui/home/HomeFragment.kt +++ b/app/src/main/java/com/example/myapplication/ui/settings/SettingsFragment.kt @@ -1,4 +1,4 @@ -package com.example.myapplication.ui.home +package com.example.myapplication.ui.settings import android.os.Bundle import android.view.LayoutInflater @@ -7,11 +7,12 @@ import android.view.ViewGroup import android.widget.TextView import androidx.fragment.app.Fragment import androidx.lifecycle.ViewModelProvider -import com.example.myapplication.databinding.FragmentHomeBinding +import com.example.myapplication.databinding.FragmentSettingsBinding -class HomeFragment : Fragment() { - private var _binding: FragmentHomeBinding? = null +class SettingsFragment : Fragment() { + + private var _binding: FragmentSettingsBinding? = null // This property is only valid between onCreateView and // onDestroyView. @@ -23,12 +24,12 @@ class HomeFragment : Fragment() { savedInstanceState: Bundle? ): View { val homeViewModel = - ViewModelProvider(this).get(HomeViewModel::class.java) + ViewModelProvider(this).get(SettingsViewModel::class.java) - _binding = FragmentHomeBinding.inflate(inflater, container, false) + _binding = FragmentSettingsBinding.inflate(inflater, container, false) val root: View = binding.root - val textView: TextView = binding.textHome + val textView: TextView = binding.textSettings homeViewModel.text.observe(viewLifecycleOwner) { textView.text = it } diff --git a/app/src/main/java/com/example/myapplication/ui/home/HomeViewModel.kt b/app/src/main/java/com/example/myapplication/ui/settings/SettingsViewModel.kt similarity index 62% rename from app/src/main/java/com/example/myapplication/ui/home/HomeViewModel.kt rename to app/src/main/java/com/example/myapplication/ui/settings/SettingsViewModel.kt index 300ddd7..a41f14e 100644 --- a/app/src/main/java/com/example/myapplication/ui/home/HomeViewModel.kt +++ b/app/src/main/java/com/example/myapplication/ui/settings/SettingsViewModel.kt @@ -1,13 +1,13 @@ -package com.example.myapplication.ui.home +package com.example.myapplication.ui.settings import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel -class HomeViewModel : ViewModel() { +class SettingsViewModel : ViewModel() { private val _text = MutableLiveData().apply { - value = "This is home Fragment" + value = "This is settings Fragment" } val text: LiveData = _text } \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_dashboard_black_24dp.xml b/app/src/main/res/drawable/ic_dashboard_black_24dp.xml deleted file mode 100644 index 46fc8de..0000000 --- a/app/src/main/res/drawable/ic_dashboard_black_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_download.xml b/app/src/main/res/drawable/ic_download.xml new file mode 100644 index 0000000..9a127cb --- /dev/null +++ b/app/src/main/res/drawable/ic_download.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_folderupdate.xml b/app/src/main/res/drawable/ic_folderupdate.xml new file mode 100644 index 0000000..861929c --- /dev/null +++ b/app/src/main/res/drawable/ic_folderupdate.xml @@ -0,0 +1,15 @@ + + + + + + diff --git a/app/src/main/res/drawable/ic_gearsimplified.xml b/app/src/main/res/drawable/ic_gearsimplified.xml new file mode 100644 index 0000000..f9d12dc --- /dev/null +++ b/app/src/main/res/drawable/ic_gearsimplified.xml @@ -0,0 +1,7 @@ + + + diff --git a/app/src/main/res/drawable/ic_home_black_24dp.xml b/app/src/main/res/drawable/ic_home_black_24dp.xml deleted file mode 100644 index f8bb0b5..0000000 --- a/app/src/main/res/drawable/ic_home_black_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_notifications_black_24dp.xml b/app/src/main/res/drawable/ic_notifications_black_24dp.xml deleted file mode 100644 index 78b75c3..0000000 --- a/app/src/main/res/drawable/ic_notifications_black_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/layout/fragment_dashboard.xml b/app/src/main/res/layout/fragment_completed.xml similarity index 90% rename from app/src/main/res/layout/fragment_dashboard.xml rename to app/src/main/res/layout/fragment_completed.xml index 166ab0e..67b24d9 100644 --- a/app/src/main/res/layout/fragment_dashboard.xml +++ b/app/src/main/res/layout/fragment_completed.xml @@ -4,10 +4,10 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".ui.dashboard.DashboardFragment"> + tools:context=".ui.completed.CompletedFragment"> + tools:context=".ui.settings.SettingsFragment"> + tools:context=".ui.settings.SettingsFragment"> + android:id="@+id/navigation_compressing" + android:icon="@drawable/ic_download" + android:title="@string/title_compressing" /> + android:id="@+id/navigation_completed" + android:icon="@drawable/ic_folderupdate" + android:title="@string/title_completed" /> + android:id="@+id/navigation_settings" + android:icon="@drawable/ic_gearsimplified" + android:title="@string/title_settings" /> + + \ No newline at end of file diff --git a/app/src/main/res/navigation/mobile_navigation.xml b/app/src/main/res/navigation/mobile_navigation.xml index 9439eda..a6d6246 100644 --- a/app/src/main/res/navigation/mobile_navigation.xml +++ b/app/src/main/res/navigation/mobile_navigation.xml @@ -3,23 +3,25 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/mobile_navigation" - app:startDestination="@+id/navigation_home"> + app:startDestination="@+id/navigation_completed"> + + android:id="@+id/navigation_completed" + android:name="com.example.myapplication.ui.completed.CompletedFragment" + android:label="@string/title_completed" + tools:layout="@layout/fragment_completed" /> + android:id="@+id/navigation_compressing" + android:name="com.example.myapplication.ui.compressing.CompressingFragment" + android:label="@string/title_compressing" + tools:layout="@layout/fragment_compressing" /> + android:id="@+id/navigation_settings" + android:name="com.example.myapplication.ui.settings.SettingsFragment" + android:label="@string/title_settings" + tools:layout="@layout/fragment_settings" /> + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 91ef0dc..d7b9f8b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,6 +1,6 @@ My Application - Files - Dashboard - Notifications + Compressing + Completed + Settings \ No newline at end of file