Thursday, 15 April 2010

How to use both DigitalClock and TextClock for android devices from API level 8 to 19? -



How to use both DigitalClock and TextClock for android devices from API level 8 to 19? -

i'm making application devices api level 8 19, contains clock. tried set digitalclock layout. , message eclipse class deprecated since api level 17, recommended utilize textclock. when set textclock, error message, because min level 8. how solve problem? should build 2 different applications?

option #1: utilize digitalclock in res/layout/ files , textclock in res/layout-v17/ files. in java code manipulates clocks, see clock implementation widget id , branch accordingly.

option #2: seek backport textclock using source code, can create own version works older api levels.

option #3: utilize digitalclock , hope that, while deprecated, google still back upwards it.

option #4: utilize neither class , create own clock implementation.

android

No comments:

Post a Comment