summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2014-11-13 17:50:25 -0800
committerJeff Sharkey <jsharkey@android.com>2014-11-14 11:21:12 -0800
commitc9cd4b66263697ddc227b012d96a90ead8d21d92 (patch)
tree8f4df22a224d91fe4c7684ba2fa7d83d80e553d9 /res
parent2e368f6d87eb82691f855e93f85599b75b489731 (diff)
downloadHTMLViewer-c9cd4b66263697ddc227b012d96a90ead8d21d92.tar.gz
Modernize HTMLViewer, offer to decompress.
Spruce up the UI to match Material spec. We can also load file:// content directly instead of forcing through a ContentProvider. Since we're using this to show license content, try decompressing files that end in ".gz", but fall back to loading normally if it's not compressed. Let callers provide a window title. Bug: 18376908 Change-Id: I59ce02fb17fbe157239d365417a1a1e88e2a18d4
Diffstat (limited to 'res')
-rw-r--r--res/layout/main.xml35
1 files changed, 35 insertions, 0 deletions
diff --git a/res/layout/main.xml b/res/layout/main.xml
new file mode 100644
index 0000000..8a9f48a
--- /dev/null
+++ b/res/layout/main.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@*android:color/white">
+
+ <WebView
+ android:id="@+id/webview"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+ <ProgressBar
+ android:id="@+id/loading"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:indeterminate="true"
+ style="?android:attr/progressBarStyle" />
+
+</FrameLayout>