X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/e3d509a451d89248a4598b4157036ebb662dc464..9df957d548b51bf347ab7ba8134699362990f443:/src/com/owncloud/android/ui/fragment/SearchFragment.java diff --git a/src/com/owncloud/android/ui/fragment/SearchFragment.java b/src/com/owncloud/android/ui/fragment/SearchFragment.java index 12a73c29..c946ee01 100644 --- a/src/com/owncloud/android/ui/fragment/SearchFragment.java +++ b/src/com/owncloud/android/ui/fragment/SearchFragment.java @@ -2,6 +2,7 @@ * ownCloud Android client application * * @author masensio + * @author David A. Velasco * Copyright (C) 2015 ownCloud Inc. * * This program is free software: you can redistribute it and/or modify @@ -34,6 +35,7 @@ import android.widget.SearchView; import com.owncloud.android.R; import com.owncloud.android.datamodel.OCFile; +import com.owncloud.android.lib.common.utils.Log_OC; /** * Fragment for Searching users and groups @@ -103,6 +105,22 @@ public class SearchFragment extends Fragment { ); searchView.setIconifiedByDefault(false); // do not iconify the widget; expand it by default + //searchView.setImeOptions(EditorInfo.IME_ACTION_NEXT | EditorInfo.IME_FLAG_NO_FULLSCREEN); + + searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() { + @Override + public boolean onQueryTextSubmit(String query) { + Log_OC.v(TAG, "onQueryTextSubmit intercepted, query: " + query); + return true; // return true to prevent the query is processed to be queried; + // a user / group will be picked only if selected in the list of suggestions + } + + @Override + public boolean onQueryTextChange(String newText) { + return false; // let it for the parent listener in the hierarchy / default behaviour + } + }); + return view; }