diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index f251297..9a53fa7 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -16,6 +16,9 @@ android:supportsRtl="true" android:theme="@style/Theme.NeatCalendar" tools:targetApi="31"> + diff --git a/app/src/main/java/com/p_vacho/neat_calendar/activities/NotificationsActivity.kt b/app/src/main/java/com/p_vacho/neat_calendar/activities/NotificationsActivity.kt new file mode 100644 index 0000000..9bb64de --- /dev/null +++ b/app/src/main/java/com/p_vacho/neat_calendar/activities/NotificationsActivity.kt @@ -0,0 +1,21 @@ +package com.p_vacho.neat_calendar.activities + +import android.os.Bundle +import androidx.activity.enableEdgeToEdge +import androidx.appcompat.app.AppCompatActivity +import androidx.core.view.ViewCompat +import androidx.core.view.WindowInsetsCompat +import com.p_vacho.neat_calendar.R + +class NotificationsActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + enableEdgeToEdge() + setContentView(R.layout.activity_notification) + ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets -> + val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars()) + v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom) + insets + } + } +} \ No newline at end of file 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 358ecec..6527d93 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.NotificationsActivity import com.p_vacho.neat_calendar.activities.SettingsActivity class MainBarFragment : Fragment() { @@ -17,21 +18,20 @@ class MainBarFragment : Fragment() { inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View { - // Inflate the layout for our new app settings bar return inflater.inflate(R.layout.fragment_main_bar, container, false) } override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) - // Optionally set the center text programmatically if needed - val titleText = view.findViewById(R.id.appBarTitle) - titleText.text = getString(R.string.app_name) // or "NeatCalendar" - - // Handle settings icon click → open the SettingsActivity - val settingsIcon = view.findViewById(R.id.settingsIcon) - settingsIcon.setOnClickListener { + val btnSettings = view.findViewById(R.id.btnSettings) + btnSettings.setOnClickListener { startActivity(Intent(requireContext(), SettingsActivity::class.java)) } + + val btnNotifications = view.findViewById(R.id.btnNotifications) + btnNotifications.setOnClickListener { + startActivity(Intent(requireContext(), NotificationsActivity::class.java)) + } } } \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_notification_bell.xml b/app/src/main/res/drawable/ic_notification_bell.xml new file mode 100644 index 0000000..928ad08 --- /dev/null +++ b/app/src/main/res/drawable/ic_notification_bell.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/layout/activity_notification.xml b/app/src/main/res/layout/activity_notification.xml new file mode 100644 index 0000000..7714bee --- /dev/null +++ b/app/src/main/res/layout/activity_notification.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_main_bar.xml b/app/src/main/res/layout/fragment_main_bar.xml index fab012f..f991dea 100644 --- a/app/src/main/res/layout/fragment_main_bar.xml +++ b/app/src/main/res/layout/fragment_main_bar.xml @@ -17,21 +17,40 @@ android:textSize="20sp" android:gravity="center_vertical" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintEnd_toStartOf="@+id/settingsIcon" + app:layout_constraintEnd_toStartOf="@+id/iconsContainer" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" /> - - + + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent"> + + + + + + + \ 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 a0d17a0..cfae891 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -46,4 +46,5 @@ Update Event Leave invited event Open Settings + Open Notifications \ No newline at end of file