kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix gallery item aspect ratio in avatar picker.
rodzic
c9b6287702
commit
6801b5a1a3
|
@ -19,7 +19,6 @@ import org.thoughtcrime.securesms.mediasend.MediaFolder
|
||||||
import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader
|
import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader
|
||||||
import org.thoughtcrime.securesms.mms.GlideApp
|
import org.thoughtcrime.securesms.mms.GlideApp
|
||||||
import org.thoughtcrime.securesms.util.MediaUtil
|
import org.thoughtcrime.securesms.util.MediaUtil
|
||||||
import org.thoughtcrime.securesms.util.ThemeUtil
|
|
||||||
import org.thoughtcrime.securesms.util.adapter.mapping.LayoutFactory
|
import org.thoughtcrime.securesms.util.adapter.mapping.LayoutFactory
|
||||||
import org.thoughtcrime.securesms.util.adapter.mapping.MappingAdapter
|
import org.thoughtcrime.securesms.util.adapter.mapping.MappingAdapter
|
||||||
import org.thoughtcrime.securesms.util.adapter.mapping.MappingModel
|
import org.thoughtcrime.securesms.util.adapter.mapping.MappingModel
|
||||||
|
|
|
@ -4,9 +4,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/signal_colorSurfaceVariant"
|
android:background="@color/signal_colorSurfaceVariant">
|
||||||
tools:layout_height="95dp"
|
|
||||||
tools:layout_width="95dp">
|
|
||||||
|
|
||||||
<com.google.android.material.imageview.ShapeableImageView
|
<com.google.android.material.imageview.ShapeableImageView
|
||||||
android:id="@+id/media_gallery_image"
|
android:id="@+id/media_gallery_image"
|
||||||
|
|
|
@ -1,44 +1,40 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<com.google.android.exoplayer2.ui.AspectRatioFrameLayout 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:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/signal_colorSurfaceVariant">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<com.google.android.material.imageview.ShapeableImageView
|
||||||
|
android:id="@+id/media_gallery_image"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="0dp"
|
||||||
tools:layout_height="95dp"
|
android:importantForAccessibility="no"
|
||||||
tools:layout_width="95dp">
|
android:scaleType="centerCrop"
|
||||||
|
app:layout_constraintDimensionRatio="1:1"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:src="@drawable/test_gradient" />
|
||||||
|
|
||||||
<com.google.android.material.imageview.ShapeableImageView
|
<ImageView
|
||||||
android:id="@+id/media_gallery_image"
|
android:id="@+id/media_gallery_play_overlay"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="36dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="36dp"
|
||||||
android:importantForAccessibility="no"
|
android:importantForAccessibility="no"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
tools:src="@drawable/test_gradient" />
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:srcCompat="@drawable/v2_media_gallery_item_video_overlay" />
|
||||||
|
|
||||||
<ImageView
|
<View
|
||||||
android:id="@+id/media_gallery_play_overlay"
|
android:layout_width="0dp"
|
||||||
android:layout_width="36dp"
|
android:layout_height="0dp"
|
||||||
android:layout_height="36dp"
|
android:background="?selectableItemBackground"
|
||||||
android:importantForAccessibility="no"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:scaleType="centerCrop"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:srcCompat="@drawable/v2_media_gallery_item_video_overlay" />
|
|
||||||
|
|
||||||
<View
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:background="?selectableItemBackground"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
</com.google.android.exoplayer2.ui.AspectRatioFrameLayout>
|
|
Ładowanie…
Reference in New Issue