THE BLOGS

blog10

A Quick Dive Into Android L Developer Preview

Android L is an upcoming Android mobile operating system developed by Google. The most prominent features of android L is “Material Design”. The improvements were also made in the notification system for the apps, widgets, views, security, performance, etc. The android L preview source is released for Nexus 5 and Nexus 7 Wi-Fi. So, here is a quick guide on the new features of Android operating system.

Android L is an upcoming Android mobile operating system developed by Google. The most prominent features of android L is “Material Design”. The improvements were also made in the notification system for the apps, widgets, views, security, performance, etc. The android L preview source is released for Nexus 5 and Nexus 7 Wi-Fi. So, here is a quick guide on the new features of Android operating system.

Material Design

Material Design is the new Android L’s User Interface which lets you apply material theme to your app. It also provides improved UI widgets to your apps. These widgets have a new design and touch animation that would improve the appearance of your apps.

Creating an app for Android L Developer Preview

If you already have an app and you want your app to be updated into Android L Developer Preview, design the new layouts for your existing app by specifying material design theme functionality and experience the new look and feel in your app. Suppose, you want to create a new app for Android L Developer Preview then you need to specify the material design functionality in order to apply it in your app.

Applying Material Design Theme to your App

Specify parent=”android:Theme.Material” in the style tag to apply the material design theme for your app:

Android Material Design Theme to the App

Layouts

To apply and customize the material theme functionality for your app, your layouts must agree on material design guidelines. While designing them for your app, you should be looking into the following:

  • Baseline grids
  • Keylines
  • Spacing
  • Touch target size
  • Layout structure

 

Views

You can create animations to your app that will affect changes in the elevation of a view by using translationZ property. Shadows can also be created for the app, and the value of elevation will let you know the size of its shadow.

Android L Application Views

UI Widgets

The two new widgets in Android L Developer Preview,

  • RecyclerView
  • CardView

RecyclerView: RecyclerView is the advance version of ListView. The RecyclerView is used if you have the lists with elements in your app that change dynamically. It contains the large set of views that can be recycled and scrolled efficiently in the apps. To use RecyclerView widget in your app, you should specify an adapter and a layout manager. To use a view for an app, a layout manager asks the adapter to for the content of the view from the dataset.

RecycleView

In order to add the RecycleView in your app :

RecycleView in Android L

CardView

CardView widgets are used for creating shadows and rounded corners in your app. Cards are created with a shadow using the android:elevation attribute. To set the corner radius in your apps, use the card_view:cardCornerRadius attribute. And the background color of a card for an app is set using the card_view:cardBackgroundColor attribute. In order to add the CardView in your app:

CardView in the app

Notifications from the apps

The main role of a notification system is to inform the user about the events that are happening in the app. For example, new message received from a friend or the weather details, reminder, etc. The apps should maintain a notification system in order to inform the user about the activities taking place in the background. In android L, App notifications are available even if the screen is locked and still the content is hidden behind. Users have a new presentation format for receiving the most important, high prioritized notifications such as “battery low” or an “incoming message”. You also have an option how to deal with them when you are busy inside another app.

Base Layouts

Base layout displays only the basic information about the notification from an app. Base Layouts normally includes a notification icon, refers the app from which the system has received the notification. The icon can also be the picture of the person if he/she has sent the message to the user. It also includes title with text, and timestamp.

Expanded Layout

These layouts let the user to specify more details for a notification of an app. In some cases the user will be able to read the entire message. For single event notifications, Android displays the notification in three different styles (text, inbox, and image)

Notifications in android

Actions

Android provides optional actions that user can perform once the notification is displayed from the app. Actions allow user to handle the tasks that are displayed in the notification area, hence the interactions with the apps is faster. The complexity increases as the number of actions increases. So limiting the number of apps will reduce the complexity.

 

Heads-up Notification

These notifications are of high priority and are presented to the user for a short period of time on the device. For example, user is running an app meanwhile he gets an incoming call or battery low notification.


Example of a Heads-up notification

Notifications on the lockscreen in Android L

The notifications from the apps are visible on the lock screen based on the privacy how user sets up. Even though the notifications from the apps are displayed on the lockscreen, content is still secure. User can hide the sensitive information from displaying to others. On calling Notification.Builder.setVisibility()we can specify the visibility level using one among the following values:

  • Notification.VISIBILITY_PUBLIC. This is the systems default visibility level if the visibility is left unspecified. Apps will be able to display the notification’s full content.
  • Notification.VISIBILITY_PRIVATE. The lockscreen will display the basic information such as icon, name of the app that posted it. Apart from that no other information is displayed. For example, An SMS app for example, whatsapp whose notifications include the text of the SMS and the sender’s name and contact icon. This notification should be VISIBILITY_PRIVATE.
  • Notification.VISIBILITY_SECRET. Shows only the most minimal information of the app.

Notifications on the lock screen

Conclusion

The design change in the android L is something you haven’t seen before in android phones. Everyone is excited about the new design called “Material Design”. The developers can go through the look and feel of their apps using Material Design functionality offered by Google. The release of the operating system is expected in the end of 2014. Android L improves the operating system’s appearance using shadows, light, etc. There are also many new animations which made the OS something different from the previous versions. Some more improvement that has been done is in lockscreen, homescreen, notifications, performance, security and battery life. Even though the operating system is not fully released, Developers have started working this new operating system for trying out developing their apps using the Android L SDK preview. Since this is not final, a lot of additional functionalities are expected from the Google until the final release.

Posted By :Aparajitha Murali