Fix parent and child comments view.
Separated out parent comment and dm item view to reduce handling of view visibility. Added the likes in parent and matched styles with child comments.
This commit is contained in:
parent
8b2ac8de3b
commit
8e51773085
@ -7,9 +7,95 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:viewBindingIgnore="true">
|
tools:viewBindingIgnore="true">
|
||||||
|
|
||||||
<include
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/container"
|
android:id="@+id/container"
|
||||||
layout="@layout/layout_dm_inbox_item" />
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?android:selectableItemBackground"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<com.facebook.drawee.view.SimpleDraweeView
|
||||||
|
android:id="@+id/ivProfilePic"
|
||||||
|
android:layout_width="@dimen/simple_item_picture_size"
|
||||||
|
android:layout_height="@dimen/simple_item_picture_size"
|
||||||
|
android:padding="4dp"
|
||||||
|
app:actualImageScaleType="centerCrop"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:roundAsCircle="true" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tvUsername"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="marquee"
|
||||||
|
android:paddingStart="4dp"
|
||||||
|
android:paddingTop="2dp"
|
||||||
|
android:paddingEnd="4dp"
|
||||||
|
android:paddingBottom="2dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||||
|
android:textColor="?android:textColorPrimary"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/tvComment"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/ivProfilePic"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="username" />
|
||||||
|
|
||||||
|
<awais.instagrabber.customviews.RamboTextView
|
||||||
|
android:id="@+id/tvComment"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:autoLink="web|email"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:linksClickable="true"
|
||||||
|
android:paddingStart="4dp"
|
||||||
|
android:paddingTop="2dp"
|
||||||
|
android:paddingEnd="4dp"
|
||||||
|
android:paddingBottom="2dp"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/tvLikes"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/ivProfilePic"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvUsername"
|
||||||
|
tools:text="comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment " />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tvLikes"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingStart="4dp"
|
||||||
|
android:paddingTop="2dp"
|
||||||
|
android:paddingEnd="4dp"
|
||||||
|
android:paddingBottom="2dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/tvDate"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/ivProfilePic"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvComment"
|
||||||
|
tools:text="likes" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tvDate"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="marquee"
|
||||||
|
android:gravity="end"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
|
||||||
|
android:textStyle="italic"
|
||||||
|
app:layout_constraintBaseline_toBaselineOf="@id/tvLikes"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tvLikes"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvComment"
|
||||||
|
tools:text="long date................................" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/rvChildComments"
|
android:id="@+id/rvChildComments"
|
||||||
|
@ -1,111 +1,90 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
||||||
|
android:id="@+id/container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:paddingBottom="2dp">
|
||||||
android:paddingBottom="2dp"
|
|
||||||
tools:viewBindingIgnore="true">
|
|
||||||
|
|
||||||
<View
|
<com.facebook.drawee.view.SimpleDraweeView
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/ivProfilePic"
|
||||||
android:layout_height="1dp"
|
android:layout_width="50dp"
|
||||||
android:layout_gravity="bottom"
|
android:layout_height="50dp"
|
||||||
android:background="#00888888" />
|
app:actualImageScaleType="centerCrop"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/tvUsername"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:roundAsCircle="true" />
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/container"
|
android:id="@+id/tvUsername"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_gravity="start"
|
||||||
android:background="?android:selectableItemBackground"
|
android:paddingStart="4dp"
|
||||||
android:paddingLeft="4dp"
|
android:paddingTop="2dp"
|
||||||
android:paddingRight="4dp">
|
android:paddingEnd="4dp"
|
||||||
|
android:paddingBottom="2dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat"
|
||||||
|
android:textColor="?android:textColorPrimary"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/tvComment"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/ivProfilePic"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="username" />
|
||||||
|
|
||||||
<com.facebook.drawee.view.SimpleDraweeView
|
<awais.instagrabber.customviews.RamboTextView
|
||||||
android:id="@+id/ivProfilePic"
|
android:id="@+id/tvComment"
|
||||||
android:layout_width="50dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:layout_gravity="start"
|
||||||
app:actualImageScaleType="centerCrop"
|
android:autoLink="web|email"
|
||||||
app:roundAsCircle="true" />
|
android:clickable="true"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:focusable="true"
|
||||||
|
android:linksClickable="true"
|
||||||
|
android:paddingStart="4dp"
|
||||||
|
android:paddingTop="2dp"
|
||||||
|
android:paddingEnd="4dp"
|
||||||
|
android:paddingBottom="2dp"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/tvLikes"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/ivProfilePic"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvUsername"
|
||||||
|
tools:text="comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment comment " />
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/tvLikes"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:orientation="vertical">
|
android:layout_height="0dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:paddingStart="4dp"
|
||||||
|
android:paddingTop="2dp"
|
||||||
|
android:paddingEnd="4dp"
|
||||||
|
android:paddingBottom="2dp"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/tvDate"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/ivProfilePic"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvComment"
|
||||||
|
tools:text="likes" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/tvUsername"
|
android:id="@+id/tvDate"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="start"
|
android:gravity="end"
|
||||||
android:layout_weight="1.0"
|
android:singleLine="true"
|
||||||
android:ellipsize="marquee"
|
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
|
||||||
android:paddingStart="8dp"
|
android:textStyle="italic"
|
||||||
android:paddingLeft="8dp"
|
app:layout_constraintBaseline_toBaselineOf="@id/tvLikes"
|
||||||
android:paddingTop="4dp"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:paddingEnd="4dp"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:paddingRight="4dp"
|
app:layout_constraintStart_toEndOf="@id/tvLikes"
|
||||||
android:singleLine="true"
|
app:layout_constraintTop_toBottomOf="@id/tvComment"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat"
|
tools:text="date....." />
|
||||||
android:textColor="?android:textColorPrimary"
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
|
|
||||||
<awais.instagrabber.customviews.RamboTextView
|
|
||||||
android:id="@+id/tvComment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="start"
|
|
||||||
android:autoLink="web|email"
|
|
||||||
android:clickable="true"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:focusable="true"
|
|
||||||
android:linksClickable="true"
|
|
||||||
android:paddingLeft="8dp"
|
|
||||||
android:paddingTop="4dp"
|
|
||||||
android:paddingRight="8dp"
|
|
||||||
android:paddingBottom="8dp"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:weightSum="3.5">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/tvLikes"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:ellipsize="marquee"
|
|
||||||
android:paddingStart="4dp"
|
|
||||||
android:paddingLeft="4dp"
|
|
||||||
android:paddingTop="4dp"
|
|
||||||
android:paddingEnd="8dp"
|
|
||||||
android:paddingRight="8dp"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
|
||||||
android:textSize="12sp" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/tvDate"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="start"
|
|
||||||
android:layout_weight="2.5"
|
|
||||||
android:ellipsize="marquee"
|
|
||||||
android:gravity="end"
|
|
||||||
android:paddingStart="4dp"
|
|
||||||
android:paddingLeft="4dp"
|
|
||||||
android:paddingTop="4dp"
|
|
||||||
android:paddingEnd="8dp"
|
|
||||||
android:paddingRight="8dp"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textStyle="italic" />
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
Loading…
Reference in New Issue
Block a user