actionbarsherlock

using a custom view for overflow menu items

南笙酒味 提交于 2021-02-07 07:59:55
问题 I'm having real difficulty doing anything to the overflow menu in actionbar sherlock. Ideally, I would like to use a custom TextView for each item in order to set a different font on it and change the colour of the pressed state. I have tried (all without success): Changing The Style Of Actionbar Overflow Actionbar styled overflow menu items listview as action overflow in sherlock actionbar https://groups.google.com/forum/#!msg/actionbarsherlock/5lHOKNlXn_4/f9XicMXbFFAJ My app will have

How to set visibility for an actionbar menu group?

巧了我就是萌 提交于 2020-06-25 08:36:12
问题 UPDATE Originally I was using ActionBarSherlock I have since created a brand new project using a native android action bar just to test this and I am still getting the same problem. I am successfully showing/hiding items but not groups. I am rapidly coming to the conclusion that there is a bug in the ActionBar and it is not possible to programmatically set the visibility of a group END of UPDATE Given the following menu When accessing the Group I get a null pointer exception <menu xmlns

findViewById for MenuItem returns null

|▌冷眼眸甩不掉的悲伤 提交于 2020-05-11 03:46:07
问题 This is my xml file for the ActionBar menu. <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/fav_button" android:title="Favourite" android:icon="@drawable/unstar" android:showAsAction="always|withText" /> </menu> In my onCreate function, after calling setContentView . I do favButton = (MenuItem) this.findViewById(R.id.fav_button); But this returns null. But returns the proper object on the onOptionsItemSelected

Strange bug / behaviours with ViewPager and ActionBar (Sherlock)

守給你的承諾、 提交于 2020-03-22 07:50:23
问题 The following bug will happen on an 2.3 device, my setup works fine on 4.x devices. I have a ViewPager with some Fragments in it (they're all of the same class). Every Fragment inflates it's own Menu, because the Menu Items may vary from Fragment to Fragment. For test purposes, I have set up a Menu Item in the ActionBar (the ActionBar is shown on the bottom in the pic because it's a split ActionBar). When the Item is tapped, a TextView in the Fragment should be set to "clicked". This works in

Problems Using ActionBarSherlock in Project

白昼怎懂夜的黑 提交于 2020-03-12 05:33:11
问题 For some reason, I can't get ActionBarSherlock to work. I think I have it set up correctly, but it doesn't show up in intellisense when I try to import it or use it. Is there anything else I need to do, other than include it as a module?? Images: 回答1: You need to ensure that the dependencies are set properly, main application module needs to depend on the library module and there must be no duplicate dependencies on jars. I've prepared a sample project using the demo provided for this library

How to remove default android action bar after setting custom action bar view

旧巷老猫 提交于 2020-03-05 15:12:13
问题 Hi all I have one problem I am trying to move action bar app icon,title,menu or... from left to right and I am using SherlockActionBar with setCustomView see codes my activity private void BiftorSetUpActionBar() { // TODO Auto-generated method stub getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM); View actionbarview = getLayoutInflater().inflate(R.layout.biftor_action_bar, null); View app_actionbar_bg =(View) actionbarview.findViewById(R.id.app_actionbar_bg); app

How to remove default android action bar after setting custom action bar view

橙三吉。 提交于 2020-03-05 15:12:08
问题 Hi all I have one problem I am trying to move action bar app icon,title,menu or... from left to right and I am using SherlockActionBar with setCustomView see codes my activity private void BiftorSetUpActionBar() { // TODO Auto-generated method stub getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM); View actionbarview = getLayoutInflater().inflate(R.layout.biftor_action_bar, null); View app_actionbar_bg =(View) actionbarview.findViewById(R.id.app_actionbar_bg); app

Using native look and feel of the searchView for actionBarSherlock on old Android versions

时光总嘲笑我的痴心妄想 提交于 2020-02-21 03:13:20
问题 I've noticed that there is no working solution that shows how to use filter on a listView items using the actionbar, that works on older Android versions (like 2.3.x). The only example I've found is in the file "LoaderCursorSupport.java" of the fragments example. However, it only works when the searchView can be created, meaning starting from Android 3.x, as shown in the code: View searchView=SearchViewCompat.newSearchView(getActivity()); if(searchView!=null) ... The above bug (or missing

EditText losing focus using hard keyboard when TabHost is present in activity

纵饮孤独 提交于 2020-02-20 05:55:33
问题 I am displaying an EditText inside tabhost. Tabhost is inside a SherlockFragmentActivity. Suppose I am in touch mode and I click on EditText to give it focus and start typing on it. After typing 2-3 chars, I decided to use my hard keyboard. As soon as press first hard key, I move out of touch mode and this also causes the focus to moves back to the currently selected tab. As long as I do not use hard navigation keys to bring back the focus to my EditText, I will not be able to type into

EditText losing focus using hard keyboard when TabHost is present in activity

浪子不回头ぞ 提交于 2020-02-20 05:54:04
问题 I am displaying an EditText inside tabhost. Tabhost is inside a SherlockFragmentActivity. Suppose I am in touch mode and I click on EditText to give it focus and start typing on it. After typing 2-3 chars, I decided to use my hard keyboard. As soon as press first hard key, I move out of touch mode and this also causes the focus to moves back to the currently selected tab. As long as I do not use hard navigation keys to bring back the focus to my EditText, I will not be able to type into