actionbarsherlock

Custom Home Icon in Action Bar Sherlock

南楼画角 提交于 2019-12-20 10:22:53
问题 I am trying to set custom icon for home icon using ActionBarSherlock library. I have tried to set custom layout using abHomeLayout attribute in my custom theme. But it didn't work for me. Only way, how to set it, is to set abIcon attribute for my custom drawble, but I cannot set some horizontal padding for this drawable. Is there any example for this or where could be a problem with abHomeLayout attribute? 回答1: This works for my situation, it replaces the default ic_launcher icon in the

Progress Dialog not aligned in the ActionBarSherlock after API Level 11+

假如想象 提交于 2019-12-20 07:15:04
问题 In my Project i have add Library ActionBar Sherlock and create the custom theme for my project. I have created custom theme from here. But after applying the theme my Progress Dialog in not aligned(means not displayed in the center of screen). Please not this issue appears in API Level 11 or above. Here i have attached the screen shot of emulator running OS 4.2.2. I am unable to figure out this issue... ScreenShot :: MyCustomTheme ::(values folder) <?xml version="1.0" encoding="utf-8"?>

Communicative Between Fragments on Android

醉酒当歌 提交于 2019-12-20 03:20:16
问题 I am attempting to build an Android application that has two tabs, one for a textField/button and TreeMenu (where each element has a checkbox associated with it) and another for a list. I am also using an ActionBarSherlock. I have already successfully written the program in a single main activity, but am having difficulty figuring out how to divide this original activity to correspond with the two new fragment instances I need to create for each tab. Moreover, each time an item is added in

Enable home button ActionbarSherlock, Sherlockfragment

偶尔善良 提交于 2019-12-19 19:39:45
问题 I want to enable the home button in my fragment. This question is asked earlier but for an activity. I tried ... getSupportActionBar().setDisplayHomeAsUpEnabled(true); ... but this doesn't work. Here is my code: import com.actionbarsherlock.R; import com.actionbarsherlock.app.ActionBar; import com.actionbarsherlock.app.ActionBar.Tab; import com.actionbarsherlock.app.SherlockFragment; import com.actionbarsherlock.view.MenuItem; import android.support.v4.app.Fragment; import android.content

Android SearchView X mark icon

时间秒杀一切 提交于 2019-12-19 18:23:14
问题 I want to change X mark in white color drawable displayed in search view component.How can I change it. please help me. thanks. SearchManager searchManager = (SearchManager)getSystemService(Context.SEARCH_SERVICE); searchView = (SearchView)menu.findItem(R.id.ac_search).getActionView(); searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName())); searchView.setIconifiedByDefault(true); try{ Field searchField = SearchView.class.getDeclaredField("mSearchButton");

Android SearchView X mark icon

て烟熏妆下的殇ゞ 提交于 2019-12-19 18:21:16
问题 I want to change X mark in white color drawable displayed in search view component.How can I change it. please help me. thanks. SearchManager searchManager = (SearchManager)getSystemService(Context.SEARCH_SERVICE); searchView = (SearchView)menu.findItem(R.id.ac_search).getActionView(); searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName())); searchView.setIconifiedByDefault(true); try{ Field searchField = SearchView.class.getDeclaredField("mSearchButton");

onOptionsItemSelected() not called when clicking on menu item which has an actionLayout set on it

做~自己de王妃 提交于 2019-12-19 08:11:20
问题 In my action bar, I have defined a menu item that can show text "DONE" by the code below: Menu.xml: <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/action_register_text" android:actionLayout="@layout/action_done_text" android:title="@string/action_done" android:showAsAction="always"/> </menu> action_done_text.xml: <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/expand

onOptionsItemSelected() not called when clicking on menu item which has an actionLayout set on it

拥有回忆 提交于 2019-12-19 08:11:07
问题 In my action bar, I have defined a menu item that can show text "DONE" by the code below: Menu.xml: <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/action_register_text" android:actionLayout="@layout/action_done_text" android:title="@string/action_done" android:showAsAction="always"/> </menu> action_done_text.xml: <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/expand

Intermediate Progress doesn't work with ActionBarSherlock running on Gingerbread

可紊 提交于 2019-12-19 07:58:10
问题 I setup ActionBarSherlock with my app, and I'm trying to use the Intermediate Progress, I'm using this: requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setSupportProgressBarIndeterminateVisibility(false); In my onCreate, and then using: setSupportProgressBarIndeterminateVisibility(true); To enable it. It works fine in ICS but it doesn't work at all in Gingerbread or Froyo, does anyone know how to get it to work? Thanks 回答1: I just had the same problem. Jake's solution above did

Action Bar Sherlock SearchView not expanding on click of it

老子叫甜甜 提交于 2019-12-19 05:38:12
问题 I have one Sherlock Fragment Activity from which i am setting the different sherlock fragments using fragment pager adapter. Now to show the searchview in each of the fragment i have placed this method in onCreate of Fragment:: This method will show menu items in the ActionBar of the fragment. @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setHasOptionsMenu(true); } I have now also set the onCreateOptionMenu() like this :: @Override public void