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:
- Created 9 years ago
- Comments:7 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Check this commit. https://github.com/liaohuqiu/android-Ultra-Pull-To-Refresh/commit/9bd60db3c50b5ccdb6d93756c97e0dc2c52dfc51
This is important: https://github.com/liaohuqiu/android-Ultra-Pull-To-Refresh/blob/9bd60db3c50b5ccdb6d93756c97e0dc2c52dfc51/ptr-demo/src/in/srain/cube/views/ptr/demo/ui/classic/WithListViewAndEmptyView.java#L83-L86
遇到了一样的问题,顺利解决,非常感谢二位