我尝试在里面使用PhotoِDarweeViewViewPager2
。当我想水平放大照片时,它不会放大,而是ViewPager2
滑动。
活动媒体视图:
<?xml version="1.0" encoding="utf-8"?>
<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:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
tools:context=".ui.MediaTopicActivity">
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/viewPager"
android:layout_width="0dp"
android:layout_height="match_parent"
app:layout_constraintBottom_toTopOf="@+id/title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/header"
tools:background="@drawable/one"
tools:layout_height="300dp" />
<!-- other views -->
</androidx.constraintlayout.widget.ConstraintLayout>
片段照片:
<?xml version="1.0" encoding="utf-8"?>
<me.relex.photodraweeview.PhotoDraweeView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" />