question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do I add listview with emptyview? the PtrFrameLayout only can host 2 elements

See original GitHub issue
<in.srain.cube.views.ptr.PtrClassicFrameLayout
    android:id="@+id/rotate_header_list_view_frame"
    xmlns:cube_ptr="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/white"
    cube_ptr:ptr_duration_to_close="200"
    cube_ptr:ptr_duration_to_close_header="1000"
    cube_ptr:ptr_keep_header_when_refresh="true"
    cube_ptr:ptr_pull_to_fresh="false"
    cube_ptr:ptr_ratio_of_header_height_to_refresh="1.2"
    cube_ptr:ptr_resistance="1.7">

    <ListView
        android:id="@+id/rotate_header_list_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/primary"
        android:divider="@null"
        android:fadingEdge="none"
        android:listSelector="@android:color/transparent"
        android:paddingLeft="12dp"
        android:paddingRight="12dp"
        android:scrollbarStyle="outsideOverlay"
        android:choiceMode="singleChoice" />

    <TextView
        android:id="@+id/empty"
        android:text="empty view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />
</in.srain.cube.views.ptr.PtrClassicFrameLayout>

the above code is wrong, because PtrFrameLayout only can host 2 elements? what can i do?

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Setting a layout to use as empty view for a ListView in case ...
The easiest way to get this done is to put the empty view in the main.xml layout ... android:text="Empty List,Click to add items">...
Read more >
Android custom listview with image and text - YouTube
In this tutorial you will learn how to create Android custom listview with image and text. The list will show the country names...
Read more >
Custom ListView-ListView with Image and Text in Android
In this video we will see how to implement list with images and ... view is just like simple listview but it has...
Read more >
Ultra Pull to Refresh for Android. Support all the views.
You can add a PtrUIHandler to PtrFrameLayout to implement any UI ... do I add listview with emptyview? the PtrFrameLayout only can host...
Read more >
How To Use A Layout As Empty View For A Listview When ...
How To Use A Layout As Empty View For A Listview When The Adapter Has Zero Elements Code Examples In this lesson, we'll...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found