diff --git a/app/src/main/java/org/dnss/sfs/git/wdg/noise/MainActivity.kt b/app/src/main/java/org/dnss/sfs/git/wdg/noise/MainActivity.kt index a78ec0e..7c0f6b6 100644 --- a/app/src/main/java/org/dnss/sfs/git/wdg/noise/MainActivity.kt +++ b/app/src/main/java/org/dnss/sfs/git/wdg/noise/MainActivity.kt @@ -40,7 +40,7 @@ class MainActivity : AppCompatActivity() { // menu should be considered as top level destinations. appBarConfiguration = AppBarConfiguration( setOf( - R.id.nav_home, R.id.nav_gallery, R.id.nav_slideshow + R.id.nav_home, R.id.nav_gallery ), drawerLayout ) setupActionBarWithNavController(navController, appBarConfiguration) diff --git a/app/src/main/java/org/dnss/sfs/git/wdg/noise/ui/home/HomeFragment.kt b/app/src/main/java/org/dnss/sfs/git/wdg/noise/ui/home/HomeFragment.kt index d484aba..e83719b 100644 --- a/app/src/main/java/org/dnss/sfs/git/wdg/noise/ui/home/HomeFragment.kt +++ b/app/src/main/java/org/dnss/sfs/git/wdg/noise/ui/home/HomeFragment.kt @@ -31,10 +31,6 @@ class HomeFragment : Fragment() { _binding = FragmentHomeBinding.inflate(inflater, container, false) val root: View = binding.root - val textView: TextView = binding.textHome - homeViewModel.text.observe(viewLifecycleOwner, Observer { - textView.text = it - }) return root } diff --git a/app/src/main/java/org/dnss/sfs/git/wdg/noise/ui/slideshow/SlideshowFragment.kt b/app/src/main/java/org/dnss/sfs/git/wdg/noise/ui/slideshow/SlideshowFragment.kt deleted file mode 100644 index 0099f97..0000000 --- a/app/src/main/java/org/dnss/sfs/git/wdg/noise/ui/slideshow/SlideshowFragment.kt +++ /dev/null @@ -1,45 +0,0 @@ -package org.dnss.sfs.git.wdg.noise.ui.slideshow - -import android.os.Bundle -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import android.widget.TextView -import androidx.fragment.app.Fragment -import androidx.lifecycle.Observer -import androidx.lifecycle.ViewModelProvider -import org.dnss.sfs.git.wdg.noise.R -import org.dnss.sfs.git.wdg.noise.databinding.FragmentSlideshowBinding - -class SlideshowFragment : Fragment() { - - private lateinit var slideshowViewModel: SlideshowViewModel - private var _binding: FragmentSlideshowBinding? = null - - // This property is only valid between onCreateView and - // onDestroyView. - private val binding get() = _binding!! - - override fun onCreateView( - inflater: LayoutInflater, - container: ViewGroup?, - savedInstanceState: Bundle? - ): View? { - slideshowViewModel = - ViewModelProvider(this).get(SlideshowViewModel::class.java) - - _binding = FragmentSlideshowBinding.inflate(inflater, container, false) - val root: View = binding.root - - val textView: TextView = binding.textSlideshow - slideshowViewModel.text.observe(viewLifecycleOwner, Observer { - textView.text = it - }) - return root - } - - override fun onDestroyView() { - super.onDestroyView() - _binding = null - } -} \ No newline at end of file diff --git a/app/src/main/java/org/dnss/sfs/git/wdg/noise/ui/slideshow/SlideshowViewModel.kt b/app/src/main/java/org/dnss/sfs/git/wdg/noise/ui/slideshow/SlideshowViewModel.kt deleted file mode 100644 index 7581e93..0000000 --- a/app/src/main/java/org/dnss/sfs/git/wdg/noise/ui/slideshow/SlideshowViewModel.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.dnss.sfs.git.wdg.noise.ui.slideshow - -import androidx.lifecycle.LiveData -import androidx.lifecycle.MutableLiveData -import androidx.lifecycle.ViewModel - -class SlideshowViewModel : ViewModel() { - - private val _text = MutableLiveData().apply { - value = "This is slideshow Fragment" - } - val text: LiveData = _text -} \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_baseline_chat_24.xml b/app/src/main/res/drawable/ic_baseline_chat_24.xml new file mode 100644 index 0000000..26208ad --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_chat_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_baseline_settings_24.xml b/app/src/main/res/drawable/ic_baseline_settings_24.xml new file mode 100644 index 0000000..41a82ed --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_settings_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_menu_camera.xml b/app/src/main/res/drawable/ic_menu_camera.xml deleted file mode 100644 index 634fe92..0000000 --- a/app/src/main/res/drawable/ic_menu_camera.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/app/src/main/res/drawable/ic_menu_gallery.xml b/app/src/main/res/drawable/ic_menu_gallery.xml deleted file mode 100644 index 03c7709..0000000 --- a/app/src/main/res/drawable/ic_menu_gallery.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_menu_slideshow.xml b/app/src/main/res/drawable/ic_menu_slideshow.xml deleted file mode 100644 index 5e9e163..0000000 --- a/app/src/main/res/drawable/ic_menu_slideshow.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml index f3d9b08..5090604 100644 --- a/app/src/main/res/layout/fragment_home.xml +++ b/app/src/main/res/layout/fragment_home.xml @@ -6,17 +6,4 @@ android:layout_height="match_parent" tools:context=".ui.home.HomeFragment"> - \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_slideshow.xml b/app/src/main/res/layout/fragment_slideshow.xml deleted file mode 100644 index 2141a33..0000000 --- a/app/src/main/res/layout/fragment_slideshow.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - \ No newline at end of file diff --git a/app/src/main/res/menu/activity_main_drawer.xml b/app/src/main/res/menu/activity_main_drawer.xml index d7f2df2..7e52c49 100644 --- a/app/src/main/res/menu/activity_main_drawer.xml +++ b/app/src/main/res/menu/activity_main_drawer.xml @@ -6,15 +6,11 @@ + android:icon="@drawable/ic_baseline_chat_24" + android:title="@string/menu_chat" /> - + android:icon="@drawable/ic_baseline_settings_24" + android:title="@string/menu_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 af8e6ff..d3ec53b 100644 --- a/app/src/main/res/navigation/mobile_navigation.xml +++ b/app/src/main/res/navigation/mobile_navigation.xml @@ -8,18 +8,12 @@ - - \ 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 e9366b9..76f61e1 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -7,7 +7,7 @@ Navigation header Settings - Home - Gallery - Slideshow + Settings + Chat + test \ No newline at end of file