Bitte vollständig lesen - Nun, ich weiß nicht, was hier falsch gelaufen ist. Jeder der CardView
Bottom ist nicht zu seinem Elternteil.android: cardView width stimmt nicht mit dem übergeordneten überein
Ich versuche Hintergrund RecyclerView
hinzuzufügen und transparenten Hintergrund CardView
custom_row-Code zu machen -
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.CardView
android:id="@+id/cardView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:foreground="?android:attr/selectableItemBackground"
card_view:cardCornerRadius="@dimen/card_album_radius">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingBottom="7.5dp"
android:paddingTop="7.5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/imageView1"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_centerInParent="true"
android:src="@drawable/ic_action_movie" />
</RelativeLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:layout_weight="0.75"
android:orientation="vertical">
<TextView
android:id="@+id/playList_name"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="16dp"
android:ellipsize="end"
android:maxLines="1"
android:text="SongName"
android:textAppearance="@style/Base.TextAppearance.AppCompat.Title"
android:textColor="#c1c1c1"
android:textSize="16sp" />
<TextView
android:id="@+id/album_artist"
android:layout_width="240dp"
android:layout_height="wrap_content"
android:layout_below="@id/playList_name"
android:layout_marginLeft="16dp"
android:layout_weight="0.25"
android:ellipsize="end"
android:maxLines="1"
android:text="ARTIST"
android:textColor="#a1a1a1"
android:textIsSelectable="false"
android:textSize="12sp" />
</LinearLayout>
<ImageView
android:id="@+id/my_overflow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_weight="1.4"
android:paddingRight="16dp"
android:scaleType="fitEnd"
android:src="@drawable/ic_grade" />
</LinearLayout>
</RelativeLayout>
</android.support.v7.widget.CardView></LinearLayout>
Und hier ist song_fragment.xml -
<FrameLayout 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"
tools:context="com.example.ansh.albums.Fragments.Songs">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
Hier ist das Ergebnis, das ich habe - image
Ich weiß nicht, warum jeder der cardView nicht, um es passend ist unten Mutterbreite?
Bitte helfen.!
versuchen Höhe auf 0 innerhalb cardView Einstellung – Aditi
Es hat @Aditi nicht geholfen –
Sie Karte Höhe oder Breite entsprechen? Sie wollen nicht die Trennlinie zwischen den Karten? – Max