1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-10 16:57:30 +00:00
BarInsta/app/src/main/res/layout/item_message_item.xml

256 lines
12 KiB
XML
Raw Normal View History

2020-07-01 17:08:28 +00:00
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
tools:viewBindingIgnore="true">
<awais.instagrabber.customviews.CircularImageView
android:id="@+id/ivProfilePic"
android:layout_width="@dimen/message_item_profile_size"
android:layout_height="@dimen/message_item_profile_size"
android:layout_gravity="top|start"
android:layout_marginStart="4dp"
android:layout_marginLeft="4dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvUsername"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:text="@string/app_name"
android:textColor="?android:textColorPrimary" />
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:foreground="?android:selectableItemBackground"
app:cardElevation="2dp"
app:cardPreventCornerOverlap="false">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- profile message -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="8dp">
<awais.instagrabber.customviews.CircularImageView
android:id="@+id/profileInfo"
android:layout_width="@dimen/profile_picture_size"
android:layout_height="@dimen/profile_picture_size" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/isVerified"
android:layout_width="18dp"
android:layout_height="18dp"
android:layout_gravity="top|start"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
app:srcCompat="@drawable/verified" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/profileInfoText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:textSize="16sp" />
</LinearLayout>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvFullName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
<!-- expired media message icon -->
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/mediaExpiredIcon"
android:layout_width="match_parent"
android:layout_height="?actionBarSize"
android:padding="8dp"
android:src="@drawable/expired"
android:visibility="gone" />
<!-- voice message -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/message_item_size"
android:orientation="horizontal"
android:paddingStart="4dp"
android:paddingLeft="4dp"
android:paddingEnd="4dp"
android:paddingRight="4dp"
android:visibility="gone">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:id="@+id/btnPlayVoice"
style="@style/PlayButtonCard"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginStart="2dp"
android:layout_marginLeft="2dp"
android:layout_marginEnd="2dp"
android:layout_marginRight="2dp"
android:foreground="?android:selectableItemBackground"
app:cardCornerRadius="36dp">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="28dp"
android:layout_height="28dp"
android:layout_gravity="center"
app:srcCompat="@android:drawable/ic_media_play" />
</androidx.cardview.widget.CardView>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvVoiceDuration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:textColorPrimary" />
</LinearLayout>
<awais.instagrabber.customviews.masoudss_waveform.WaveformSeekBar
android:id="@+id/waveformSeekBar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp" />
</LinearLayout>
<!-- media message (show above message) -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/ivMediaPreview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/typeIcon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="end|top"
android:layout_margin="8dp"
app:srcCompat="@drawable/video" />
</FrameLayout>
<!-- text message / description -->
<awais.instagrabber.customviews.RamboTextView
android:id="@+id/tvMessage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start|fill_horizontal"
android:padding="8dp"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="?android:textColorPrimary"
android:visibility="gone" />
<!-- link message (show below message) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/ivLinkPreview"
android:layout_width="@dimen/profile_picture_size"
android:layout_height="@dimen/profile_picture_size" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/profile_picture_size"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvLinkTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start|fill_horizontal"
android:ellipsize="end"
android:maxLines="1"
android:paddingStart="4dp"
android:paddingLeft="4dp"
android:paddingEnd="4dp"
android:paddingRight="4dp"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="?android:textColorPrimary" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvLinkSummary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start|fill_horizontal"
android:padding="4dp" />
</LinearLayout>
</LinearLayout>
<!-- animated media message -->
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/ivAnimatedMessage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone" />
<FrameLayout
android:id="@+id/btnInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/dm_profile_button_color"
android:foreground="?android:selectableItemBackground">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:gravity="center"
android:padding="4dp"
android:singleLine="true"
android:text="@string/open_profile"
android:textSize="16sp" />
</FrameLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
</LinearLayout>