summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/SelectDialog.java
diff options
context:
space:
mode:
authorLeon Scroggins III <scroggo@google.com>2010-08-17 16:58:15 -0400
committerLeon Scroggins III <scroggo@google.com>2010-08-18 10:36:12 -0400
commit8e4fbf1b26c2cc05a56ba2d4e7d1eda7d1574e91 (patch)
tree2692061cd11645619483d651d8d17f18a9accb81 /src/com/android/browser/SelectDialog.java
parentf9f87cde1af2a93b14a9ea0045f7b1c905a1a8f4 (diff)
downloadpackages_apps_Browser-8e4fbf1b26c2cc05a56ba2d4e7d1eda7d1574e91.tar.gz
packages_apps_Browser-8e4fbf1b26c2cc05a56ba2d4e7d1eda7d1574e91.tar.bz2
packages_apps_Browser-8e4fbf1b26c2cc05a56ba2d4e7d1eda7d1574e91.zip
Use ActionMode for Find-on-page and Copy.
Bug: 2641352 Change-Id: Ib5c0dd5997457a8d7b9a5c3e5a3727acc6a2f367
Diffstat (limited to 'src/com/android/browser/SelectDialog.java')
-rw-r--r--src/com/android/browser/SelectDialog.java85
1 files changed, 0 insertions, 85 deletions
diff --git a/src/com/android/browser/SelectDialog.java b/src/com/android/browser/SelectDialog.java
deleted file mode 100644
index 461127a5e..000000000
--- a/src/com/android/browser/SelectDialog.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * 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.android.browser;
-
-import android.provider.Browser;
-import android.view.LayoutInflater;
-import android.view.View;
-
-/* package */ class SelectDialog extends WebDialog {
- private View mCopyButton;
- private View mSelectAllButton;
- private View mShareButton;
- private View mFindButton;
-
- SelectDialog(BrowserActivity context) {
- super(context);
- LayoutInflater factory = LayoutInflater.from(context);
- factory.inflate(R.layout.browser_select, this);
- addCancel();
-
- mCopyButton = findViewById(R.id.copy);
- mCopyButton.setOnClickListener(mCopyListener);
- mSelectAllButton = findViewById(R.id.select_all);
- mSelectAllButton.setOnClickListener(mSelectAllListener);
- mShareButton = findViewById(R.id.share);
- mShareButton.setOnClickListener(mShareListener);
- mFindButton = findViewById(R.id.find);
- mFindButton.setOnClickListener(mFindListener);
- }
-
- private View.OnClickListener mCopyListener = new View.OnClickListener() {
- public void onClick(View v) {
- mWebView.copySelection();
- mBrowserActivity.closeDialogs();
- }
- };
-
- private View.OnClickListener mSelectAllListener = new View.OnClickListener() {
- public void onClick(View v) {
- mWebView.selectAll();
- }
- };
-
- private View.OnClickListener mShareListener = new View.OnClickListener() {
- public void onClick(View v) {
- String selection = mWebView.getSelection();
- Browser.sendString(mBrowserActivity, selection);
- mBrowserActivity.closeDialogs();
- }
- };
-
- private View.OnClickListener mFindListener = new View.OnClickListener() {
- public void onClick(View v) {
- String selection = mWebView.getSelection();
- mBrowserActivity.closeDialogs();
- mBrowserActivity.showFindDialog();
- mBrowserActivity.setFindDialogText(selection);
- }
- };
-
- /**
- * Called by BrowserActivity.closeDialog. Start the animation to hide
- * the dialog, and inform the WebView that the dialog is being dismissed.
- */
- @Override
- public void dismiss() {
- super.dismiss();
- mWebView.notifySelectDialogDismissed();
- }
-
-}