android-actionbar

Realizing a tab navigation inside an ActionBar navigation.

旧城冷巷雨未停 提交于 2019-12-10 19:29:36
问题 Heyho. I'm trying to realize a tab navigation inside an ActionBar navigation (with fragments), but i can't get it work! Is this possible? It would be curious if not... . This is what i already got: MainActivity.java ... import android.app.Fragment; import android.app.FragmentTransaction; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ActionBar bar =

ActionBar.selectTab doesn't refresh spinner in compact mode

天大地大妈咪最大 提交于 2019-12-10 19:23:53
问题 In an application, I'm using Tabs with the ActionBar, and sometimes I switch tabs programatically using the ActionBar.selectTab() method. This works well but when the width of the ActionBar is too small, the tabs go in compact mode, and are displayed as a drop down menu. And when I use the ActionBar.selectTab() method, the displayed item in the spinner doesn't change. Is there an official solution for this or a known workaround ? 回答1: This is a known bug in Android. Please look at a

options menu action bar

≡放荡痞女 提交于 2019-12-10 18:42:31
问题 Can anyone see why my help icon isn't showing in the action bar? I have pasted the relevant parts of my code below Thank you menu topline.xml: ` <item android:id="@+id/gohome_id" android:title="Home" trial10:showAsAction="ifRoom" /> <item android:id="@+id/helpme_id" android:title="help" android:icon="@drawable/ic_questionmark" android:orderInCategory="200" trial10:showAsAction="always" /> ` styles.xml: <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> </style> <style name=

Animation issues when using BottomNavigationView with NavController and each Fragment has its own Toolbar

本秂侑毒 提交于 2019-12-10 18:28:41
问题 The bounty expires in 12 hours . Answers to this question are eligible for a +100 reputation bounty. Josh Hardman wants to draw more attention to this question. I'm developing an app in Kotlin using some of the latest Android Jetepack components. I've recently had a bit of a hitch with the following case: This issue seems to occur when using BottomNavigationView with NavController , and when each Fragment has its own Toolbar . The problem is that when transitioning from Fragment A to Fragment

Xamarin Android - Actionbar icon padding

假装没事ソ 提交于 2019-12-10 18:22:54
问题 I have styled the action bar in my application, however it looks different on Android KitKat (right device) and Android Lollipop (left device), as you can see on the picture: I want to add some icon padding(left, right) to make it same as on Lollipop. Any ideas how to modify following XML files? Resources/values/styles.xml <?xml version="1.0" encoding="utf-8" ?> <resources> <style name="MyCustomTheme" parent="android:Theme.Holo.Light"> <item name="android:colorActivatedHighlight">@android

Native ActionBar selectableItemBackground with ActionBarSherlock

拜拜、爱过 提交于 2019-12-10 18:07:41
问题 I try to change the background of an selected item in the ActionBar. I use ActionBarSherlock to be compatible with older Android Versions. I set a specific theme to my Activity when the App runs on a device with ICS. This is my current style: <style name="Theme.Custom.Light" parent="@android:style/Theme.Holo.Light.DarkActionBar"> <item name="android:actionBarItemBackground">@drawable/abs__item_background_holo_dark</item> <item name="android:selectableItemBackground">@drawable/abs__item

Android toolbar overflow menu change text color and fill menu to the screen

天大地大妈咪最大 提交于 2019-12-10 18:06:33
问题 there I facing problem to change the text colour of toolbar/action bar overflow menu item. I do too many googling and reading Stackoverflow answers but it can not solve my prblem currenlt i am getting black colour into overflow menu item. what i want is 1. I want to change the colour of menu item black to WHITE. 2. I want to change the width of the overflow menu to match parent screen my code: <resources> <!-- Base application theme. --> <style name="AppTheme" parent="AppTheme.Base"> <!--

Application launcher icon being displayed on action bar of an activity

懵懂的女人 提交于 2019-12-10 17:55:02
问题 On my action bar application icon is being displayed, I don't want it to appear on action bar. I have modified the androidmanifest.xml and removed android:icon from activity element, even then the icon is being displayed? <application android:allowBackup="true" android:icon="@drawable/ic" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.storelocator.StoreLocatorActivity" android:label="@string/app_name" android:configChanges="orientation

How to create a custom Pulldown in the Honeycomb ActionBar?

。_饼干妹妹 提交于 2019-12-10 17:34:55
问题 I would like to add a custom pulldown menu to the actionbar in my project similar to the one that can be found in the google books app (screen). In this case it represents the complete table of contents of the book. I tried to follow the guide from the developer site where there is an example with a SpinnerAdapter. But when i use a custom Layout (in my case a RelativeLayout with two TextViews in it) i get an Exception that saying "ArrayAdapter requires the resource ID to be a TextView". So i

Android Action Bar navigation up button not working on devices

别等时光非礼了梦想. 提交于 2019-12-10 17:22:26
问题 Action Bar up navigation button works fine in emulator but does not work in device can any one help me out MainActivity @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.mainpage); tf = Typeface.createFromAsset(getAssets(), "font/AGENCYB.TTF"); Button btnWeatherDetails = (Button) findViewById(R.id.btnWeather); Button btnMovieDetails = (Button) findViewById(R.id.btnMovies); Button btnHoroscopeDetails = (Button)