Custom Preference and Focus

by Shaun » Thu, 09 Oct 2008 11:30:05 GMT

Sponsored Links
 I have a custom preference that is a container with a slider (SeekBar)
and some text. How can I get the slider to take focus when the list
item is highlighted (I want it to take focus so the user can use the
trackball to move the slider).

I've tried listening to the ListViews selection changes but the
SeekBar always refuses my requestFocus() calls.



Custom Preference and Focus

by Jason Parekh » Thu, 09 Oct 2008 11:43:08 GMT

 Unfortunately the seek bar is missing trackball-functionality in 1.0.

If you still want to try to fit a slider inline with the preference, you
might use listView.setItemsCanFocus(false).  However, this may interfere
with CheckBoxPreferences.

Instead of this, I think you should pop up a DialogPreference with a seek
bar in there, similar to the brightness or volume settings.  It's one extra
level for the user to traverse, but it'll be a cleaner list of settings and
match the rest of the settings across the system.



Sponsored Links

Other Threads

1. [wts] Usb FlashDisk 4Gb android Limited Stock


mau nawarin USB Flashdisk Android  lucu bgt pastinya :),  sizenya 4Gb


Dimensions: 2.17 in x 1.73 in x 0.31 in (5.5 cm x 4.4 cm x 0.8 cm)
Weight: 1.45 oz (41 g)

bagi yg berminat dengan limited Sticker ini bisa menghubungi
ym :
telp : 085716712840


David L


2. HELP: Camera SGS Not Working

As subject camera ngga jalan ada warning " Security policy restrict
use of Camera " gimana ya supaya bisa jalan lagi ?Sekedar info
Firmware : 2.3.1
Baseband : I9000XXJPY
Kernel :
            was...@box #8
Build number : Darkys v8.0 Gingerbread edition


3. Market enabler

4. Aplikasi Piala Asia Qatar

5. App Add-on

6. Stolen Android phone

7. DNS WHOIS query support