searchview

Can't call void android.view.View.setElevation(float) on null object in lapism/SearchView

我与影子孤独终老i 提交于 2019-12-04 08:54:13
问题 I am using library lapism/SearchView (https://github.com/lapism/SearchView) in my project but I get following runtime exception only on Android 5.0: A/art: art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: can't call void android.view.View.setElevation(float) on null object A/art: art/runtime/check_jni.cc:65] in call to CallVoidMethodV A/art: art/runtime/check_jni.cc:65] from void android.animation.PropertyValuesHolder.nCallFloatMethod(java.lang.Object, long, float) A/art: art

Getting a SearchView with MenuItemCompat (Android)

≡放荡痞女 提交于 2019-12-04 07:22:07
I am trying to implement the SearchView ActionBar item as android developers says but I am having some trouble. ( http://developer.android.com/guide/topics/ui/actionbar.html ). There are two mistakes that although I have looked for a lot, I have not been able to find the solution. 1) I have a problem with the class MenuItemCompat. It says: The method getActionView(MenuItem) is undefined for the type MenuItemCompat I can only use for this class the following methods: setShowAsAction(item, actionEnum) setActionView(item, view) Here it is the code @Override public boolean onCreateOptionsMenu(Menu

Opening/Closing NavDrawer with invalidateOptionsMenu() cause onRestore call on SearchView and onQueryTextChange is called as well

雨燕双飞 提交于 2019-12-04 04:25:16
问题 I have a MainActivity with callbacks implementation of: DrawerListFragment.Callback ItemListFragment.Callbacks SearchView.OnQueryTextListener I have also added an ActionBar SearchView, and finally implemented OnQueryTextListener to change the listView of the listFragment at each kb type, but this works! Also, clicking an item on navDrawer generates a new/replace FragmentList transaction for the new type of itemsList. Now the problem. The ActionBar SearchView actually filters the current

SearchView imeOptions and onQueryTextSubmit support

旧街凉风 提交于 2019-12-04 04:11:28
问题 I'm currently using ActionBarSherlock 4.2 and it's SearchView widget in my app. I wanted to make it submit query even though it's empty. I tried to set imeOptions and OnKeyListener but both were ignored without a reason. @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { Log.d(TAG, "onCreateOptionsMenu"); inflater.inflate(R.menu.interactive_map, menu); mSearchView = (SearchView) menu.findItem(R.id.action_search).getActionView(); mSearchView.setImeOptions(EditorInfo

Styling the SearchView Widget using support library v21

主宰稳场 提交于 2019-12-04 03:26:42
I'm trying to style the SearchView widget using the new AppCompat v21, but I'm facing some problems. No matter what layout I set on "suggestionRowLayout" attribute, it does nothing at all. The suggestion dropdown list of the SearchView remains the same way. Other problem that I'm having is when the "accent color" is the same color as the "primary color", in the searchview is impossible to distinguish where is the caret. Do you know how can I change the accent color in the SearchView to only be applied there? I've found that Play Music has the same problem. I'm following the guide from Android

ActionBar SearchView not fully expanding in landscape mode

六月ゝ 毕业季﹏ 提交于 2019-12-04 03:24:40
When using the action bar search interface, the widget expands to occupy the full width of the screen in portrait mode, but stops short in landscape mode. Is there a way to set the expansion layout params on the SearchView to fully fill the action bar when the user is typing a search? See image: Note: I'm not currently using ActionBar Sherlock Edit: Here's what I did to get it to extend the full width. searchView.setOnSearchClickListener(new OnClickListener() { private boolean extended = false; @Override public void onClick(View v) { if (!extended) { extended = true; LayoutParams lp = v

Android - SearchView in toolbar not expanding

浪子不回头ぞ 提交于 2019-12-04 03:24:20
I'm trying to add a SearchView in my toolbar, I've added the icon, but when I press it, it's not expanding. Here's the code: main_menu.xml <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context="com.app.try.MainActivity"> <item android:id="@+id/search" android:title="@string/search" android:icon="@drawable/abc_ic_search_api_mtrl_alpha" app:showAsAction="always" android:actionViewClass="android.support.v7.widget.SearchView"/> </menu> MainActivity.java @Override public

SearchView on support.v7.appcompat library issue: default 9-patch background not renders properly

落花浮王杯 提交于 2019-12-04 02:55:57
问题 I'm developing an app with ActionBar using support.v7.appcompat library. The action bar works, the SearchView is shown, the hint shows. The only problem is that the background of the SearchView is not scalling properly. Insead of the usual, it appears big and with the 9-patch black lines. Using: Developing from command line, using ant debug to compile. On Linux Mageia 3, ant version: Apache Ant(TM) version 1.8.4 compiled on January 11 2013 Linking to library with project.properties line:

How to customize the “up” button when the searchView is being expanded?

£可爱£侵袭症+ 提交于 2019-12-04 02:34:01
Background My app has the ability to search for items (which are other apps) using the SearchView on the ActionBar. The app uses the support library of Google, and it works well on all versions of Android from API 9 . The problem On Lollipop, when I click the search action item in order to start searching, I notice that the up/back button on the top-left corner gets to be white, which is bad for this case since the actionbar background is also quite white: Weird thing is that it doesn't always occur, and I don't think it occurs on Android versions that aren't Lollipop (tested on multiple

ExpandableListView, OnChildClickListener

家住魔仙堡 提交于 2019-12-04 02:33:13
问题 I have list of groups with populated child items inside of each group. I already implemented a searchview with filtered ressults and my expandablelistview` can be expanded and collapsed. The problem is, I don't know how to deal with the OnChildClickListener, Once I added the OnChildClickListener function the application suddenly stopped working. Can someone help me get through with this? This is my code: package com.teamamazing.search; import java.util.ArrayList; import android.media