- Lessons from Angry Birds: My Thoughts on Android Game Tutorials
- Java Version of Super Star Trek
- Android Rotate and Scale Bitmap Example
- Making Promo Videos for Your Android App
- New Turn-based Space War App for Android
- Starship App Alpha Test
- 2013 in review
- Eclipse Debugging Fix for Nexus 7 and Galaxy Nexus
- Moving Views In Android - Part 2, Drag and Drop
- Drag-Drop for an Android GridView
- Android Images With Clickable Areas - Part 1
- How To Build A Dashboard User Interface In Android
- Multitouch Panning and Zooming Examples for Android
- Moving Views in Android - Part 1
- How To Build A Simple Help Screen in Android
- Horizontal Scrolling Pages of Images in Android
- Android Rotate and Scale Bitmap Example
- Moving Views In Android - Part 3, Drop Zones
- 549,399 hits
Tagsactivity android announcement app appengine asynctask authentication authorization avd best practices c2dm configuration css dashboard demo device drag-drop emulator example find fragment gae game game design gomoku google google accounts grid gwt gwt-presenter help how-to html text icons ics images inspiring introduction iphone iphone app java jpeg jpg keyboard lessons learned manifest mcgonigal mvp mvp example oauth pages performance permissions presentation preview problem scrolling source code space-war splash strategy tablet test tip tomcat topics touch Tridroid tutorial twitter twitter4j ui ui thread update video
- February 2014 (3)
- January 2014 (4)
- December 2013 (1)
- November 2013 (2)
- October 2013 (1)
- May 2013 (2)
- March 2013 (1)
- February 2013 (3)
- January 2013 (1)
- December 2012 (1)
- August 2012 (2)
- July 2012 (2)
- June 2012 (2)
- May 2012 (1)
- April 2012 (1)
- March 2012 (4)
- February 2012 (2)
- January 2012 (3)
- December 2011 (3)
- October 2011 (1)
- September 2011 (2)
- August 2011 (3)
- July 2011 (1)
- June 2011 (2)
- May 2011 (1)
- April 2011 (2)
- March 2011 (2)
- February 2011 (1)
- January 2011 (1)
- December 2010 (2)
- November 2010 (1)
- October 2010 (1)
- August 2010 (1)
- July 2010 (1)
- June 2010 (1)
- March 2010 (1)
- February 2010 (2)
- January 2010 (3)
- October 2009 (2)
Tag Archives: how-to
I built an Android demo app so I could test my understanding of displaying bitmaps on a canvas. I had done scaling of bitmaps, rotation of bitmaps, and translation from one origin to another, but I had not done more than one of those transformations at a time.
Full source code for the Android example is provided. Continue reading
I found a way to get debugging back for my Galaxy Nexus while running Eclipse on Windows 8. It was very annoying to go without using ADB for my Galaxy Nexus. I had about 3-4 months where Eclipse ADB would not detect my device. I would turn debugging on and off, reset ADB with kill-server, reinstall device drives, but got nowhere. … Fortunately, Google searches related to Nexus 7 and ADB got me to a Stack Overflow page that had the information I needed. What I needed was buried in one of the comments: “how to activate USB debugging for the NEW Nexus 7 on Windows 8″. Continue reading
I am working on a game that has items that players can buy from a store. I needed a way to display the list of items on the screen. I am using a StoreItemFragment to display them on the screen. In this blog post, I describe a demo app that I built that uses the fragment in a list of items for sale.
Each item for sale has a picture, a description, and a button to push to make the purchase. The image next to the purchase button indicates the currency used for the payment. In this demo, players pay in gold coins or crystals. I plan to use this Fragment for purchases made in the game with virtual currency, and I will use it with a second activity where the player can start an in-app purchase using real money to purchase game coins.
(Note: This is an excerpt of the blog article. Click the link for the full article, which includes screenshots, detailed explanations, and a link to the full source code.) Continue reading
I built two different views to show progress bars in Android. One is a horizontal progress bar and the other is a vertical progress bar, made up of a stack of horizontal bars. Here they are displayed in a demo app, running on a Galaxy Nexus phone.
For the horizontal progress, you can control the colors used, the width and height of the bar, and the number of divisions. For the vertical progress bar, I wanted it to look like a stack of bars. When you run the demo app, you can see the values change by touching a progress bar. Complete source code is provided below.
I have done some work so I better understand multitouch features in Android. I built a simple demo with examples of pinch zooming and panning. Most of the examples involve using drawing operations on the canvas of a view.
About two years ago, I started some work on moving images in Android. I started with the “Making Sense of Multitouch” blog article and ended up doing some simple things with moving images and then drag-drop based on the Android Launcher (see references for links). It’s interesting to me that I have gone back to that same article for a different purpose. I am working on apps where the basic zoom and pan operations are needed. Continue reading
In a new Android app I am working on, I have a need to display a a square grid of images. I have tried several variations of doing this using a GridView. Each of the solutions involves using aViewTreeObserver, which is something I would not have thought of on my own. Fortunately, I found several notes on StackOverflow that pointed me in the right direction.
I’ll describe three of the variations in this blog post. The end result for each variation is good: square images on a grid. My favorite variation is the one in which the sizes of the images are determined dynamically, based on the size of the screen. It requires the least amount of work and delivers good results.
Complete source code is provided for all three variations.
I found an interesting demo app on another blog and thought I would try it out on my phone. I downloaded the code, built the project, and then decided I’d package it as an apk file so I could share it easily in email. I sent it to myself and was ready to install it. I was a bit surprised to see a request for permissions. The app was requesting permission to modify SD card contents and to read phone state and identity.
Generally, it has been my policy not to install any Android app that asks for too much access to my Android device. Upon seeing this, I stopped. There was no reason for any permissions. A fix would certainly be easy, I thought.
It turns out it was, but it took me awhile to figure it out. My new simple rule for packaging apps: always specify the min SDK version in the manifest file.
I do Android development work using Eclipse. I work on a MacBook. Like many people doing Android development in Eclipse, I often start an application to run in the Emulator and then see nothing happen. Everything starts out fine. You receive the first few reassuring messages in the console window and then nothing.
The figures below show where it gets stuck. You start with something like Figure 1 and you get stuck with something like Figure 2. What I used to do is keep starting new devices until I get one that starts up correctly. Occasionally, I would restart all of Eclipse. Lately, I have found something that gets Eclipse properly connected to the emulator. I start a Terminal app on my Mac and reset the adb server. (I assume that using a command window in Windows 7 will also work.) That gets Eclipse, the Android Device Chooser, and Adb back in sync.