зеркало из https://github.com/mozilla/gecko-dev.git
Bug 904122: Dismiss keyboard on search suggestion scroll. r=lucasr
This commit is contained in:
Родитель
79c105da2d
Коммит
d8905fa168
|
@ -35,8 +35,10 @@ import android.support.v4.app.LoaderManager.LoaderCallbacks;
|
|||
import android.support.v4.content.AsyncTaskLoader;
|
||||
import android.support.v4.content.Loader;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
|
@ -850,4 +852,27 @@ public class BrowserSearch extends HomeFragment
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* HomeSearchListView is a list view for displaying search engine results on the awesome screen.
|
||||
*/
|
||||
public static class HomeSearchListView extends HomeListView {
|
||||
public HomeSearchListView(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, R.attr.homeListViewStyle);
|
||||
}
|
||||
|
||||
public HomeSearchListView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(MotionEvent event) {
|
||||
if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
|
||||
// Dismiss the soft keyboard.
|
||||
requestFocus();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout="@layout/home_suggestion_prompt" />
|
||||
|
||||
<org.mozilla.gecko.home.HomeListView
|
||||
<org.mozilla.gecko.home.HomeSearchListView
|
||||
android:id="@+id/home_list_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
|
|
Загрузка…
Ссылка в новой задаче