我正在玩新的 Android L SDK,但我不知道如何实现 CardView。好像我错过了一些东西 - 任何建议都非常感谢!
到目前为止,我已将以下声明作为我的活动的一部分:
<android.support.v7.widget.CardView
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_below="@+id/waitingHeader"
card_view:cardCornerRadius="4dp">
<LinearLayout
android:id="@+id/card_linear_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/notificationText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="hello"/>
<TextView
android:id="@+id/notificationTex"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="hello2"/>
</LinearLayout>
</android.support.v7.widget.CardView>
我天真地希望这会给我两张带有hello和hello2的卡片,但是我看到的只是一张带有hello的卡片——第二张卡片不见了。如何使用 CardView 创建多张卡片?