Description
An android library that makes easy to check internet connection in one line and shows a custom layout if there is no internet with an animated picture and text asking the user to check the internet connection.
No Internet Layout Library alternatives and similar packages
Based on the "Network" category.
Alternatively, view No Internet Layout Library alternatives based on common mentions on social networks and blogs.
-
android-async-http
An asynchronous, callback-based Http client for Android built on top of Apache's HttpClient libraries. -
AndroidAsync
Asynchronous socket, http(s) (client+server) and websocket library for android. Based on nio, not threads. -
robospice
DISCONTINUED. Repo of the Open Source Android library : RoboSpice. RoboSpice is a modular android library that makes writing asynchronous long running tasks easy. It is specialized in network requests, supports caching and offers REST requests out-of-the box using extension modules. -
android-lite-http
LiteHttp is a simple, intelligent and flexible HTTP framework for Android. With LiteHttp you can make HTTP request with only one line of code! It could convert a java model to the parameter and rander the response JSON as a java model intelligently. -
Minimized API Service Library
Minimized API library which is used call the server request in andorid.
InfluxDB - Purpose built for real-time analytics at any scale.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of No Internet Layout Library or a related project?
README
No Internet Layout Library
Library to check internet connection and change layout to no internet layout if there is no internet.
Gradle:
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
dependencies {
implementation 'com.github.MohamedWessam:no-internet-layout:0.1.1'
}
Usage:
In Kotlin
NoInternetLayout.Builder(activity, R.layout.activity_main) //change activity_main with your layout
In Java
new NoInternetLayout.Builder(activity, R.layout.activity_main); //change activity_main with your layout
All available options
NoInternetLayout.Builder(activity, R.layout.activity_main) //change activity_main with your layout
.animate() //if you want to animate layout image
.mainTitle("your title") //add a title as a String or as Int from string.xml
.secondaryText("your text") //add a text as a String or as Int from string.xml
.buttonText("your text") //add a text as a String or as Int from string.xml
.setImage(R.drawable.your_image) //to add your own image
.setImage(LayoutImage.DINOSAUR) //to choose image from library images(see below picture for all images)
All available images
You can use setImage()
which take int as a parameter to set your own image from drawable resourse id.
Or use setImage()
which take LayoutImage
as a parameter to choose from library images (see below picture).
Check internet connection only
You can check internet connection easly without changing the layout by the help of isNetworkConnected()
which returns boolean.
NetworkChecker.isNetworkConnected(context)
License
Copyright 2019 Mohamed Wessam.
Licensed 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 at
http://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.
*Note that all licence references and agreements mentioned in the No Internet Layout Library README section above
are relevant to that project's source code only.