import org.xwalk.core.XWalkNavigationHistory;
import org.xwalk.core.XWalkPreferences;
import org.xwalk.core.XWalkResourceClient;
+import org.xwalk.core.XWalkUIClient;
import org.xwalk.core.XWalkView;
-import org.xwalk.core.XWalkWebChromeClient;
public class XWalkViewShellActivity extends FragmentActivity
- implements ActionBar.TabListener, XWalkViewSectionFragment.OnXWalkViewCreatedListener{
+ implements ActionBar.TabListener, XWalkViewSectionFragment.OnXWalkViewCreatedListener {
public static final String COMMAND_LINE_FILE = "/data/local/tmp/xwview-shell-command-line";
private static final String TAG = XWalkViewShellActivity.class.getName();
public static final String COMMAND_LINE_ARGS_KEY = "commandLineArgs";
}
@Override
- public void onPause() {
- super.onPause();
- mSectionsPagerAdapter.onPause();
- }
-
- @Override
- public void onResume() {
- super.onResume();
- mSectionsPagerAdapter.onResume();
- }
-
- @Override
public void onDestroy() {
super.onDestroy();
unregisterReceiver(mReceiver);
unregisterTracingReceiver();
- mSectionsPagerAdapter.onDestroy();
}
@Override
}
@Override
- public boolean onKeyUp(int keyCode, KeyEvent event) {
- if (mActiveView != null) {
- return mActiveView.onKeyUp(keyCode, event) || super.onKeyUp(keyCode, event);
- }
- return super.onKeyUp(keyCode, event);
- }
-
- @Override
public void onNewIntent(Intent intent) {
if (mActiveView != null) {
if (!mActiveView.onNewIntent(intent)) super.onNewIntent(intent);
}
});
- xwalkView.setXWalkWebChromeClient(new XWalkWebChromeClient(xwalkView) {
+ xwalkView.setUIClient(new XWalkUIClient(xwalkView) {
@Override
public void onReceivedTitle(XWalkView view, String title) {
mSectionsPagerAdapter.setPageTitle(view, title);