This example demonstrates the horizontal use of the progress dialog which is in fact a progress bar. It display a progress bar on pressing the button. To experiment with this example, you need to run this on an actual device after developing the application according to the steps below. Steps. Description. You will use Android studio to create an Android application under a package com.
Modify src/Main. Activity. Modify res/layout/activity. We assume, you have connected your actual Android Mobile device with your computer. To run the app from Android studio, open one of your project's activity files and click Run icon from the toolbar. Before starting your application, Android studio will display following window to select an option where you want to run your Android application. Select your mobile device as an option and then check your mobile device which will display following screen . After pressing, following screen would appear.