public class Search extends LinearLayout
implements OnClickListener, OnKeyListener, OnLongClickListener, OnItemClickListener {
// Speed at which the widget slides up/down, in pixels/ms.
private static final float ANIMATION_VELOCITY = 1.0f;
/** The distance in dips between the optical top of the widget and the top if its bounds */
private static final float WIDGET_TOP_OFFSET = 9;
private final String TAG = "SearchWidget";
private Launcher mLauncher;
private EditText mSearchText;
private ImageButton mVoiceButton;
private ImageButton mClearButton;
/** The animation that morphs the search widget to the search dialog. */
private Animation mMorphAnimation;
/** The animation that morphs the search widget back to its normal position. */
private Animation mUnmorphAnimation;
// These four are passed to Launcher.startSearch() when the search widget
// has finished morphing. They are instance variables to make it possible to update
// them while the widget is morphing.
private String mInitialQuery;
private boolean mSelectInitialQuery;
private Bundle mAppSearchData;
private boolean mGlobalSearch;
ListView mSearchResultList=null;
LinearLayout mSearchResult=null;
// For voice searching
private Intent mVoiceSearchIntent;
private int mWidgetTopOffset;
private int mAlpha = 0xff;//2011-01-12 add for draw alpha
private ArrayList