Add chat view

bubble_view
Thomas 2 years ago
parent 00a2f0b67a
commit d89c16b3ea

@ -17,6 +17,7 @@ package app.fedilab.android.mastodon.ui.drawer;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
@ -80,6 +81,23 @@ public class StatusDirectMessageAdapter extends RecyclerView.Adapter<RecyclerVie
holder.binding.date.setTextColor(ThemeHelper.getAttColor(context, textColor));
holder.binding.messageContent.setTextColor(ThemeHelper.getAttColor(context, textColor));
holder.binding.userName.setTextColor(ThemeHelper.getAttColor(context, textColor));
if (status.media_attachments != null && status.media_attachments.size() > 0) {
holder.binding.media.container.setVisibility(View.VISIBLE);
if (status.media_attachments.size() == 1) {
} else if (status.media_attachments.size() == 2) {
} else if (status.media_attachments.size() == 3) {
} else if (status.media_attachments.size() == 4) {
} else {
}
} else {
holder.binding.media.container.setVisibility(View.GONE);
}
}
@Override

@ -455,24 +455,17 @@
android:orientation="vertical"
android:visibility="gone" />
<HorizontalScrollView
android:id="@+id/attachments_list_container"
<include
android:id="@+id/media"
layout="@layout/layout_drawer_attachments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="48dp"
android:layout_marginTop="6dp"
android:layout_marginEnd="6dp"
android:visibility="gone">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/attachments_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingHorizontal="3dp"
android:scrollbars="horizontal" />
android:visibility="gone" />
</HorizontalScrollView>
<include
android:id="@+id/poll"

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

Loading…
Cancel
Save