Fix issue #88 - Add icon indicators in notifications
This commit is contained in:
parent
6fb830aefe
commit
c80860c53a
|
@ -134,6 +134,18 @@ public class NotificationAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|||
});
|
||||
} else {
|
||||
StatusAdapter.StatusViewHolder holderStatus = (StatusAdapter.StatusViewHolder) viewHolder;
|
||||
holderStatus.bindingNotification.status.typeOfNotification.setVisibility(View.VISIBLE);
|
||||
if (getItemViewType(position) == TYPE_MENTION) {
|
||||
holderStatus.bindingNotification.status.typeOfNotification.setImageResource(R.drawable.ic_baseline_message_24);
|
||||
} else if (getItemViewType(position) == TYPE_STATUS) {
|
||||
holderStatus.bindingNotification.status.typeOfNotification.setImageResource(R.drawable.ic_baseline_message_24);
|
||||
} else if (getItemViewType(position) == TYPE_FAVOURITE) {
|
||||
holderStatus.bindingNotification.status.typeOfNotification.setImageResource(R.drawable.ic_baseline_star_24);
|
||||
} else if (getItemViewType(position) == TYPE_REBLOG) {
|
||||
holderStatus.bindingNotification.status.typeOfNotification.setImageResource(R.drawable.ic_baseline_repeat_24);
|
||||
} else if (getItemViewType(position) == TYPE_POLL) {
|
||||
holderStatus.bindingNotification.status.typeOfNotification.setImageResource(R.drawable.ic_baseline_poll_24);
|
||||
}
|
||||
StatusesVM statusesVM = new ViewModelProvider((ViewModelStoreOwner) context).get(StatusesVM.class);
|
||||
SearchVM searchVM = new ViewModelProvider((ViewModelStoreOwner) context).get(SearchVM.class);
|
||||
statusManagement(context, statusesVM, searchVM, holderStatus, this, null, notificationList, notification.status, Timeline.TimeLineEnum.NOTIFICATION, false);
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:layout_margin="6dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
|
@ -28,13 +28,30 @@
|
|||
android:orientation="vertical"
|
||||
android:padding="6dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title"
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="middle"
|
||||
android:singleLine="true"
|
||||
tools:text="User asked to follow you" />
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="middle"
|
||||
android:singleLine="true"
|
||||
tools:text="User asked to follow you" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="5dp"
|
||||
android:src="@drawable/ic_baseline_supervised_user_circle_24"
|
||||
android:tint="@color/cyanea_accent_reference" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -95,6 +95,7 @@
|
|||
android:src="@drawable/ic_person" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/status_pinned"
|
||||
android:layout_width="20dp"
|
||||
|
@ -104,6 +105,16 @@
|
|||
android:src="@drawable/ic_baseline_push_pin_24"
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/type_of_notification"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:tint="@color/cyanea_accent_reference"
|
||||
android:layout_width="20dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
|
|
Loading…
Reference in New Issue