-1
作りたいGoogle PlayStore-like-CardView layout
です。しかし、私はカードビューを並べて配置するのではなく、上下にリストアップされています。CardViewsを隣に置くにはどうすればいいですか?
スクリーンショット:
cardview.xml:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
android:id="@+id/card_view"
android:layout_width="150dp"
android:layout_height="200dp"
android:layout_margin="5dp"
android:layout_gravity="center"
card_view:cardCornerRadius="2dp"
card_view:contentPadding="10dp"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:id="@+id/img_appicon"
android:layout_alignParentTop="true"
android:layout_alignLeft="@+id/tv_appname"
android:layout_alignStart="@+id/tv_appname" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="App Name"
android:id="@+id/tv_appname"
android:layout_below="@+id/img_appicon"
android:layout_centerHorizontal="true"
android:layout_marginTop="27dp" />
</RelativeLayout>
</android.support.v7.widget.CardView>
私はサイドバイサイドそれらCardViewsを置くことができますどのように任意のアイデア?
ありがとうございました。
私はまだ、あなたに知らせてくれるでしょう。 –
私はあなたの提案を試みましたが、上記のスクリーンショットでも同じことが起こります。上記の投稿コード –
は、私のために100%働いています。あなたのコードに合わせてIDを変更しました。 – Shreyans