Category «Android Advanced Concepts»

Dimming the System Bars in Android

The system bars are screen areas dedicated to the display of notifications, communication of device status, and device navigation. Typically the system bars (which consist of the status and navigation bars, as shown in figure 1) are displayed concurrently with your app. Apps that display immersive content, such as movies or images, can temporarily dim …

Accessibility Testing Checklist in Android

Testing is an important part of making your application accessible to users with varying abilities. Following design and development guidelines for accessibility are important steps toward that goal, but testing for accessibility can uncover problems with user interaction that are not obvious during design and development. This accessibility testing checklist guides you through the important …

Developing Accessible Applications in Android

Android has several accessibility-focused features baked into the platform, which make it easy to optimize your application for those with visual or physical disabilities. However, it’s not always obvious what the correct optimizations are, or the easiest way to leverage the framework toward this purpose. This lesson shows you how to implement the strategies and …

Handling Multi-Touch Gestures in Android

A multi-touch gesture is when multiple pointers (fingers) touch the screen at the same time. This lesson describes how to detect gestures that involve multiple pointers. Track Multiple Pointers When multiple pointers touch the screen at the same time, the system generates the following touch events: ACTION_DOWN—For the first pointer that touches the screen. This …

Animating a Scroll Gesture in Android

In Android, scrolling is typically achieved by using the ScrollView class. Any standard layout that might extend beyond the bounds of its container should be nested in aScrollView to provide a scrollable view that’s managed by the framework. Implementing a custom scroller should only be necessary for special scenarios. This lesson describes such a scenario: …

Tracking Movement in Android

This lesson describes how to track movement in touch events. A new onTouchEvent() is triggered with an ACTION_MOVE event whenever the current touch contact position, pressure, or size changes. As described in Detecting Common Gestures, all of these events are recorded in the MotionEvent parameter of onTouchEvent(). Because finger-based touch isn’t always the most precise …