Y
Y
yury_borisov72017-09-26 10:52:09
Android
yury_borisov7, 2017-09-26 10:52:09

How to remove listview?

Hello everyone
, here is the markup

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:background="@color/fon"
    android:id="@+id/container_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.baoyz.widget.PullRefreshLayout
        android:id="@+id/swipeRefreshLayout"
        android:layout_width="match_parent"
        android:background="@color/fon"
        android:cacheColorHint="#00000000"
        android:layout_height="wrap_content">
        <ListView
            android:layout_width="match_parent"
            android:id="@+id/fragment_list_view"
            android:divider="#f4efef"
            android:dividerHeight="1dp"
            android:layout_height="match_parent"/>
    </com.baoyz.widget.PullRefreshLayout>

</RelativeLayout>

for some reason, listview is not removed from container_main at all, I remove it
through removeAllView() and through removeView(), maybe from PullRefreshLayout

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tiberal, 2017-09-26
@Tiberal

Why remove the ListView? If you need to hide it use setVisibility()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question