1 // Copyright 2011 Google Inc. All Rights Reserved.
\r
3 // Licensed under the Apache License, Version 2.0 (the "License");
\r
4 // you may not use this file except in compliance with the License.
\r
5 // You may obtain a copy of the License at
\r
7 // http://www.apache.org/licenses/LICENSE-2.0
\r
9 // Unless required by applicable law or agreed to in writing, software
\r
10 // distributed under the License is distributed on an "AS IS" BASIS,
\r
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
12 // See the License for the specific language governing permissions and
\r
13 // limitations under the License.
\r
15 package com.hughes.android.dictionary;
\r
17 import com.hughes.util.StringUtil;
\r
19 import android.app.Activity;
\r
20 import android.content.Intent;
\r
21 import android.os.Bundle;
\r
22 import android.webkit.WebView;
\r
24 public final class HelpActivity extends Activity {
\r
26 public static Intent getLaunchIntent() {
\r
27 final Intent intent = new Intent();
\r
28 intent.setClassName(HelpActivity.class.getPackage().getName(), HelpActivity.class.getName());
\r
32 /** Called when the activity is first created. */
\r
34 public void onCreate(final Bundle savedInstanceState) {
\r
35 setTheme(((DictionaryApplication)getApplication()).getSelectedTheme().themeId);
\r
37 super.onCreate(savedInstanceState);
\r
38 setContentView(R.layout.help_activity);
\r
39 final String html = StringUtil.readToString(getResources().openRawResource(R.raw.help));
\r
40 final WebView webView = (WebView) findViewById(R.id.helpWebView);
\r
41 webView.loadData(html, "text/html", "utf-8");
\r