actionbarsherlock

Action Bar Sherlock, change colour of line under tab?

吃可爱长大的小学妹 提交于 2019-12-22 13:47:59
问题 How can I change the colour of the line that appears under the highlighted Action Bar Sherlocks tab. It's default is an electric blue. 回答1: Here an implementation based on the google i/o app implementation: Set the theme style: <style name="Theme.Styled" parent="Theme.Sherlock.Light"> <item name="android:actionBarTabBarStyle">@style/Widget.Styled.TabBar</item> <item name="actionBarTabBarStyle">@style/Widget.Styled.TabBar</item> </style> <style name="Widget.Styled.TabView" parent="Widget

Switch Fragments while Maintaining State

耗尽温柔 提交于 2019-12-22 13:47:43
问题 Decided to rewrite this question: I have three fragments call them A B C. Each has a view with some fields for the user to fill out. The user should be able to use a menu to switch between the different fragments. If the user fill outs information in fragment A and then switch to C fills out more information and then switches back to A the information the user typed in A should still be there. I think I need to be using the FragmentManager somehow but I can't figure out the right combination

best way to show the three dot menu item in action bar without using “a hack” method [closed]

断了今生、忘了曾经 提交于 2019-12-22 10:43:10
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago . I am a little confused. I want to show the remaining items of the action bar inside the three dot item. But i always lose it when the number of items increases ! after googling a little, i found this "useful" method : ASMUIRTI ANSWER private void getOverflowMenu() { try {

How to change ActionBarSherlock Tab Text color?

五迷三道 提交于 2019-12-22 10:26:43
问题 adapter.addTab(getSupportActionBar().newTab().setText("Tab-1"), Tab1.class, null); adapter.addTab(getSupportActionBar().newTab().setText("Tab-2"), Tab2.class, null); adapter.addTab(getSupportActionBar().newTab().setText("Tab-3"), Tab3.class, null); As of now every Tab has its TextColor as white. I want it to be grey when not selected and white on selected. So, how can i change the text color in onTabSelected or onTabUnselected . Or should i go with setCustomView for the tab?? Here again the

onSaveInstanceState() vs. onRetainCustomNonConfigurationInstance()

杀马特。学长 韩版系。学妹 提交于 2019-12-22 09:59:17
问题 I am using ActionBarSherlock, along with several MenuItem s that I dynamically manage, depending on program state. Specifically, I save the MenuItem s into instance variables in the Activity 's onCreateOptionsMenu() method, and then can show and/or hide them as needed later in the Activity . However, I found that the MenuItem variables can be lost on configuration changes, such as device rotation. So I also put them into a Parcel and pass them to onSaveInstanceState() for restoral through the

How does action_bar_embed_tabs exactly work in Android?

╄→гoц情女王★ 提交于 2019-12-22 08:37:17
问题 I have tabs in an actionbar. On large screens the tabs are embed to the actionbar but on small screens the are not. I want to control the tabs manual so i can separate the tabs from the actionbar. I tried to set abs__action_bar_embed_tabs but that didn't work <resources> <bool name="abs__action_bar_embed_tabs">false</bool> </resources> 回答1: I know this is an old post, however I would like to add a solution using action_bar_embed_tabs for future readers. Create the below method (do take care

Custom Support Dialog Fragment text is the wrong color

萝らか妹 提交于 2019-12-22 07:09:37
问题 If I put a TextView in a custom dialog box, the text will be black by default. Unfortunately, the support fragment dialogs backgrounds are dark gray. Black on gray is very hard to read. I could change the TextView to white or something like android:textColor="?android:attr/textColorPrimaryInverseDisableOnly" . But the dialog boxes on the new android (Holo Light) are white. So it will be white on white. I could use a hack like forcing it to be white on old versions of Android and forcing it to

How to delete a tab with actionbar, viewpager, and multiple fragments?

你。 提交于 2019-12-22 06:27:21
问题 I'm using code I found here. public class ActionBarTabs extends SherlockFragmentActivity { CustomViewPager mViewPager; TabsAdapter mTabsAdapter; TextView tabCenter; TextView tabText; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); mViewPager = new CustomViewPager(this); mViewPager.setId(R.id.pager); setContentView(mViewPager);

Failed to build Android app (refer to both ActionBarSherlock & ViewPagerTabs) with Ant

北战南征 提交于 2019-12-22 04:17:14
问题 I have one Android app which uses ActionBarSherlock & ViewPagerTabs. I use Eclipse to write and build it, and it just works well until I try to build it with Ant. Here's what I did: go to ActionBarSherlock folder, run "android update lib-project --path ." go to ViewPagerTabs folder, run "android update lib-project --path ." too go to app folder, run "android update project --path ." run "and debug" under app folder, and I got following errors: : [javac] C:\Android\TestApp\src\com\test\App

Android: Changing visibility on menu items with changing fragment

雨燕双飞 提交于 2019-12-22 04:07:57
问题 I want to change the visibility of menu items of a fragment activity (abs) when ever I change the fragment in the activity. The fragments are SherlockListFragments. The menu items I want to show/hide are spinners I create on menu creation: public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. MenuInflater inflater = getSupportMenuInflater(); IcsSpinner herbSortSpinner = new IcsSpinner(this, null, R.attr.actionDropDownStyle);