Comments (2)
Hi, thank you for the feedback!
EmptyView now extends from ConstraintLayout. These issues may related to ConstraintLayout. Can you please share the layout that you are using emptyview with it.
I'll try my best to help you.
from empty-view.
Thank you for your response!
Here are the examples:
Fragment layout with empty view and RecyclerView:
`
<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/swipeToRefresh"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.santalu.emptyview.EmptyView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/empty_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ev_empty_buttonBackgroundColor="@color/background_gray"
app:ev_empty_buttonTextColor="@android:color/black"
app:ev_empty_drawable="@mipmap/app_icon"
app:ev_error_backgroundColor="@color/background_gray"
app:ev_error_text="Erro ao obter conteúdo"
app:ev_error_textColor="@android:color/black"
app:ev_font="@font/stag_semibold"
app:ev_loading="circular"
app:ev_loading_drawableTint="@color/colorPrimary"
app:ev_loading_title="A carregar..."
app:ev_transition="slide">
<android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rv_category"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical"
tools:listitem="@layout/item_category" />
</com.santalu.emptyview.EmptyView>
</android.support.v4.widget.SwipeRefreshLayout>`
Item :
`
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_marginTop="2dp"
app:layout_goneMarginBottom="2dp">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/selectableItemBackground"
android:orientation="horizontal">
<TextView
android:id="@+id/txtCategoryName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/text_margin"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginLeft="8dp"
android:layout_marginTop="8dp"
android:text="Category"
android:textAppearance="@style/TextMediumListHeader"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/userPhoto"
app:layout_constraintLeft_toRightOf="@+id/font_awesome"
app:layout_constraintTop_toTopOf="parent" />
<com.joanzapata.iconify.widget.IconTextView
android:id="@+id/font_awesome"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="8dp"
android:text="O"
android:textAppearance="@style/TextLarge"
android:textColor="@android:color/black"
android:textSize="36sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.523" />
<ImageView
android:id="@+id/userPhoto"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginBottom="8dp"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp"
android:src="@drawable/arrow"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
`
from empty-view.
Related Issues (15)
- Suggestion: EMPTY could have a button too
- set button text programmatically
- How to hide loading or errors? HOT 1
- EmptyView not working with SwipeRefreshLayout
- How to set text style to bold in ErrorTitle
- String resources conflict with mine.
- Please add proper documentation on how to use this in different scenarios
- How can I stop animation HOT 1
- Very simpathetic project
- Custom font support HOT 5
- Suggestion: Add Example to use this within a RecyclerView Adapter
- Vector drawable's issue on Android < Lollipop HOT 2
- 为什么emptyview里面再使用emptyview时showLoading不现实 HOT 2
- 像这样使用,第一个EmptyView使用showLoading()方法不显示 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from empty-view.