android-actionbar

How to resize actionbar tabs

老子叫甜甜 提交于 2019-12-12 00:42:19
问题 I looked all stackoverflow's topics about it, and none of these solutions - like this one: <style name="Widget.Holo.Tab" parent="@android:style/Widget.Holo.Light.ActionBar.TabView"> <item name="android:height">#dp</item> </style> <style name="Your.Theme" parent="@android:style/Theme.Holo.Light"> <item name="android:actionBarTabStyle">@style/Widget.Holo.Tab</item> </style> http://stackoverflow.com/questions/9286638/actionbar-tabs-height that changed nothing - (none of these) helped me. I have

Change homeAsUpIndicator dynamically

北城余情 提交于 2019-12-12 00:28:33
问题 I build an app with four tabs and, as a consequence, four fragments. In the first fragment, I have a sliding menu and I throw with a custom icon in the actionbar. The problem is that in the others fragments, I want to stablish other custom icon to return to the first fragment but I don't know what to do... This is my styles.xml with my custom icon for the sliding menu: <!-- Application theme. --> <style name="AppTheme" parent="AppBaseTheme"> <item name="android:homeAsUpIndicator">@drawable

ANDROID: Overflow not showing on action bar

回眸只為那壹抹淺笑 提交于 2019-12-11 23:45:14
问题 I need that if the tablet does not have the menu hardware button... it will show the menu button on the software buttons as you see here: So I've googled a bit and found out that to display this button you only need to: "set minSdkVersion to 10 or lower, set targetSdkVersion to 11, 12, or 13, and you do not use ActionBar, the system will add the legacy overflow button when running your app on a handset with Android 4.0 or higher." "Set your android:targetSdkVersion and your android

How to show Text at top right corner of Action bar in Android?

99封情书 提交于 2019-12-11 22:50:03
问题 I am using Action bar at top of my app Where i have setTitle to tht which is shown left corner of ActionBar Now I want to show Some Text To right most corner of the ActionBar instead of subTitle like highlighted in Red want to show some Static Text at right How can i do this? 回答1: import android.app.ActionBar; import android.app.Activity; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.widget

ActionBarSherlock restart to apply theme triggers wrong lifecycle methods

。_饼干妹妹 提交于 2019-12-11 21:41:35
问题 I use a SherlockFragmentActivity with 3 tabs. Each of these tabs are containing a SherlockFragment . If I restart my app (to apply a theme) with this code: (thanks to Dante!) finish(); intent = new Intent(this, <your_activity>.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); the app shutsdown properly but if the app are starting again, the whole lifecycle methods of my fragments are get called. Everything works

ActionBar Tab's Fragments blank when switching tabs:

随声附和 提交于 2019-12-11 21:26:52
问题 I am using ActionBar.TabListener as listed here: Action Bar switching tabs automatically: I am adding a few tabs with tablistener as follows Tab 1 -> Fragment a -> fragment b -> Fragment c Tab 2-> Fragment d I click on Tab 1, go from a to b to c. When I stay on Tab 1, and I am in ‘a’, clicking back goes to b, clicking back in b goes to ‘a’ . This is because I have added addtoBackStack() in b and c But when I am in Fragent ‘c’. and click on Tab 2 and come back to Tab 1 and click back, I get

I have problems ActionBarDrawerToggle

我怕爱的太早我们不能终老 提交于 2019-12-11 20:24:01
问题 Recently I was using in my App this feature. But, using the ActionBarDrawerToggle a new app, I went unused error in that function. So I implemented import android.support.v7.app.ActionBarDrawerToggle; But now the code does not work for me. public class MainActivity extends ActionBarActivity { private ListView drawerList; private String[] drawerOptions; private DrawerLayout drawerLayout; private ActionBarDrawerToggle drawerToggle; private Fragment[] fragments = new Fragment[]{ new MainFragment

I've changed tabs order, and now can't set actionbar sherlock properly

时间秒杀一切 提交于 2019-12-11 20:11:44
问题 In my project, I use actionbarsherlock to show a context menu at the upper side, and a tabhost to show navigate options at the bottom (each tab loads a fragment). At first, my default tab was one wich gets user's gps location and loads a map. The second tab was a list with several categories options. As I decided to swap this tabs (just by adding the categories tab first at the TabsAdapter), I started to have problems changing my actionbar. When my app first starts, I can see this "select

Action Bar switching tabs automatically:

一个人想着一个人 提交于 2019-12-11 19:13:41
问题 I am implementing an app where user can search some songs in a separate tab.The search results for a song are info like lyrics, meaning etc. From the results, user can mark certain songs as favorite which are in another tab. When I click on the favorite songs tab, it should switch to the first tab with fragment for the search results. Here are more specific details: Main Activity spawns action bar which creates 2 tabs. Search Tab - Separate Fragment, Results- separate fragment Favorites Tab -

ActionBar on the TOP and BOTTOM on Android App

断了今生、忘了曾经 提交于 2019-12-11 19:13:35
问题 I'm developing an Android app and I want to have 2 ActionBar (one on the top and another on the bottom) like this: http://developer.android.com/design/media/action_bar_pattern_considerations.png I'm using Actionbar Sherlock and for now I created only the top ActionBar. I serched in the web, but I didn't find a solution yet, only some piece of code. Can anyone help? 回答1: Take a look at the following links: http://developer.android.com/guide/topics/ui/actionbar.html How can I force the Action