1
这是我试过的。但该按钮出现在卡的下方。有人可以告诉我怎样才能使卡上方的按钮可见。这表示回收商视图中的一行。如何在cardview上放置一半的按钮,并在父级布局上放置一半
<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"
xmlns:card_view="http://schemas.android.com/apk/res-auto">
<Button
android:layout_width="50dp"
android:layout_height="30dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="10dp"
/>
<android.support.v7.widget.CardView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/pList"
card_view:cardElevation="2sp"
android:layout_marginRight="16dp"
android:layout_marginLeft="16dp"
card_view:cardUseCompatPadding="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:layout_marginLeft="10dp"
>
</RelativeLayout>
</android.support.v7.widget.CardView>
</RelativeLayout>
谢谢。它的工作 –
很好的答案...非常困难的问题永远:) –