Tutorial :Webview in a small window



Question:

Is it possible to make the webview stay as a small window, instead of get the full screen?


Solution:1

Of course... for example this will make a WebView appear next to a ListView:

<?xml version="1.0" encoding="utf-8"?>  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width="fill_parent"     android:layout_height="fill_parent"  >        <ListView      android:id="@android:id/list"      android:layout_width="fill_parent"       android:layout_height="fill_parent"      android:layout_weight="1"    />    <WebView      android:id="@+id/browser"      android:layout_width="fill_parent"       android:layout_height="fill_parent"      android:layout_weight="1"    />  </LinearLayout>  

Taken from a Mark Murphy example. By the way, Mark Murphy is the commonguy who answer this question some seconds ago.


Solution:2

A WebView is a widget like any other. You control its size via the layout you put it in.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »