To inflate SlidingDrawer from XML, create our SlidingDrawer, /res/layout/horizontalslidingdrawer.xml. <?xml version="1.0" en...
Home » Archive for May 2012
6:44 AM
Implement Search interface
In this exercise, we will implement search interface on our activity, without actual searching function. When user press the Search button, ...
6:44 AM
Lifecycle of Fragment: onCreate(), onCreateView() and onPause().
A fragment can be thinked as a modular section of an activity, which has its own lifecycle, receives its own input events, and which you can...
6:44 AM
Count Down Timer
Android provide a android.os.CountDownTimer. By new a CountDownTimer object, and overriding the call-back function onTick() and onFinish(), ...
6:44 AM
Show as Action Item with icon
Modify from last article " Add and respond Action Items on Action Bar ", we can display individual item seperately on with icon, i...
6:43 AM
java.lang.RuntimeException: autoFocus failed
Refer to the last exercise " Android 4 Face Detection: setFocusAreas() using face detected faces ", it will throw java.lang.Runtim...
6:43 AM
Display text on a specified location in a custom View
Last exercise " Get color on a specified location from ImageView's background bitmap " display text in a TextView on a fixed l...
6:43 AM
Prepare Java Build Path to osmdroid and slf4j-android libs for OpenStreetMapView
Download current osmdroid-android-3.0.8.jar and slf4j-android-1.5.8.jar . Create a new Android project with API level higher than 1.5, An...
6:43 AM
Obtaining user location
To obtain user location, retrieve LocationManager by calling getSystemService(Context.LOCATION_SERVICE). By the LocationManager, you can reg...
Wednesday, May 23, 2012
Map the touch position with a mask, version II.
In the last exercise " Map the touch position with a mask ", I tried to map a touched position from screen to a mask bitmap. It...
9:40 AM
Display scrollable ImageView bigger than screen
To display image bigger than the device screen, in true size, with scroll bar. We can embed it in a ImageView within nested ScrollView and H...
9:40 AM
Passing object in Drap And Drop using myLocalState
Last exercise demonstrate the basic logic flow of Drap And Drop operation. We can pass object from the Drap And Drop source to the target u...
9:39 AM
Upcoming MotoDev Podcast -- Enterprise App Security: Android & HTML5
Enterprise App Security Podcast: Android & HTML5 April 25, 2012 - 9am to 10am PDT Live audio podcast on enterprise app security as d...
9:39 AM
android.os.NetworkOnMainThreadException
Refer to my old exercise " Read Text file from internet, using Java code ": it a simple exercise to read something from internet. ...
9:39 AM
Map the touch position with a mask
In previous exercise, I show how to: - Detect touched position on a ImageView - Get color on a specified location from ImageView's bac...
Tuesday, May 22, 2012
HelloGallery, read picture files from SD, display in ImageView, and set as Wallpaper
Modify the exercise " HelloGallery, read picture files from SD, display in ImageView ". When user click on the displayedImageView,...
10:39 AM
Play audio using MediaPlayer
To play audio in Android, we can use MediaPlayer. Base on the audio file from last exercise " Start audio recording with intent of Medi...
10:39 AM
Start audio recording with intent of MediaStore.Audio.Media.RECORD_SOUND_ACTION
package com.exercise.AndroidIntentAudioRecording; import android.app.Activity; import android.content.Intent; import android.net.Uri; imp...
10:38 AM
Scan Bluetooth Devices
To start scan bluetooth device, simple call bluetoothAdapter.startDiscovery(). In order to receive the list of found bluetooth devices, we...
Subscribe to:
Posts (Atom)