A custom view for displaying a network error view with beautiful and simple animation.
<humazed.github.com.NetworkErrorView
android:id="@+id/networkErrorView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
networkErrorView.show();
networkErrorView.hide();
don't use networkErrorView.setVisibility(View.VISIBLE);
available customization:
app:nev_message="new error message"
app:nev_messageColor="#FFD50000"
app:nev_imageTint="#FFD50000"
app:nev_retryText="Try again"
app:nev_retryBackground="#FFD50000"
app:nev_retryColor="#FFD50000"
Add this to your module's build.gradle
file (make sure the version matches the last release):
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
Add the dependency
dependencies {
// ... other dependencies
implementation 'com.github.humazed:NetworkErrorView:1.0.2'
}
Extracted and repackaged from Nick Butcher's Plaid App.