Android Community Forums - Entries for October 2009
Register Members List Social Groups Calendar Search Today's Posts Mark Forums Read


Go Back   Android Community Forums > Blogs


Old

Custom view component in a DialogPreference

Posted 10-12-2009 at 11:08 PM by divestoclimb

There are several sites out there (like these) that show you how to use Android preferences, but I haven't seen anyone explain how to extend DialogPreference to get your own custom preference stored. I had to dig into the Android source to figure this out since reading Google's documentation on DialogPreference is like reading Greek!

I did this twice in Gas Mixer; once using my NumberSelector component I explained in my last posts, and also with my TrimixSelector. Because the TrimixSelector,...
Has a life!
Posted in Uncategorized
Views 392 Comments 0 divestoclimb is offline
Old

Building reusable custom views, part 2

Posted 10-11-2009 at 07:09 PM by divestoclimb

This is a continuation from my last post. This gets into the complicated, annoying parts that are the result of some limitations in the Android framework.

Internal listeners
I'll omit most of the internals of my Button OnClickListener and TextWatcher implementations, except where there's something really strange going on. For instance, how I detect whether a value change came from the user or not (which I need to pass to my ValueChangedListener) is not easy.

...
Has a life!
Posted in Uncategorized
Views 250 Comments 0 divestoclimb is offline
Old

Building reusable custom views

Posted 10-11-2009 at 06:21 PM by divestoclimb
Updated 10-11-2009 at 10:29 PM by divestoclimb

It was waaay too hard to figure all of this out, and I documented some of the solution on anddev.org, but it's pretty complex so I thought I'd lay it out step-by-step for how I built a real Spinner widget in Android.

I wanted to build a special widget class that would show an EditText and two buttons for entering numeric values. The two buttons would be plus and minus buttons, allowing the user to adjust the value in the box by a set increment. The box itself needed to have enforced...
Has a life!
Posted in Uncategorized
Views 553 Comments 5 divestoclimb is offline
Old

Gas Mixer activity

Posted 10-11-2009 at 05:22 PM by divestoclimb

I've been putting a lot of time into Gas Mixer lately! I released v 2.0 and followed it up today with 2.5.

2.0 was a nearly complete rewrite of the interface. I've removed the OpenIntents sliders and replaced them with Android SeekBars, color-coded for oxygen and helium. I also made lots of UI changes to avoid scrolling at all costs. I came to realize on a mobile platform it's just as inconvenient to have to navigate to a new screen as it is to scroll down on a long one. Support for...
Has a life!
Posted in Uncategorized
Views 162 Comments 0 divestoclimb is offline
Old

My fitness hut blog how to avoid travel weight gain

Posted 10-06-2009 at 05:21 AM by xerocity

Some of you travel as much as 200 days a year! You have to get your eating under control or your
weight will quickly get out of control!

If you are a frequent flyer or driver, you know the food traps found in airport or roadside
restaurants! The food choices are usually high-calorie, high-carb and high-fat. And, you know how
much money you can waste at these food establishments. So, don't just plan and pack your clothes!
Plan and pack your foods also!
...
Probably spam
Posted in Uncategorized
Views 220 Comments 0 xerocity is offline

All times are GMT -5. The time now is 12:22 PM.



Copyright © 2008-2009 Android Community / R3 Media LLC, All Rights Reserved.