Ich habe ein Bild, wo die Breite größer als Höhe ist. Ich möchte das Bild in der Höhe anpassen und die Breite zuschneiden. Es sollte ascpectRatio speichern. Das Bild sollte in die Bildansicht passen. Ich habe versucht, android:scaleType="centerCrop"
Eigenschaften in XML, aber ich habe nicht das gleiche.Bild passt nicht in Höhe
Ich versuchte android:scaleType="fitXY" android:adjustViewBounds="true"
Könnten Sie mir bitte helfen? Unten ist die XML-Datei.
<android.support.constraint.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"
tools:context="riskmatix.be.bouwcampusvirtualtour.home.HomeActivity">
<ImageView
android:id="@+id/background_image"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="@drawable/day"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
posten Sie Ihre xml bitte –
und Post einen Screenshot match_parent wenn Sie – diegoveloper
@Vivek Sorry, I‘ ve added xml – sofi37