0

I set a webview so:

        <WebView
        android:id="@+id/webView1"
        android:layout_width="match_parent"
        android:layout_height="500px"
        android:layout_below="@+id/button1"
        android:layout_centerHorizontal="true" />

but is this correct? if the resolution of the Android phone change, I should perhaps give a height in units of percent instead in pixel?

Antilope
  • 443
  • 2
  • 6
  • 17

1 Answers1

3

I suggest you use DP since it would "fit" into any dimmension. These links could help you: What is the difference between "px", "dp", "dip" and "sp" on Android? and Supporting Multiple Screen Resolutions Android Developers

Community
  • 1
  • 1
Raykud
  • 2,488
  • 3
  • 21
  • 41