Home » Android » core » ui


Android Settings Example

During the development of mobile applications, a common requirement is of storing app related data to the phone. In Android we perform this task with the help of Preference APIs. We may also need settings that allow users to modify preferences in app. Thankfully Android provides a powerful framework to manage user preferences. The provided mechanism allows us to show, save and manipulate user’s ...

Read More »

Android Physical Keys Example

Every Android device is provided with physical keys. In the wide variety of Android mobile devices, we may meet devices with three or four physical or virtual keys, however the default and most common pattern nowadays, are the three basic soft keys, which are the back button KEYCODE_BACK, the home button KEYCODE_HOME, and the menu button KEYCODE_MENU. Android devices, in ...

Read More »

Android SurfaceView Example

In Android, all simple layout views are all drawn on the same GUI thread which is also used for all user interaction. So if we need to update GUI rapidly or if the rendering takes too much time and affects user experience then we should use SurfaceView. The Android SurfaceView provides a dedicated drawing surface embedded inside of a view ...

Read More »

Android RadioGroup Example

RadioGroup is a widget in Android which groups RadioButtons. More specifically, the use of RadioGroup provides the capability of selecting only one RadioButton from the set. When the user chooses one RadioButton, the previous one that was selected, becomes automatically unchecked. In our example we are going to show you the use of RadioGroup in the Android apps.     ...

Read More »

Android Custom Components Example

Although Android provides us many built-in components, such as Button, TextView etc, it also offers us the opportunity to create our own custom widgets in order to adjust them to our needs and our requirements. Depending on the customization of the component, we can extend it to an existing built-in widget or to a class that we have created or ...

Read More »

Android Styles and Themes Example

Android gives us the opportunity to specify the format and the design of View components or screens of our app, by declaring some characteristics such as color, margin, text size etc. This is happening via a Style, which is a XML resource and it is separate from XML layouts. It isn’t wrong to say that a style is the Android’s ...

Read More »

Android Event Handling Example

Events represents a response to user’s interaction with input controls, such as press of a button or touch of the screen. Android framework places each occurring Event into a queue, which is based on FIFO (first-in first-out) logic. When an Event happens an Event Listener, which is involved with the View object, should be registered. Then, the registered Event Listener ...

Read More »

Android User Interface Controls Example

Input Controls are the View components in the user interface that the user can interact with. You can add as many as you want in your application, by declaring the appropriate XML elements in a XML layout file, which is placed in the res/layout directory of your project. In this example we are going to show the most common controls ...

Read More »

Android User Inteface Layout Example

Android Layout is a user interface for an Activity or a widget in an application, that handles the appearance of the UI components on the screen. You can specify Layouts with two ways: Declare an XML file in res/layout directory and then load it to your Activity or app widget. Android provides us XML vocabulary, which consists screen elements. Declare ...

Read More »

Android Alert Dialog Example

Sometimes in our applications we want to alert the user for an event and/or ask him/her about taking a decision. For this purpose AlertDialog class can be used, where a message and one, two or three buttons are displayed in a popup window. In this example, we are going to show an AlertDialog with three different buttons, where each one ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns