Ich habe ein Bild oben in einer Kartenansicht. Es hat einen kleinen (unerwünschten) Spielraum und ich weiß nicht warum ... Vielleicht kann mir jemand einen Hinweis geben, wie ich das beheben kann? Danke vielmals!Bild in Cardview hat Rand auf der rechten Seite
Wenn ich "adjustViewBounds" nicht verwende, funktioniert es. Aber ich brauche es für weitere Ansichten unter dem Bild.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/nature"
android:scaleType="fitStart"
android:adjustViewBounds="true"
android:id="@+id/exercise_picture"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Test"/>
</LinearLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>
statt xmlns: Werkzeuge = "http://schemas.android.com/tools" Verwendung xmlns: app = "http://schemas.android.com/apk/res-auto" – Amir