No Internet Dialog – With Code

Published by Kapil Mohan on

Dialog for displaying when internet is not available.

free android dialog design

Add dependency for support and card view, we are currently using v27.

Include permission for internet and network state, skip if already added.

Java class for handling displaying InternetDialog, if you want only designs skip this step

Invoke getInternetStatus() from this class to display noInternetDialog when internet is not available.

Place the below code in any activity.

create an xml file named dialog_no_internet.xml 


Include these values on corresponding files.




download drawables and place it in drawables folder.

Download Drawables

<!————-or do it manually ————>

  • Create a file in drawables folder as onboarding_button.xml

download no internet image and place it in drawables folder. (click to save image)

Project Information:

  • minSdk : 16
  • targetSdk: 27

Download Source Code

Kapil Mohan

Like to add color to developers life and apps. Can create smile using Android, iOS, PHP, codeignitor, web technologies, etc... Feel free to contact me at [email protected] .