tags:

views:

264

answers:

2

Hi,

I am trying to improve the layout for my game. The problem is that while I can create a

good layout for one android phone, it doesn't work for another, ie the trackball for MyTouch

is on the right side (landscape mode), but for the MyCliq, the DPad is on the left side. Is

there a way to programmatically set the layout based on which phone it is? Thanks.

+2  A: 

While not being programmatic, nor phone specific, you can supply alternative layout resources that are automatically loaded depend on whether the devide has a DPad or a trackball.

Stephen Denne
A: 

If you really wanted to do it on a device specific basis, perhaps android.os.Build.DEVICE would help.

http://developer.android.com/reference/android/os/Build.html#DEVICE

I haven't tried it but perhaps it will help

disretrospect