• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Single apps for different size devices

mindus

Lurker
Hi
I want to develop the application for different size devices. If i create any buttons are editfield it should change the size automatically depends upon screen size. how can we accomplish this?

Any idea...

Thanks
mindus
 
One way to achieve this:

1) Create method that calculates the actual physical screen size in inches (using the number of pixels, density, etc).

2) Use the above code in Activity's onCreate() method to set padding/fontsize/etc of all elements (buttons, etc) in the Activity.
 
Back
Top Bottom