OSDN Git Service

Deprecate fill_parent and introduce match_parent.
[android-x86/packages-apps-Browser.git] / src / com / android / browser / FindDialog.java
index 2049bd0..e8d2417 100644 (file)
@@ -18,10 +18,7 @@ package com.android.browser;
 
 import android.app.Dialog;
 import android.content.Context;
-import android.content.res.Configuration;
 import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
 import android.text.Editable;
 import android.text.Spannable;
 import android.text.TextWatcher;
@@ -97,13 +94,6 @@ import android.widget.TextView;
         setCanceledOnTouchOutside(true);
     }
 
-    /* package */ void onConfigurationChanged(Configuration newConfig) {
-        // FIXME: Would like to call mWebView.findAll again, so that the
-        // matches would refresh, but the new picture has not yet been
-        // created, so it is too soon.
-        mEditText.getText().clear();
-    }
-
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
@@ -113,7 +103,7 @@ import android.widget.TextView;
 
         setContentView(R.layout.browser_find);
 
-        theWindow.setLayout(ViewGroup.LayoutParams.FILL_PARENT,
+        theWindow.setLayout(ViewGroup.LayoutParams.MATCH_PARENT,
                 ViewGroup.LayoutParams.WRAP_CONTENT);
 
         mEditText = (EditText) findViewById(R.id.edit);
@@ -194,6 +184,8 @@ import android.widget.TextView;
             mMatchesView.setVisibility(View.INVISIBLE);
         } else {
             mMatchesView.setVisibility(View.VISIBLE);
+            mWebView.setFindDialogHeight(
+                getWindow().getDecorView().getHeight());
             int found = mWebView.findAll(find.toString());
             setMatchesFound(found);
             if (found < 2) {