Programming and Personal Development

Alerting the android user

Android’s AlertDialog, just like Toasts, is  way of communicating timely information to the user. However, unlike Toast messages, they interrupt the user’s current activity and expect them to explicitly acknowledge the message. Android Dialog Lifecycle methods Dialog is the parent class for all types of dialogs in android including the AlertDialog. Before looking at theContinue Reading

Toasts in Android

Toast messages in android are a way to display a info level message such as “Battery low”/”Update successful” to the user. Toasts  however do not try to grab the attention of the user by explicitly asking for acknowledgement, meaning, they just silently pop-up without blocking the user’s current activity. display the required message and disappear. There isContinue Reading

Displaying options in your android app

Check Boxes and Radio buttons are another set of basic widgets for presenting data and choices to the user of your android application.  Both checkboxes and radio buttons have two states: checked and unchecked.  The difference is, checkboxes are standalone elements that can be toggled between checked and unchecked states whereas radio buttons once checkedContinue Reading

Adding Soft Keyboard to your android application

The input method framework (IMF) in android provides a seamless mechanism to handle textual input from the user.  For devices that do not have a physical keyboard, IMF automatically provides a soft/virtual keyboard whenever the user needs to input data ( say when the cursor is placed on a EditText element).  In addition android letsContinue Reading

Android Frame Layout

Frame Layout in android is useful layout for reserving an area of screen to display a single element.  Elements added subsequently to the layout are placed on top of each other like a deck of cards effectively hiding the elements below them unless they are transparent.  By default  the elements are placed on the topContinue Reading

Android Table layout

Table layout is a useful layout to display data as a set of rows and columns.  As mentioned in the android layouts overview, it contains a set of table rows each having its own set of elements to be rendered.   You cannot explicitly control the number of columns in the table, android decides it forContinue Reading

Android Relative Layout

The Android relative layout uses the relative positions of  the nearby elements and the  parent container to place elements on the screen. For example, you can do things like place element A  to left of  B or align the left side of elements  A and C  and so on. There are two types  of  propertiesContinue Reading

Android Linear Layout

As mentioned in the previous post, the android linear layout is a simple layout that places the elements linearly one after the other. There are 6 main properties that are available in the linear layout for manipulating the location of the elements on the screen. Orientation: This property decides if the elements within the layoutContinue Reading

4 useful android layouts for your next mobile app

Android provides layouts for grouping and arranging the widgets like Buttons, labels etc in the UI. Think of them as containers into which the individual widgets/elements and possibly other layouts (with their own set of  child elements) can be poured into and arranged to fit at the desired positions in the UI. There are severalContinue Reading

7 things you should know about Android Manifest xml file

The android application is made up of a number of loosely coupled components  viz.  activities, services, content providers and broadcast receivers.  The androidmanifest.xml file  at the root of   application folder, is the glue that lists these individual components together to form one cohesive application.  Lets take a quick look at main elements inside the manifest file.Continue Reading

Web Analytics