Android Dev: Threads and Handlers
{lang: 'en-GB'} The reason I had to use threads and handlers was that I wanted to perform an action whilst a button was pressed, that would stop when the button was released. First the Thread: public...
View ArticleAndroid Dev: Playing a MP3 from assets
{lang: 'en-GB'} Quick one today. I wanted to play an MP3 file from the assets folder. Here is the code: MediaPlayer mp = new MediaPlayer(); AssetFileDescriptor descriptor; descriptor =...
View ArticleAndroid Dev: Simple transition / animation between gradients
{lang: 'en-GB'} Android enables you to create drawble resources. These can be shapes, gradients, colid colours etc. The good thing about these resources is that they can scale to all screen sizes well....
View ArticleAndroid Dev: Translating strings.xml easily
{lang: 'en-GB'} First of all, best practice time, always use the strings.xml file to contain any text in your app… As we all know, the entire world does not speak or read English. To make your app more...
View ArticleAndroid Dev: Preference Activity
{lang: 'en-GB'} For some reason I have put off using the inbuilt Preference Activity in the Android SDK. Not sure why, but I was just daunted by it. It turns out that I had no reason at all to be...
View ArticleAndroid Dev: Simple Notification
{lang: 'en-GB'} OK, here’s a very simple implementation of a notification. NotificationManager notifier; Notification notification; static final int APP_ID = 0223; //v2 @Override protected void...
View ArticleAndroid Dev: Custom button with no PNG’s
{lang: 'en-GB'} There is no denying that PNG’s (and .9.png’s) are the way to go if you are graphically talented. I am not! I prefer using xml to define drawable shapes / gradient / and strokes. For a...
View ArticleAndroid Dev: Adding Google Analytics Tracking
{lang: 'en-GB'}First post in quite a while. Quick one, you can use Google Analytics to track use of your application. Here’s the quickest way using the EasyTracker. First download the Add this to your...
View ArticleAndroid Dev: Action Bar Sherlock
{lang: 'en-GB'}Action Bar Sherlock is a fantastic development by Jake Wharton. It is designed to build on the Android Compatibility Library (that makes Fragments available back to 1.6) and enables the...
View ArticleAndroid Dev: ActionBarSherlock + Tabs + ViewPager
{lang: 'en-GB'}My previous post gives a sample project that enables ActionBar Tab navigation and ViewPager enabling users to swipe to change tabs. Unfortunately using the same code with the Action Bar...
View Article
More Pages to Explore .....