android - ExpandableListView 和滚动

标签 android

我有一个 ExpandableListView 和一个 Button。当我打开列表中的某些项目时,我无法访问该按钮,因为列表已展开。

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        >
        <ExpandableListView
                android:layout_height="wrap_content"
                android:layout_width="match_parent"
                android:id="@+id/expEnt"
                />
    <Button
            android:layout_height="wrap_content"
            android:layout_width="100dp"
            android:text="Plot"
            android:layout_below="@id/expEnt"
            android:layout_alignParentRight="true"/>
</RelativeLayout>

I can access the button I can't

有什么办法可以解决吗?

最佳答案

试试这个。这可能会对您有所帮助:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        >
        <ExpandableListView
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:id="@+id/expEnt"
                />
    <Button
            android:layout_height="wrap_content"
            android:layout_width="100dp"
            android:text="Plot"           
           android:layout_alignParentBottom="true"
            android:layout_alignParentRight="true"/>
</RelativeLayout>

关于android - ExpandableListView 和滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19244536/

相关文章:

java - SqlConnection 在连接测试时抛出错误

java - RecyclerView 问题

android - 未找到 ID 0x7f0e00d5 的 View (com.example.page :id/dialogViewpager) for fragment OneFragment{92c0220 #1 id=0x7f0e00d5 android:switcher:2131624149:0}

android - 如何为子项目或应用程序级别的 build.gradle 指定 gradle 版本

java - 我可以将一个字符串传递给一个函数并在引用 Firebase 时调用该字符串吗?

android - 更改 Android 谷歌地图的标记范围

android - 给 ClassCastException 的 ListView 的动画标题

android - Android中的数据库类似于iPhone中的plist

java - Android 查看后保存图像

android - 如何指定 AudioRecorder 对象的输入源?