"centerCrop"또는 "center"를 시도하면 이미지 뷰가 변경되지 않습니다. 이미지를자를 수 있도록 해결해야 할 문제는 무엇입니까? 내 코드를 참조이미지 뷰 자르기가 작동하지 않습니다.
<RelativeLayout 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"
tools:context="xx.myapplication.MainActivity">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/party"
android:scaleType="centerCrop" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="From. h"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_margin="8dp"
android:padding="8dp"
android:textSize="20sp"
android:textColor="#FFEBEE"
android:fontFamily="sans-serif-medium" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Happy Wednesday!!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_margin="8dp"
android:textSize="36sp"
android:textColor="@android:color/white"/>
</RelativeLayout>
이미지 :
항상 인라인 이미지의 "!" 다른 사람이 링크를 열지 않고도 이미지를 볼 수 있도록 이미지 링크 앞에 표시합니다. – EvilTak
@EvilTak 내가 "!" 이미지 링크 전에 시청자에게 클릭하도록 요청하는 대신이 페이지에 직접 이미지가 표시됩니다. – learningcur
예. 내 [편집] (https://stackoverflow.com/posts/47440001/revisions)을보십시오. – EvilTak