gpt4 book ai didi

android - recyclerview 下的按钮不可见

转载 作者:行者123 更新时间:2023-11-30 00:56:49 24 4
gpt4 key购买 nike

我正在使用 RecyclerView 和底部按钮编写应用程序。 RecyclerView 由我从服务器获取的图像填充。顶栏是固定的

http://joxi.ru/KAxee4XTEMpPr8

RecyclerView代码

<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>

RecyclerView 由 ImageViews 填充

 <ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="100dp"
android:scaleType="centerCrop"
android:layout_marginBottom="1dp"
android:layout_marginEnd="1dp"
android:layout_marginStart="1dp"
android:layout_marginTop="1dp" />

看不见的按钮代码

 <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="3">

<ru.noorsoft.rubkoff.HeButton
android:id="@+id/button1"
style="@style/leftButStyle"
android:layout_width="wrap_content"
android:layout_height="55dp"
android:layout_weight="1"
android:gravity="center"
android:textAllCaps="false"
android:textColor="@color/colorBlue"
android:textSize="20sp" />

<ru.noorsoft.rubkoff.HeButton
android:id="@+id/button2"
android:background="@android:color/transparent"
android:layout_width="wrap_content"
android:layout_height="55dp"
android:layout_weight="1"
android:textColor="@color/colorBlue"
android:textAllCaps="false"
android:textSize="20sp" />

<ru.noorsoft.rubkoff.HeButton
android:id="@+id/button3"
style="@style/rightButStyle"
android:layout_width="wrap_content"
android:layout_height="55dp"
android:layout_weight="1"
android:textColor="@color/colorBlue"
android:textAllCaps="false"
android:textSize="20sp" />

</LinearLayout>

最佳答案

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools">

<RelativeLayout
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- here goes the header -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="header"/>
</RelativeLayout>

<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:listitem="@android:layout/simple_gallery_item"
android:layout_below="@id/header"
android:clipToPadding="false"

android:paddingBottom="55dp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="55dp"
android:orientation="horizontal"
android:layout_alignParentBottom="true"
android:weightSum="3">

<ru.noorsoft.rubkoff.HeButton
android:id="@+id/button1"
style="@style/leftButStyle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:textAllCaps="false"
android:textColor="@color/colorBlue"
android:textSize="20sp" />

<ru.noorsoft.rubkoff.HeButton
android:id="@+id/button2"
android:background="@android:color/transparent"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:textColor="@color/colorBlue"
android:textAllCaps="false"
android:textSize="20sp" />

<ru.noorsoft.rubkoff.HeButton
android:id="@+id/button3"
style="@style/rightButStyle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:textColor="@color/colorBlue"
android:textAllCaps="false"
android:textSize="20sp" />
</LinearLayout>
</RelativeLayout>

关于android - recyclerview 下的按钮不可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40004120/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com