1
0
Fork 0
mirror of https://github.com/KokaKiwi/BarInsta synced 2026-03-05 12:01:35 +00:00

Various DM fixes (check description)

Use new download flow.
Fix blank space at top when scrolling.
Fix animated media.
This commit is contained in:
Ammar Githam 2020-11-04 23:58:06 +09:00
parent 850e119236
commit bdcb32395b
12 changed files with 151 additions and 82 deletions

View file

@ -1,17 +1,21 @@
<?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:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?actionBarSize"
android:orientation="vertical">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
android:layout_weight="1"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:layout_constraintBottom_toTopOf="@id/comment_container"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/messageList"
@ -21,8 +25,13 @@
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/comment_container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swipeRefreshLayout">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
@ -47,9 +56,7 @@
android:maxLength="2200"
android:maxLines="10"
android:paddingStart="8dp"
android:paddingLeft="8dp"
android:paddingEnd="4dp"
android:paddingRight="4dp"
android:scrollHorizontally="false" />
<androidx.appcompat.widget.AppCompatImageView
@ -61,11 +68,9 @@
android:clickable="true"
android:focusable="true"
android:paddingStart="4dp"
android:paddingLeft="4dp"
android:paddingTop="4dp"
android:paddingEnd="8dp"
android:paddingRight="8dp"
android:paddingBottom="4dp"
app:srcCompat="@drawable/ic_send_24" />
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<com.facebook.drawee.view.SimpleDraweeView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/ivAnimatedMessage"
android:layout_width="match_parent"
android:layout_height="@dimen/dm_media_img_max_height" />
android:layout_height="@dimen/dm_media_img_max_height"
app:actualImageScaleType="fitXY" />

View file

@ -1,6 +1,7 @@
<?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">
@ -11,7 +12,8 @@
android:layout_height="@dimen/profile_pic_size_regular"
android:layout_gravity="top|start"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp" />
android:layout_marginEnd="4dp"
tools:background="@mipmap/ic_launcher" />
<LinearLayout
android:id="@+id/content_container"
@ -27,8 +29,8 @@
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:text="@string/app_name"
android:textColor="?android:textColorPrimary" />
android:textColor="?android:textColorPrimary"
tools:text="@string/app_name" />
<androidx.cardview.widget.CardView
android:id="@+id/messageCard"
@ -37,7 +39,8 @@
android:foreground="?android:selectableItemBackground"
app:cardCornerRadius="@dimen/dm_message_card_radius"
app:cardElevation="2dp"
app:cardUseCompatPadding="true" />
app:cardUseCompatPadding="true"
tools:background="@mipmap/ic_launcher" />
<androidx.cardview.widget.CardView
android:id="@+id/liked_container"

View file

@ -6,10 +6,10 @@
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/ivMediaPreview"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:actualImageScaleType="fitCenter"/>
android:layout_gravity="center"
app:actualImageScaleType="fitXY" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/typeIcon"