actionbarsherlock

Android ActionBar Sherlock - Remove divider between tabs altogether

梦想的初衷 提交于 2020-01-04 02:04:34
问题 I'm trying to remove the divider between the tabs in an ActionBar (actually an ActionBarSherlock) altogether; i.e. no image between tabs and no gap between the tabs either (I'm using a tiled image background in the tabs). Ideally, I'd like the dividers removed in the XML, rather than in code. I've tried a few approaches, but nothing seems to be working, such as: <style name="Theme.MyTheme.ActionBarTab" parent="Widget.Sherlock.ActionBar.TabBar"> <item name="android:divider">@null</item> <item

OptionsMenu of Nested Fragments within ViewPager

梦想的初衷 提交于 2020-01-03 11:02:07
问题 I am using ActionBarSherlock and I am trying to implement a nested fragment structure with a viewpager. I have an activity which contains some views and a wrapper fragmet (FragmentA) This FragmentA contains a view pager which shows FragmentA.1, FragmentA.2 ,FragmentA.3. By Default, onCreateOptionsMenu events are not dispatched to child fragments as it is discussed here. So I am using this solution to overcome the issue. It works great over API level 17, but for below it does not show the

onCreate called after onActivityResult when I pick picture from gallery

主宰稳场 提交于 2020-01-03 10:44:19
问题 I have 'SherlockFragmentActivity' with overrided 'onActivityResult'. I try to get image from camera and gallery and crop it. The problem is I returned on my activity not fragment after onActivityResult called. ... FragmentTransaction t = fragmentManager.beginTransaction(); LogInFragment logFrag = new LogInFragment(); t.replace(R.id.fragment_container, logFrag); t.commit(); ... @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult

Contextual Action Mode custom behavior

南笙酒味 提交于 2020-01-03 09:47:51
问题 In android developer's menu guide it is mentioned that: The action mode is disabled and the contextual action bar disappears when the user deselects all items, presses the BACK button, or selects the Done action on the left side of the bar. Technically, it means that mActionMode.finish() , the BACK button press, or the Done action selection call ActionMode.Callback onDestroyActionMode() method. My question is how to perform a custom action (for example Toast("Action mode exit by Done select")

Divider not working for TitlePageIndicator with viewpagerindicator & actionbarsherlock

半世苍凉 提交于 2020-01-03 08:06:30
问题 I noticed with the latest version of ViewPagerIndicator, ICS style dividers are supported, I tried to follow the issue and solution, but no matter what I do I can't get the divider to show up on my options on the actionbar for the TitlePageIndicator. I added the IcsLayout as the container, put divider, showDividers, and other properties, but am still getting nothing. Here's my layout (oddly enough, if I switch the IcsLayout to the viewpager indicator one, the app crashes): <com

How can I allow horizontal tab navigation (swipe views) with action bar navigation tabs?

烂漫一生 提交于 2020-01-02 09:57:48
问题 How can I allow horizontal tab navigation (swipe views) if I'm using action bar navigation tabs? Is there anything special I have to do to get this to work with ActionBarSherlock? 回答1: The code-generated stuff for a "Tabs+Swipe" activity (from BlankActivity in the new activity wizard in Eclipse) has code for this. Basically, your tabs tie into a ViewPager , calling setCurrentItem() to change the page, rather than running their own FragmentTransaction or otherwise affecting the UI. The

List navigation (spinner) on the right side

二次信任 提交于 2020-01-02 09:27:12
问题 I have tried so many tutorials, but I could not find article that would tell me how to create spinner in action bar (sherlock version), but on the right side. Is there a way to do it? Do I need to create additional views and adapters? I just want to know easy way to create that spinner on the right side, nothing else, just it. 回答1: You'll need to create a custom layout for the view containing the spinner. Inflate and place it on the action bar and you're good to go. Here you have some sample

Use ShowCaseView with ActionBarCompat / ActionBarSherlock Android

末鹿安然 提交于 2020-01-02 08:19:13
问题 I am using ShowcaseView library from here in my android application. I want use ShowcaseView with Actionbar Compat . But i am not getting how to use it? I have tried following code but it throws NullPointerexception . Please help me solve this issue. Thank you. Code : public class Activity1 extends ActionBarActivity implements OnShowcaseEventListener { ShowcaseView sv; ShowcaseView.ConfigOptions co; @Override protected void onCreate(Bundle savedInstanceState) { try { super.onCreate

Android Done Cancel Actionbar

廉价感情. 提交于 2020-01-02 07:08:34
问题 Is there any way to create custom actionbar like below screen, using actionbarsherlock library 回答1: Here is how you actually do it in xml use Roman's layout in Honeycomb and above /layout-v11/actionbar_custom_view_done_discard.xml <?xml version="1.0" encoding="utf-8"?> <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:divider="?android:attr

ActionBarSherlock maven dependency

北慕城南 提交于 2020-01-02 04:38:26
问题 I have been trying to add the ActionbarSherlock maven dependency to my project using the <dependency> <groupId>com.actionbarsherlock</groupId> <artifactId>library</artifactId> <version>4.2.0</version> </dependency> in my pom.xml file. Now this works except for my styles.xml file, where it does not seem to the abs styles, but everything else works fine ? What am i doing wrong. Below is the full pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0"