0
我想爲我的應用創建佈局。我已經嘗試創建,但我無法獲得所需的用戶界面。其實我更新鮮的android開發,我需要幫助提高我的android開發知識。 請在下面找到附件快照: 如何在Android中使用網格佈局創建回收視圖使用網格佈局
在此先感謝。
我想創建這種類型的佈局。 我已經在這裏創建它,這是我的代碼。 raw_layout.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/cvList"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground"
app:cardElevation="8dp"
app:cardUseCompatPadding="true">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="match_parent">
<!-- Your content here -->
<ImageView
android:id="@+id/ListImage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="230dp"
android:scaleType="center"
android:src="@mipmap/ic_launcher" />
<RelativeLayout
android:id="@+id/footerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:paddingBottom="@dimen/value_5dp"
android:paddingLeft="@dimen/value_15dp"
android:paddingRight="@dimen/value_15dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/overflow"
android:orientation="vertical">
<TextView
android:id="@+id/ListTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="ListTitle"
android:textSize="@dimen/value_15sp"
android:textStyle="bold" />
</LinearLayout>
</RelativeLayout>
</HorizontalScrollView>
</ScrollView>
</android.support.v7.widget.CardView>
my output is like that [my output][2]
謝謝您的指導。 :) @Akash –