actionbarsherlock

Custom cursor color in SearchView

☆樱花仙子☆ 提交于 2019-12-29 00:25:31
问题 I want to change the color of the blinking cursor in a SearchView in the Actionbar (I'm using Actionbar Sherlock for compatibility). Until now I've managed to change the color of the cursor for a EditText element. This SO post helped me to accomplish that and the style I'm using for the EditText looks like this: <style name="CustomTheme" parent="Theme.Sherlock.Light"> <item name="android:editTextStyle">@style/edittext_style</item> </style> <style name="edittext_style" parent="@android:style

How to go to fragment from activity

天大地大妈咪最大 提交于 2019-12-28 23:37:48
问题 I am using ActionBarSherlock, I am not able to go to class that extends SherlockFragment from activity I need to move from Activity to fragment class Here is my Activity class Intent notificationIntent = new Intent(context,MessagesFragment.class); And the Fragment class is like public class MessagesFragment extends SherlockFragment implements OnItemClickListener { // Layout parameters declaration private PullToRefreshListView lv_messages; private ImageView iv_no_data; private LinearLayout ll

Change the actionbar homeAsUpIndicator Programmatically

核能气质少年 提交于 2019-12-28 13:57:17
问题 I used the following hack to change the homeAsupIndicator programmatically. int upId = Resources.getSystem().getIdentifier("up", "id", "android"); if (upId > 0) { ImageView up = (ImageView) findViewById(upId); up.setImageResource(R.drawable.ic_action_bar_menu); up.setPadding(0, 0, 20, 0); } But this is not working on most new phones (HTC One, Galaxy S3, etc). Is there a way that can be changed uniformly across devices. I need it to be changed only on home screen. Other screens would have the

Show dropdown programmatically in ActionBar / ActionBarSherlock

余生颓废 提交于 2019-12-28 13:50:15
问题 I have an activity using ActionBarSherlock with ActionBar.NAVIGATION_MODE_LIST . When entering the page I want the spinner in the action bar to expand programmatically after it's populated with items so the user needs to pick an item. As of now the first item in the adapter is selected automatically. I can't figure out a nice way to expand the spinner in the action bar programmatically. Do I need to use a custom view to achieve this behavior? I've looked on the action bar with the

Setting ActionBarSherlock Theme for Android app

浪子不回头ぞ 提交于 2019-12-28 02:49:28
问题 READ UPDATE 2 BELOW FOR THE ANSWER I'm trying to use ActionBarSherlock in my app. I checked out the 4.0.0 release from the project github repo, built it in Netbeans, then copied the library-4.0.0.jar file into my project's lib directory (I'm not using Eclipse). It's just a skeleton activity right now, and it launches just fine in ICS, but when I run it on Gingerbread I get the following exception complaining that I haven't the app theme to Theme.Sherlock (or similar): java.lang

Change ActionBarSherlock background color

痞子三分冷 提交于 2019-12-28 02:32:27
问题 I'm trying to implement ActionBarSherlock because I was told it is relatively easy to implement and customize. I've found it was pretty easy to implement, but I'm trying to change the background color of the ActionBar and it's proving difficult. According to the the site (link), it seems you can inherit one of the ActionBarSherlock's themes and then override the properties you need. This is what I have so far: <?xml version="1.0" encoding="UTF-8"?> <resources> <style name="Theme.ActionBar"

Fragment MyFragment not attached to Activity

南笙酒味 提交于 2019-12-27 10:36:07
问题 I've created a small test app which represents my problem. I'm using ActionBarSherlock to implement tabs with (Sherlock)Fragments. My code: TestActivity.java public class TestActivity extends SherlockFragmentActivity { private ActionBar actionBar; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setupTabs(savedInstanceState); } private void setupTabs(Bundle savedInstanceState) { actionBar = getSupportActionBar(); actionBar.setNavigationMode

Fragment MyFragment not attached to Activity

我与影子孤独终老i 提交于 2019-12-27 10:35:28
问题 I've created a small test app which represents my problem. I'm using ActionBarSherlock to implement tabs with (Sherlock)Fragments. My code: TestActivity.java public class TestActivity extends SherlockFragmentActivity { private ActionBar actionBar; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setupTabs(savedInstanceState); } private void setupTabs(Bundle savedInstanceState) { actionBar = getSupportActionBar(); actionBar.setNavigationMode

How to animate home button in action bar?

允我心安 提交于 2019-12-25 11:35:41
问题 I'm using ActionBarSherlock and I would like to animate the home button to tell the user to click on it. I want to use three different images to show the animation. How can I do this? 回答1: Get the action bar in you onCreate : ActionBar actionBar = getSupportActionBar(); Create and load an animation drawable which you defined in XML: // homeDrawable is a field on your activity homeDrawable = (AnimationDrawable) getResources().getDrawable(R.drawable.my_thing); Set the drawable as the icon on

NavigationDrawer with ActionBarSherlok

倾然丶 夕夏残阳落幕 提交于 2019-12-25 10:49:33
问题 Hey I am trying to use DrawerLayout with ActionBarSherlok but i am getting error 06-30 15:37:18.874: E/AndroidRuntime(1305): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.Priyesh/com.Priyesh.MainActivity}:android.view.InflateException: Binary XML file line #1: Error inflating class android.support.v4.widget.DrawerLayout here is my xml file <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout"