What Are the Different Types of Bars Available in Android?
Android is an open-source operating system, based on the Linux kernel and used in mobile devices like smartphones, tablets, etc. Further, it was developed for smartwatches and Android TV. Each of them has a specialized interface. Android has been one of the best-selling OS for smartphones. Android OS was developed by Android Inc. which Google bought in 2005. There are different types of bars available in android. Let’s discuss each bar in this article.
Types of Bars Available in Android
In Android for the same bar, different names are available. For example, the Action bar is now named Tool Bar, and sometimes it is also named as an app bar. So this creates confusion. We are going to try to overcome this confusion in this article.
- Status Bar
- Action Bar/Toolbar/App Bar
- System Bar/Android Navigation Bar
- Progress Bar
- Seek Bar
- Snackbar
- RatingBar
1. Status Bar
In an Android phone, the status bar contains the clock, battery icon, and other notification icons as shown in the below image. Most of the time, it is at the top of the screen. This is provided by the system; the app does not directly manipulate the contents of this bar.
Note: According to Google design guidelines; the height of the status bar is 24dp.
Below is a sample image to show where the status bar is present on an android device.
2. Action Bar/Toolbar/App Bar
- Action Bar: The action bar (sometimes referred to as the app bar), if it exists for an activity, will be at the top of the activity’s content area, typically directly underneath the status bar. It is a menu bar that runs across the top of the activity screen in android. Android ActionBar can contain menu items that become visible when the user clicks the “menu” button. In general, an ActionBar composed of the following four components:
- App Icon: App branding logo or icon will be shown here
- View Control: A dedicated space to display the Application title. Also provides the option to switch between views by adding spinner or tabbed navigation
- Action Buttons: Major actions of the app could be added here
- Action Overflow: All unimportant action will be displayed as a menu
- Toolbar: The toolbar was added in Android Lollipop (API 21) and is the successor of the ActionBar. The toolbar is a ViewGroup that can be put anyplace in the XML layouts. Toolbar’s looks and behavior could be more efficiently customized than the ActionBar. Toolbars are more flexible than ActionBar. One can simply change its color, size, and position. We can also add labels, logos, navigation icons, and other views to it.
- App Bar: The app bar, (also recognized as the action bar), is one of the most prominent design elements in the app’s activities because it gives a visual structure and interactive elements that are close to users. The most important functions of the app bar are as follows:
- A dedicated space for providing the app identification and showing the user’s location in the app.
- Entree to major actions in an expected way, like search.
- Assist with navigation and view switching.
Below is a sample image to show where the Action Bar/Toolbar/App Bar is present on an android device.
Note: There are some differences between these three confusing terms. We are going to discuss this in another article.
3. System Bar/Android Navigation Bar
The navigation or system bar contains the HOME, BACK, etc. buttons are. This is normally present on the opposite side of the screen of the status bar. Therefore it is usually present at the bottom of the screen. This is given by the system; the app doesn’t directly manage the contents of this bar. It also provides a menu for apps written for Android 2.3 or earlier. Below is a sample image to show where the System Bar/Android Navigation Bar is present on an android device.
4. Progress Bar
Android ProgressBar is a UI control that shows the progress of an operation. For example, downloading a file, uploading a file on the internet one can see the progress bar to view the time remaining in operation. There are two modes of progressBar:
- Determinate ProgressBar: In general, we use the Determinate progress mode in the progress bar because it displays the amount of progress that has happened like the (%) percentage of the file downloaded, how much data uploaded or downloaded on the internet, etc.
- Indeterminate ProgressBar: Here, we don’t get the idea of the progress of work means how much it has been completed or How long it will take to complete.
Below is a sample image of how the progress bar looks like.
5. Seek Bar
Android seek bar is a revised version of progressBar that has a draggable thumb in which the users can drag the thumb back and forth to set the current progress value. We can use the seek bar in our android device like Brightness control, volume control, etc. It is one of the essential UI elements that provides the option to choose the integer values within the defined range like 1 to 100. By dragging the thumb in SeekBar, we can slide back and forth to choose a value between the minimum and maximum integer value which we defined using the android:min and the android:max attributes. respectively. Below is a sample image of how the Seek Bar looks like.
6. Snackbar
Snackbar provides lightweight feedback about an operation. The message appears at the bottom of the screen on mobile and lower left on larger devices. Having a CoordinatorLayout in the view hierarchy provides Snackbar to facilitate specific features, such as swipe-to-dismiss and automatically moving of widgets. Snackbar is comparable to Toast but the only significant difference is that an action can be added with Snackbar. Below is a sample GIF of how the Snackbar looks like.
7. RatingBar
Android RatingBar is a user interface widget that is used to get the rating from the customers or users. It is an extension of SeekBar and ProgressBar that shows star ratings and it allows users to give the rating by clicking on the stars. In RatingBar, we can establish the step size using android:stepSize and it will always return a rating value as a floating-point number such as 1.0, 2.0, 2.5, etc. By using, android:numStars attribute one can define the number of stars in RatingBar. RatingBar is used to get ratings from users or customers about the product, movie or hotel experience, etc. Below is a sample image of how the RatingBar looks like.
Contact Us