searchview

How to remove inner bottom space (bottom margin/padding) of text/layout inside a SearchView?

你离开我真会死。 提交于 2019-12-24 13:52:40
问题 So I got this SearchView that has a default space at the bottom for the text inside it. How can I reduce it (see the red lines in picture): 回答1: Imagine you have SearchView named: searchBar SearchView searchBar = (SearchView) findViewById(R.id.searchViewBar); Get the view ( AutoCompleteTextView ) that holds the text inside your SearchView : //The view that contains the SearchView text AutoCompleteTextView searchTextContent = (AutoCompleteTextView) searchBar.findViewById(searchBar.getContext()

Search Android Map Marker Titles and Snippets

百般思念 提交于 2019-12-24 07:13:17
问题 I have a map with several markers and I would like to be able to search them by marker title or snippet. I am new to Android so I'm not entirely sure on how to go about it. Any help pointing me in the right direction would be great. Here is my code: import android.app.Activity; import android.content.Intent; import android.os.Bundle; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.GoogleMap

How to implement search widget with a listview using SherlockActionbar?

痴心易碎 提交于 2019-12-24 07:09:29
问题 So, I'm trying to implement this code (https://stackoverflow.com/a/14085524/2213992) on my application but no success so far. This is my MainActivity.java: import java.util.List; import android.app.SearchManager; import android.content.Context; import android.os.Bundle; import android.widget.ArrayAdapter; import android.widget.SearchView; import com.actionbarsherlock.app.ActionBar; import com.actionbarsherlock.app.SherlockListActivity; import com.actionbarsherlock.view.Menu; import com

Weird gray popup with text when typing in SearchView

喜欢而已 提交于 2019-12-24 03:37:44
问题 I have a SearchView in my app and when I type in it, every character shows up in a weird popup as can be seen below. Layout: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:focusable="true" android:focusableInTouchMode="true" android:background="@color/white" tools:context="com.example.myapp"> <SearchView

Android 4.3: Not focus searchView not show hint

浪子不回头ぞ 提交于 2019-12-23 21:25:31
问题 Android Studio 2.3.3, Android 4.3. In my fragment I has searchView component (not in ToolBar). Here my snippet. fragment_layout.xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.v7.widget.SearchView android:id="@+id/searchView" android:layout_width="match

Start Activity with SearchView open

落爺英雄遲暮 提交于 2019-12-23 11:44:34
问题 how can I start an activity with a SearchView with the text field open. In this way I could search without having to click on the spyglass. I am using Sherlock Action Bar. Here is my code: @Override public boolean onCreateOptionsMenu(Menu menu) { final SearchView searchView = new SearchView(getSupportActionBar().getThemedContext()); searchView.setQueryHint("Cerca domande"); searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() { @Override public boolean onQueryTextSubmit

android tab view fragment Recycler view search filter

夙愿已清 提交于 2019-12-23 04:29:47
问题 I want to implement search filter in Tab view Fragment with data from sqlite database ,after more that three days of being though this and this without success finally i came across this which is seems to be clean idea since am kind new to android development. i tried to implement it but does not seems to work it means search menu item not inflating also i get no result, i do not have idea where do i get t wrong and there is no error at all, any idea on what is wrong and how to make it work.

search with Sherlock ActionBar SearchView setOnKeyListener

女生的网名这么多〃 提交于 2019-12-23 01:40:10
问题 I am trying the ActionBarSherlock SearchView. unfortunately the public boolean onKey(View arg0, int arg1, KeyEvent event) is not fired. Do you know the reason? I see from this post SearchView imeOptions and onQueryTextSubmit support that a user solved the problem in another way. Maybe I should do the same? Thanks Here is my code: @Override public boolean onCreateOptionsMenu(Menu menu) { //Used to put dark icons on light action bar boolean isLight = SampleList.THEME == R.style.Theme_Sherlock

Android Action Bar SearchView NullPointerException adjustDropDownSizeAndPosition

坚强是说给别人听的谎言 提交于 2019-12-23 01:17:50
问题 The problem occurs when interacting with the SearchView or when the activity with the Searchview loads. When using setIconifiedByDefault(true) the problem occurs after the activity loads when interacting with the SearchView, but when using setIconifiedByDefault(false) the problem occurs when the activity loads. The following error is output in LogCat: java.lang.NullPointerException at android.widget.SearchView.adjustDropDownSizeAndPosition(SearchView.java:1244) Here is the code:

How to show SearchView Outside/Below toolbar

倖福魔咒の 提交于 2019-12-22 18:36:07
问题 LIKE THIS SCREENSHOT - the SearchBar outside/below-toolbar in snapdeal, flipkart app... How to add searchbar below or outside the toolbar.. Please suggest with a layout... 回答1: This is most likely a custom component, you can use a button and switch it to an EditText with the icons you prefer or use a button directly to launch the search view: For example to achieve this you can: 1) Have a drawable with radius of 2dp and use it as the background of your component <?xml version="1.0" encoding=