-
Recent Posts
Recent Comments
- vidya on Toolbar overlapping listView
- wpadmin on SAX parser using AsyncTask to read xml file on net
- Free Stuff on SAX parser using AsyncTask to read xml file on net
- Crave Freebies on SAX parser using AsyncTask to read xml file on net
- wpadmin on Resources references from the manifest cannot vary by configuration
Archives
- September 2018
- July 2018
- June 2018
- October 2017
- July 2017
- June 2017
- May 2017
- April 2017
- March 2017
- December 2016
- June 2016
- March 2016
- February 2016
- November 2015
- May 2015
- January 2015
- April 2014
- March 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
Categories
Meta
Monthly Archives: June 2013
Avoid onItemSelected firing when spinner (or gallery) instantiated
Solutions (eg. see here) include counting the number of times the listener has fired usign a boolean to treat the first firing differently using a runnable to delay registering the listener. What seemed most appropriate (and simple) for me was … Continue reading
Posted in Android
Leave a comment
Get & set date / time and format
First tried this method: Calendar c = Calendar.getInstance(); int year, month, day, hour, minute; year = c.get(Calendar.YEAR); month = c.get(Calendar.MONTH) + 1; //months are 0-11 !! day = c.get(Calendar.DAY_OF_MONTH); hour = c.get(Calendar.HOUR_OF_DAY); minute = c.get(Calendar.MINUTE); String date1 = day + … Continue reading
Posted in Android
Leave a comment
Setting absolute position of view
Several useful comments in this question in stackoverflow. Key section fromAndy Zhang: You can use RelativeLayout. Let’s say you wanted a 30×40 ImageView at position (50,60) inside your layout. Somewhere in your activity: // Some existing RelativeLayout from your … Continue reading
Posted in Android
Leave a comment
New buttons
A quick and simple way to create a new button style is to add into the layout android:background=”@drawable/custom_button” and have that custom_button.xml file in the drawable folder. An example follows. <selector xmlns:android=”http://schemas.android.com/apk/res/android” > <item android:state_pressed=”true” > <shape> <gradient android:startColor=”@color/sf_brown_light” android:endColor=”@color/sf_brown_lighter” android:angle=”270″ … Continue reading
Posted in Android
Leave a comment
Runnable updates textview in debug but not when run live
Had an interesting problem with a timer and runnables. The final outcome was to have the game timer outside of the main game runnable. I’ll explain what happened and put the code at the end. I had a simple game … Continue reading
Posted in Android
Leave a comment