]> gitweb.fperrin.net Git - Dictionary.git/blob - src/com/hughes/android/dictionary/HelpActivity.java
Put user's locale first in name.
[Dictionary.git] / src / com / hughes / android / dictionary / HelpActivity.java
1 // Copyright 2011 Google Inc. All Rights Reserved.\r
2 //\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
6 //\r
7 //     http://www.apache.org/licenses/LICENSE-2.0\r
8 //\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
14 \r
15 package com.hughes.android.dictionary;\r
16 \r
17 import com.hughes.util.StringUtil;\r
18 \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
23 \r
24 public final class HelpActivity extends Activity {\r
25   \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
29     return intent;\r
30   }\r
31 \r
32   /** Called when the activity is first created. */\r
33   @Override\r
34   public void onCreate(final Bundle savedInstanceState) {\r
35     setTheme(((DictionaryApplication)getApplication()).getSelectedTheme().themeId);\r
36 \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
42   }\r
43 \r
44 }\r