| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
package com.android.test.uibench; |
| 17 |
|
| 18 |
import android.os.Bundle; |
| 19 |
import androidx.appcompat.app.AppCompatActivity; |
| 20 |
import android.webkit.WebView; |
| 21 |
|
| 22 |
public class ScrollableWebViewActivity extends AppCompatActivity { |
| 23 |
static String sHtml = "<body style=\"height:10000px;" |
| 24 |
+ "background:repeating-linear-gradient(white, black 10%)\"/>"; |
| 25 |
|
| 26 |
@Override |
| 27 |
protected void onCreate(Bundle savedInstanceState) { |
| 28 |
super.onCreate(savedInstanceState); |
| 29 |
|
| 30 |
WebView webView = new WebView(this); |
| 31 |
webView.loadData(sHtml, "text/html", null); |
| 32 |
webView.setVerticalScrollBarEnabled(true); |
| 33 |
setContentView(webView); |
| 34 |
} |
| 35 |
} |