actionbarsherlock

Using ActionBarSherlock & ViewPagerIndicator Synchronously Will Not Compile

本秂侑毒 提交于 2020-01-21 04:59:24
问题 When using ActionBarSherlock and ViewPagerIndicator at the same time I am getting the below error; from what I've read - it's caused due to conflicting/duplicate libraries in the two. One solution was to have ABS rely on VPI (Or the other way around, I tried both) but this still gave me the same error even after a clean and rebuild. Right now I'm just working in two separate projects so I can get my work done - but I'd like to combine them obviously ha. Help would be much appreciated! [2012

onCreateOptionsMenu is being called too many times in ActionBar using tabs

二次信任 提交于 2020-01-19 23:19:12
问题 Here is my problem. I have an app where I am using ActionBar Sherlock with tabs, fragments with option menus. Every time I rotate the emulator, menus are added for all the fragments even those that are hidded/removed (I tried both). This is the setting: One FragmentActivity, that has an ActionBar with final ActionBar bar = getSupportActionBar(); bar.addTab(bar.newTab() .setText("1") .setTabListener(new MyTabListener(new FragmentList1()))); bar.addTab(bar.newTab() .setText("2") .setTabListener

How can I resolve actionbarSherlock conflict with appcompat? [closed]

巧了我就是萌 提交于 2020-01-16 18:29:52
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 4 years ago . I have an old app, builds with actionbarSherlock and appcompact. I have import the project from eclipse to gradle, but when I compile the project the shell shows me a lot of errors that warnsme that there are duplicates. Like this: Error: Attribute "subtitleTextStyle" has already been defined. How

How to change Sherlock action bar text color programatically?

六眼飞鱼酱① 提交于 2020-01-15 16:39:11
问题 How can you change the tab text color of the action bar from Java code? Not switching to a different theme that was defined in an XML file, but something like .setTextColor(Color.GREEN). If there were a way to get the current (not custom) view, maybe I could try grabbing the TextView from there and changing it. 回答1: Figured it out.... You can pass in a SpannableString: SpannableString spannable = new SpannableString(myString); spannable.setSpan(new ForegroundColorSpan(Color.GREEN), 0,

ActionbarSherlock with ViewPager and ActionItems disappearing

萝らか妹 提交于 2020-01-15 12:42:48
问题 I have a tabbed 'home' activity with a ViewPager and ActionbarSherlock with ActionItems implementation that is working beautifully with the exception of one little quirk: If I switch between the tabs too fast (i.e. starting at tab A, switch to tab B and quickly switch to tab C before the action items change) then the ActionItems disappear and will not come back until I rotate the screen or restart the app. I've looked at the demos and there's nothing in there that's similar to what I'm doing.

Leaking memory with ActionBarSherlock

让人想犯罪 __ 提交于 2020-01-14 22:32:32
问题 After each rotation of phone, whole Activity, with the ViewPager, all Fragments, ListViews etc are not GCed. I can tell because of OutOfMemoryError after 30-something roations and from MAT, which tells me I have 30-something instances of ListViews. After getting rid of nearly everything in my app and leaving ActionBarSherlock, it turns out, that it's the one responsible for leak. I'm debugging on 2.3.7 Desire. Is there a problem with ABS library? 回答1: No there isn't! Hope someone can explain

Handling Action Bars with two fragments

僤鯓⒐⒋嵵緔 提交于 2020-01-13 11:20:37
问题 I have a layout with two fragments and both fragments have their own action bars, each of which have their own action items and menus. When my app is in landscape mode and both fragments are displayed on the screen, it looks like the framework is choosing to display the action bar on the "right" (or the 2nd fragment), which means the fragment on the left (1st fragment) is missing its action items and menu options. Everything works fine when the app is in portrait mode, so I'm not sure if I

ActionbarSherlock: Hide actionbar while displaying tabs

淺唱寂寞╮ 提交于 2020-01-13 05:12:08
问题 My UI uses ABS with tabs ( ActionBar.NAVIGATION_MODE_TABS ) and a bunch of fragment layouts being loaded for each tab. There is one tab where I need to hide the ActionBar (to reclaim some screen space) for the UI but calling getSupportActionBar().hide(); would nuke the tabs along with the ActionBar. I was wondering if there is was anyway at all where I could hide the actionbar without affecting the tabs? EDIT: Actually, come to think of it, the Actionbar doesn't do anything except showing the

ActionbarSherlock: Hide actionbar while displaying tabs

為{幸葍}努か 提交于 2020-01-13 05:10:15
问题 My UI uses ABS with tabs ( ActionBar.NAVIGATION_MODE_TABS ) and a bunch of fragment layouts being loaded for each tab. There is one tab where I need to hide the ActionBar (to reclaim some screen space) for the UI but calling getSupportActionBar().hide(); would nuke the tabs along with the ActionBar. I was wondering if there is was anyway at all where I could hide the actionbar without affecting the tabs? EDIT: Actually, come to think of it, the Actionbar doesn't do anything except showing the

Actionbar convert tabs to list navigation if there is no room

给你一囗甜甜゛ 提交于 2020-01-12 07:37:08
问题 I have an actionbar with a logo, a title, 2 tabs and a search function. On a phone (3.5") everything works fine. The actionbar has 2 lines. The logo title and the search function appear on the first line and the tabs apear on the second line. On my tablet (7") everyting is shown on a single line. But the tabs will be convert to a list when i click the search icon. How can i split the (sherlock)actionbar in 2 lines on my 7" tabblet? Or is there an other way to solve this problem? 回答1: In