https://github.com/santalu/empty-view
A view that displays state of screen like loading, error, empty
https://github.com/santalu/empty-view
android empty-view emptylayout emptyview errorview statelayout stateview
Last synced: about 2 months ago
JSON representation
A view that displays state of screen like loading, error, empty
- Host: GitHub
- URL: https://github.com/santalu/empty-view
- Owner: santalu
- License: apache-2.0
- Created: 2017-08-09T07:44:50.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-07T17:43:05.000Z (over 5 years ago)
- Last Synced: 2025-03-31T10:06:12.829Z (about 2 months ago)
- Topics: android, empty-view, emptylayout, emptyview, errorview, statelayout, stateview
- Language: Java
- Homepage:
- Size: 397 KB
- Stars: 379
- Watchers: 14
- Forks: 46
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EmptyView
[](https://jitpack.io/#santalu/emptyview) [](https://android-arsenal.com/details/1/6039) [](http://androidweekly.net/issues/issue-270) [](https://travis-ci.org/santalu/emptyview)
A view that displays states of screen like loadingType, error, empty etc.
## Samples
![]()
![]()
![]()
## Usage
### Gradle
```
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
```
```
dependencies {
implementation 'com.github.santalu:emptyview:1.3.6'
}
```### XML
```xml*** your content here ***
```
## Attributes
| Name | Value |
| ------------- |:-------------:|
| ev_gravity | top,center,bottom default center |
| ev_transition | slide, explode, fade default none |
| ev_font | reference |
| ev_titleTextSize | dimension |
| ev_textSize | dimension |
| ev_letterSpacing | dimension |
| ev_lineSpacingExtra | dimension |
| ev_lineSpacingExtraMultiplier | dimension |
| ev_buttonTextSize | dimension |
| ev_loading_type | circular default none |
| ev_loading_title | string |
| ev_loading_titleTextColor | color |
| ev_loading_text | string |
| ev_loading_textColor | color |
| ev_loading_drawable | reference |
| ev_loading_drawableTint | color |
| ev_loading_backgroundColor | color |
| ev_empty_title | string |
| ev_empty_titleTextColor | color |
| ev_empty_text | string |
| ev_empty_textColor | color |
| ev_empty_button | string |
| ev_empty_buttonTextColor | color |
| ev_empty_buttonBackgroundColor | color |
| ev_empty_drawable | reference |
| ev_empty_drawableTint | color |
| ev_empty_backgroundColor | color |
| ev_error_title | string |
| ev_error_titleTextColor | color |
| ev_error_text | string |
| ev_error_textColor | color |
| ev_error_button | string |
| ev_error_buttonTextColor | color |
| ev_error_buttonBackgroundColor | color |
| ev_error_drawable | reference |
| ev_error_drawableTint | color |
| ev_error_backgroundColor | color |## Notes
* Use `exclude(int... ids)` or `exclude(View... views)` methods to exclude views from visibility changes
* Use `include(int... ids)` or `include(View... views)` methods to include views for visibility changes## License
```
Copyright 2017 Fatih SantaluLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```