am dfcbc046: Reserve space for the searchbox spinner, even when stopped.
Merge commit 'dfcbc046d7fcd74c8aacd9f26bd48084900d3b4a' into eclair-plus-aosp * commit 'dfcbc046d7fcd74c8aacd9f26bd48084900d3b4a': Reserve space for the searchbox spinner, even when stopped.
This commit is contained in:
@@ -191,7 +191,10 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
|
|||||||
mSearchPlate = findViewById(com.android.internal.R.id.search_plate);
|
mSearchPlate = findViewById(com.android.internal.R.id.search_plate);
|
||||||
mWorkingSpinner = getContext().getResources().
|
mWorkingSpinner = getContext().getResources().
|
||||||
getDrawable(com.android.internal.R.drawable.search_spinner);
|
getDrawable(com.android.internal.R.drawable.search_spinner);
|
||||||
|
mSearchAutoComplete.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
|
null, null, mWorkingSpinner, null);
|
||||||
|
setWorking(false);
|
||||||
|
|
||||||
// attach listeners
|
// attach listeners
|
||||||
mSearchAutoComplete.addTextChangedListener(mTextWatcher);
|
mSearchAutoComplete.addTextChangedListener(mTextWatcher);
|
||||||
mSearchAutoComplete.setOnKeyListener(mTextKeyListener);
|
mSearchAutoComplete.setOnKeyListener(mTextKeyListener);
|
||||||
@@ -407,15 +410,9 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
|
|||||||
* @param working true to show spinner, false to hide spinner
|
* @param working true to show spinner, false to hide spinner
|
||||||
*/
|
*/
|
||||||
public void setWorking(boolean working) {
|
public void setWorking(boolean working) {
|
||||||
if (working) {
|
mWorkingSpinner.setAlpha(working ? 255 : 0);
|
||||||
mSearchAutoComplete.setCompoundDrawablesWithIntrinsicBounds(
|
mWorkingSpinner.setVisible(working, false);
|
||||||
null, null, mWorkingSpinner, null);
|
mWorkingSpinner.invalidateSelf();
|
||||||
((Animatable) mWorkingSpinner).start();
|
|
||||||
} else {
|
|
||||||
mSearchAutoComplete.setCompoundDrawablesWithIntrinsicBounds(
|
|
||||||
null, null, null, null);
|
|
||||||
((Animatable) mWorkingSpinner).stop();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user