[英]How to add space between the Status bar and the Recyclerview card?
如何在狀態欄和recyclerview卡之間添加空格?
我的布局現在看起來像這樣: 當前布局
但是我希望我的布局像這樣: 我希望這個布局
我的XML檔案
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="16dp">
<ProgressBar
android:id="@+id/progressBarPayment"
style="?android:attr/progressBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerViewMessages"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</android.support.v7.widget.RecyclerView>
有人能幫我嗎?
在您的RecyclerView
添加填充/邊距
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerViewMessages"
android:paddingTop="8dp"
android:clipToPadding="false"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.