aptyp
aptyp

Reputation: 251

android, layout issue, 480x854

I have Checkbox and I setted paddingLeft="150dp" for a text, when I use phone with resolution 480x854 for example neo v, the checkbox is over text. layout it's fine for other resolutions.

In res I have only "layout". What is wrong? Why only for 480x854

Upvotes: 0

Views: 191

Answers (1)

Daniel Scocco
Daniel Scocco

Reputation: 7266

Don't use dp to position your views, as you are bound to have problems when switching devices. Instead use a RelativeLayout and its attributes, like android:layout_toLeftOf, android:layout_centerHorizontal and so on.

You can read more about RelativeLayouts here: http://developer.android.com/reference/android/widget/RelativeLayout.LayoutParams.html

Upvotes: 2

Related Questions