int dp = 2;final float scale = getResources().getDisplayMetrics().density;int dip = (int) (dp * scale + 0.5f);
Use this dip to declare size of your U.I. components & the size of that U.I. components will remain same in all android based phone. eg: Button button = new Button(); button.setWidth(20*dip); Hope this was the answer you were looking for... Regards: Tushar On Dec 19, 11:15 pm, lbendlin <[email protected]> wrote: > define "same size". Do you mean inches, pixels, or something in between? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

