/*
* ShowHtml.java
*
*************************************************************************
* Copyright 2010 Christofer Engel
*
* 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.
*/
package com.rubika.aotalk;
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.MenuItem;
import com.google.analytics.tracking.android.EasyTracker;
import com.rubika.aotalk.util.Logging;
import com.rubika.aotalk.util.RKNet;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
public class Help extends SherlockActivity {
protected static final String APP_TAG = "--> The Leet :: Help";
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//super.setTheme(R.style.Theme_AOTalkTheme_Light);
setContentView(R.layout.activity_help);
final ActionBar bar = getSupportActionBar();
bar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
bar.setDisplayHomeAsUpEnabled(true);
WebView webView = (WebView) findViewById(R.id.webview);
webView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
webView.setBackgroundColor(0);
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) {
((View)webView.getParent()).setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}
webView.loadUrl(RKNet.RKNET_HELP_PATH);
}
@Override
protected void onStart() {
super.onStart();
try {
EasyTracker.getInstance().activityStart(this);
} catch (IllegalStateException e) {
Logging.log(APP_TAG, e.getMessage());
}
}
@Override
protected void onStop() {
super.onStop();
try {
EasyTracker.getInstance().activityStop(this);
} catch (IllegalStateException e) {
Logging.log(APP_TAG, e.getMessage());
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
finish();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
}