In this blog, we have to create a No Internet Connection UI Layout to show details in an arranged view in Android Studio. We will provide the latest code UI/UX layout for the user, reliable for the Android App. Before creating the project, we have provided some assets to support its development. Implement the App Color Code in the "colors.xml" file.Here, we have to insert the color code to customise your application project. #FFBB86FC#FF6200EE#FF3700B3#FF03DAC5#FF018786#FF000000#FFFFFFFF Replace "Action Bar" with "No Action Bar". Implement the UI design layout code "bg.xml" given below. Insert assets into the No Internet Screen UI Layout. We need a LOGO and Text Image for this project. So, download Assets now. No Internet Animation LOGO Create a "custom_no_internet_dialog.xml" UI Design Layout. Implement a "NetworkUtill.java" File. public class NetworkUtil { public static String getNetworkState(Context context) { String status = null; ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); if (networkInfo != null) { if (networkInfo.getType() == ConnectivityManager.TYPE_MOBILE) { status = "Mobile Network Connected"; return status; } else if (networkInfo.getType() == ConnectivityManager.TYPE_WIFI) { status = "WIFI Network Connected"; return status; } } else { status = "No Internet Connected"; return status; } return status; }} Implement a "InternetCheckService.java" File. public class InternetCheckService extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { String status = NetworkUtil.getNetworkState(context); Dialog dialog = new Dialog(context, android.R.style.Theme_NoTitleBar_Fullscreen); dialog.setContentView(R.layout.custom_no_internet_dialog); CardView retry = dialog.findViewById(R.id.retryBtn); retry.setOnClickListener(v -> { ((Activity) context).finish(); Intent mainActivity = new Intent(context, MainActivity.class); context.startActivity(mainActivity); }); if (status.isEmpty() || status.equals("No Internet Connected")) { dialog.show(); Toast.makeText(context, status, Toast.LENGTH_SHORT).show(); } }} Implement a "MainActivity.java" File. Implement Variable Code in the Java File. BroadcastReceiver broadcastReceiver = null; broadcastReceiver = new InternetCheckService(); checkInternetConnection(); private void checkInternetConnection() { registerReceiver(broadcastReceiver, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION)); } @Override protected void onPause() { super.onPause(); unregisterReceiver(broadcastReceiver); } Output Result in Image View Given Below.