protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.history);

            _historyDataHelper = new HistoryDataHelper(this);

            ListAdapter = new SimpleCursorAdapter(this, Resource.Layout.history_item, getHistory(),
                                                  new string[] { "Title" },
                                                  new int[] { Resource.Id.page_title });
        }
Exemple #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.history);

            _historyDataHelper = new HistoryDataHelper(this);

            ListAdapter = new SimpleCursorAdapter(this, Resource.Layout.history_item, getHistory(),
                                                  new string[] { "Title" },
                                                  new int[] { Resource.Id.page_title });
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            RequestWindowFeature(WindowFeatures.Progress);

            SetContentView(Resource.Layout.main);

            _historyDataHelper = new HistoryDataHelper(this);

            _urlText           = FindViewById <EditText>(Resource.Id.url);
            _urlText.KeyPress += _urlText_KeyPress;

            FindViewById <Button>(Resource.Id.go_button).Click += delegate { updateBrowser(); };

            _browser = FindViewById <WebView>(Resource.Id.browser);
            _browser.Settings.JavaScriptEnabled = true;
            _browser.SetWebViewClient(new CustomWebViewClient(_urlText));
            _browser.SetWebChromeClient(new CustomWebChromeClient(this, _historyDataHelper));
            _browser.Touch += (sender, args) => _browser.RequestFocus(FocusSearchDirection.Down);

            goToHomePageIfSet();
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            RequestWindowFeature(WindowFeatures.Progress);

            SetContentView(Resource.Layout.main);

            _historyDataHelper = new HistoryDataHelper(this);

            _urlText = FindViewById<EditText>(Resource.Id.url);
            _urlText.KeyPress += _urlText_KeyPress;

            FindViewById<Button>(Resource.Id.go_button).Click += delegate { updateBrowser(); };

            _browser = FindViewById<WebView>(Resource.Id.browser);
            _browser.Settings.JavaScriptEnabled = true;
            _browser.SetWebViewClient(new CustomWebViewClient(_urlText));
            _browser.SetWebChromeClient(new CustomWebChromeClient(this, _historyDataHelper));
            _browser.Touch += (sender, args) => _browser.RequestFocus(FocusSearchDirection.Down);

            goToHomePageIfSet();
        }
 public CustomWebChromeClient(Activity context, HistoryDataHelper historyDataHelper)
 {
     _context = context;
     _historyDataHelper = historyDataHelper;
 }
Exemple #6
0
 public CustomWebChromeClient(Activity context, HistoryDataHelper historyDataHelper)
 {
     _context           = context;
     _historyDataHelper = historyDataHelper;
 }