From cc38fe5484f0f9076679c04e62c00186f8a0692a Mon Sep 17 00:00:00 2001 From: Peter Vacho Date: Sun, 5 Jan 2025 00:09:38 +0100 Subject: [PATCH] feat: Add button to manage categories on main bar --- .../neat_calendar/fragments/MainBarFragment.kt | 6 ++++++ app/src/main/res/layout/fragment_main_bar.xml | 11 +++++++++++ app/src/main/res/values/strings.xml | 1 + 3 files changed, 18 insertions(+) diff --git a/app/src/main/java/com/p_vacho/neat_calendar/fragments/MainBarFragment.kt b/app/src/main/java/com/p_vacho/neat_calendar/fragments/MainBarFragment.kt index 6527d93..0bf5427 100644 --- a/app/src/main/java/com/p_vacho/neat_calendar/fragments/MainBarFragment.kt +++ b/app/src/main/java/com/p_vacho/neat_calendar/fragments/MainBarFragment.kt @@ -9,6 +9,7 @@ import android.widget.ImageButton import androidx.fragment.app.Fragment import com.google.android.material.textview.MaterialTextView import com.p_vacho.neat_calendar.R +import com.p_vacho.neat_calendar.activities.CategoriesActivity import com.p_vacho.neat_calendar.activities.NotificationsActivity import com.p_vacho.neat_calendar.activities.SettingsActivity @@ -29,6 +30,11 @@ class MainBarFragment : Fragment() { startActivity(Intent(requireContext(), SettingsActivity::class.java)) } + val btnCategories = view.findViewById(R.id.btnCategories) + btnCategories.setOnClickListener { + startActivity(Intent(requireContext(), CategoriesActivity::class.java)) + } + val btnNotifications = view.findViewById(R.id.btnNotifications) btnNotifications.setOnClickListener { startActivity(Intent(requireContext(), NotificationsActivity::class.java)) diff --git a/app/src/main/res/layout/fragment_main_bar.xml b/app/src/main/res/layout/fragment_main_bar.xml index f991dea..115a193 100644 --- a/app/src/main/res/layout/fragment_main_bar.xml +++ b/app/src/main/res/layout/fragment_main_bar.xml @@ -42,6 +42,17 @@ android:padding="8dp" app:tint="?attr/colorOnPrimary" /> + + + Delete category Event Details Category Name + Open category management \ No newline at end of file