Web browsing in a small window

Is it possible for the web view to remain a small window, and not get a full screen?

+3
source share
2 answers

Of course ... for example, this will lead to what WebViewappears next to 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 Mark Murphy 's Example . By the way, Mark Murphy is a common guy who answered this question a few seconds ago.

0
source

A WebView- widget, like any other. You control your size using the layout in which you placed it.

+1
source

Source: https://habr.com/ru/post/1754291/


All Articles