feat: Add button to manage categories on main bar
This commit is contained in:
parent
03e7021c1a
commit
cc38fe5484
|
@ -9,6 +9,7 @@ import android.widget.ImageButton
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import com.google.android.material.textview.MaterialTextView
|
import com.google.android.material.textview.MaterialTextView
|
||||||
import com.p_vacho.neat_calendar.R
|
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.NotificationsActivity
|
||||||
import com.p_vacho.neat_calendar.activities.SettingsActivity
|
import com.p_vacho.neat_calendar.activities.SettingsActivity
|
||||||
|
|
||||||
|
@ -29,6 +30,11 @@ class MainBarFragment : Fragment() {
|
||||||
startActivity(Intent(requireContext(), SettingsActivity::class.java))
|
startActivity(Intent(requireContext(), SettingsActivity::class.java))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val btnCategories = view.findViewById<ImageButton>(R.id.btnCategories)
|
||||||
|
btnCategories.setOnClickListener {
|
||||||
|
startActivity(Intent(requireContext(), CategoriesActivity::class.java))
|
||||||
|
}
|
||||||
|
|
||||||
val btnNotifications = view.findViewById<ImageButton>(R.id.btnNotifications)
|
val btnNotifications = view.findViewById<ImageButton>(R.id.btnNotifications)
|
||||||
btnNotifications.setOnClickListener {
|
btnNotifications.setOnClickListener {
|
||||||
startActivity(Intent(requireContext(), NotificationsActivity::class.java))
|
startActivity(Intent(requireContext(), NotificationsActivity::class.java))
|
||||||
|
|
|
@ -42,6 +42,17 @@
|
||||||
android:padding="8dp"
|
android:padding="8dp"
|
||||||
app:tint="?attr/colorOnPrimary" />
|
app:tint="?attr/colorOnPrimary" />
|
||||||
|
|
||||||
|
<!-- Categories Icon -->
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/btnCategories"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:contentDescription="@string/open_categories"
|
||||||
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
|
android:src="@drawable/ic_tag"
|
||||||
|
android:padding="8dp"
|
||||||
|
app:tint="?attr/colorOnPrimary" />
|
||||||
|
|
||||||
<!-- Settings Icon -->
|
<!-- Settings Icon -->
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/btnSettings"
|
android:id="@+id/btnSettings"
|
||||||
|
|
|
@ -86,4 +86,5 @@
|
||||||
<string name="delete_category">Delete category</string>
|
<string name="delete_category">Delete category</string>
|
||||||
<string name="event_details">Event Details</string>
|
<string name="event_details">Event Details</string>
|
||||||
<string name="category_name">Category Name</string>
|
<string name="category_name">Category Name</string>
|
||||||
|
<string name="open_categories">Open category management</string>
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in a new issue