notificaciones

This commit is contained in:
erik-everardo 2024-03-14 22:22:25 -06:00
parent 9667eafa49
commit 34f2c51f78
8 changed files with 48 additions and 9 deletions

View File

@ -47,11 +47,11 @@ android {
dependencies { dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3' coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
implementation 'androidx.core:core-ktx:1.10.1' implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.appcompat:appcompat:1.6.1'
implementation "androidx.recyclerview:recyclerview:1.3.1" implementation "androidx.recyclerview:recyclerview:1.3.2"
implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.core:core-ktx:1.10.1' implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.1' implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'
@ -73,10 +73,10 @@ dependencies {
// Material 3 // Material 3
implementation "com.google.android.material:material:1.9.0" implementation "com.google.android.material:material:1.11.0"
// Navigation // Navigation
def nav_version = "2.6.0" def nav_version = "2.7.7"
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version" implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version" implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
implementation "androidx.navigation:navigation-dynamic-features-fragment:$nav_version" implementation "androidx.navigation:navigation-dynamic-features-fragment:$nav_version"
@ -92,7 +92,7 @@ dependencies {
final def markwon_version = '4.6.2' final def markwon_version = '4.6.2'
// Customtabs // Customtabs
implementation 'androidx.browser:browser:1.7.0' implementation 'androidx.browser:browser:1.8.0'
implementation 'io.coil-kt:coil:2.5.0' implementation 'io.coil-kt:coil:2.5.0'
implementation 'io.coil-kt:coil-svg:2.5.0' implementation 'io.coil-kt:coil-svg:2.5.0'

View File

@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
<path android:fillColor="@android:color/white" android:pathData="M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21z"/>
</vector>

View File

@ -25,6 +25,7 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:labelVisibilityMode="unlabeled"
app:menu="@menu/home_menu" /> app:menu="@menu/home_menu" />

View File

@ -18,4 +18,15 @@
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipe_to_refresh"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -3,6 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
style="?attr/materialCardViewFilledStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="80dp" android:layout_height="80dp"
android:layout_marginHorizontal="8dp" android:layout_marginHorizontal="8dp"
@ -28,6 +29,8 @@
android:layout_height="25dp" android:layout_height="25dp"
app:layout_constraintBottom_toBottomOf="@+id/notification_main_image" app:layout_constraintBottom_toBottomOf="@+id/notification_main_image"
app:layout_constraintEnd_toEndOf="@+id/notification_main_image" app:layout_constraintEnd_toEndOf="@+id/notification_main_image"
android:background="@color/purple_lighter"
app:tint="@color/surface"
app:shapeAppearance="@style/ShapeAppearanceOverlay.Avatar" app:shapeAppearance="@style/ShapeAppearanceOverlay.Avatar"
tools:src="@drawable/baseline_image_24" /> tools:src="@drawable/baseline_image_24" />
@ -36,7 +39,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@+id/notification_message" app:layout_constraintBottom_toTopOf="@+id/notification_message"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toStartOf="@id/option_button"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@id/notification_main_image" app:layout_constraintStart_toEndOf="@id/notification_main_image"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
@ -52,13 +55,24 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toStartOf="@id/option_button"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@id/notification_main_image" app:layout_constraintStart_toEndOf="@id/notification_main_image"
app:layout_constraintTop_toBottomOf="@+id/notification_title" app:layout_constraintTop_toBottomOf="@+id/notification_title"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:maxLines="1" android:maxLines="1"
tools:text="Notification message" /> tools:text="Notification message" />
<com.google.android.material.button.MaterialButton
android:id="@+id/option_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?attr/materialIconButtonStyle"
app:icon="@drawable/baseline_more_horiz_24"
android:layout_marginEnd="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/delete_notification"
android:title="@string/delete"/>
</menu>

View File

@ -29,6 +29,6 @@
android:label="ProfileActivity" /> android:label="ProfileActivity" />
<fragment <fragment
android:id="@+id/searchFragment" android:id="@+id/searchFragment"
android:name="com.isolaatti.home.search.presentation.SearchFragment" android:name="com.isolaatti.search.ui.SearchFragment"
android:label="@string/search" /> android:label="@string/search" />
</navigation> </navigation>

View File

@ -195,4 +195,7 @@
<string name="like_notification_text">Tap this notification to go to the post.</string> <string name="like_notification_text">Tap this notification to go to the post.</string>
<string name="new_follower_notification_title">%s is now following you</string> <string name="new_follower_notification_title">%s is now following you</string>
<string name="new_follower_notification_text">Tap this notification to see their profile.</string> <string name="new_follower_notification_text">Tap this notification to see their profile.</string>
<string name="delete_notification">Delete notification</string>
<string name="delete_notification_dialog_message">Remove this notification?</string>
<string name="error_making_request">An error ocurred</string>
</resources> </resources>