android-actionbar-compat

ActionBar AppCompat change Tab indicator color

被刻印的时光 ゝ 提交于 2019-12-11 01:36:57
问题 I have seen many posts and answers but still not clear to me, what to do if i have to change Tab indicator color without using Android Asset Studio public class MainActivity extends ActionBarActivity implements android.support.v7.app.ActionBar.TabListener{ private ViewPager tabsviewPager; private TabsAdapter mTabsAdapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); tabsviewPager = (ViewPager)

Styling radio buttons on ActionBarCompat dropdown menu

房东的猫 提交于 2019-12-11 00:36:45
问题 I am working on an app that uses a theme that extends @style/Theme.AppCompat.Light.DarkActionBar . On one of my activities, there is an Action Bar icon that shows three options with radiobuttons (here's an extract from the menu XML file): <item android:icon="@drawable/ic_action_filter_white" android:showAsAction="always" android:title="" preparatest:showAsAction="always"> <menu> <group android:checkableBehavior="single" > <item android:id="@+id/menu_filter_all" android:title="@string/history

ActionBarCompat support library android:selectableItemBackground not working

自古美人都是妖i 提交于 2019-12-10 19:56:14
问题 I'm using the new ActionBarCompat support library. The action buttons in the actionbar should change their background when pressed, It works with Android 4.3 but not with Gingerbread. In Gingerbread if I press on a button it will not change the background. I even changed the selector: <style name="Theme.MyCustomTheme" parent="@style/Theme.AppCompat.Light"> <item name="selectableItemBackground">@drawable/actionbar_item_bg_selector</item> </style> And again it is working with Android 4.3 but

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"> <!--

Menu button crashes application when has overflow actions on API 7

只愿长相守 提交于 2019-12-10 14:54:13
问题 I am trying to implement Action Bar for API 7 and above. I am using Android Studio to create a new simple project with the following configuration: - Minimum SDK: API 7 - Target SDK: API 14 - Compile: Google APIs 14 - Theme: Holo Light with Dark Action Bar - Set the Create Activity , Fragments , Navigation Drawer , Action Bar Then in the next screen I select Blank Activity On the last screen I select Navigation Drawer for additional features. I run the application on the Emulator with API 14

Use AppCompat Library for ActionBar support

落爺英雄遲暮 提交于 2019-12-10 10:10:22
问题 I need to implement the actionbar in Android 2.x I've tried with this post and setup the support library as mentioned in thisofficial article. Here are the steps that I've followed for implement the ActionBar using the appcompat support library: First, I create the project with the following configuration (I don't create an icon and a default activity): Minimum Required SDK: API 10: Android 2.3.3 (Gingerbread) Target SDK: API 19: Android 4.4 Compile with: API 10: Android 2.3.3 (Gingerbread)

NullPointerException with ProgressBar using ActionBarCompat

心已入冬 提交于 2019-12-10 04:17:20
问题 I'm using ActionBarCompat in support-v7-r18. When trying to show an indeterminate progress, it works on Galaxy S3 Android 4.1.2 but doesn't on Galaxy Ace Android 2.3.3. I can't figure why. The code raising the exception : @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ... final ActionBarActivity activity = this; content = (WebView) findViewById(R.id.webContent); content.setWebViewClient(new WebViewClient() { @Override public void onPageStarted

android.view.InflateException: Binary XML file line #1: Error inflating class <unknown>

℡╲_俬逩灬. 提交于 2019-12-09 16:57:36
问题 Added ActionBarCompat + NavDrawer to my project, running on 4.3 device is smooth, on 2.3 device I get the following exception: 09-08 15:09:15.229: E/AndroidRuntime(2964): FATAL EXCEPTION: main 09-08 15:09:15.229: E/AndroidRuntime(2964): android.view.InflateException: Binary XML file line #1: Error inflating class <unknown> 09-08 15:09:15.229: E/AndroidRuntime(2964): at android.view.LayoutInflater.createView(LayoutInflater.java:518) 09-08 15:09:15.229: E/AndroidRuntime(2964): at com.android

Up ActionBar action on DialogFragment

谁说我不能喝 提交于 2019-12-09 16:32:55
问题 I have a DialogFragment that is styled to full screen using setStyle(STYLE_NORMAL, R.style.Theme_App) . The DialogFragment shows fine but the up action (the homeAsUp action on the ActionBar) does not work. I tried implementing onOptionsItemSelected in the DialogFragment but it is never called. Is there a way to get the up action callback in the DialogFragment so I can dismiss it ? For reference, I'm using ActionBarCompat . 回答1: There is no way to attach an ActionBar to the DialogFragment even

android title won't show in toolbar

痞子三分冷 提交于 2019-12-09 02:07:22
问题 I have an xml that I use with so many activities with fragments file but my problem is that I can't display the text I want in the toolbar, I use that xml that way because I have a navigation drawer and I needed to handle somethings so I had to do it that way. my xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/frame_container" android:layout_width="match_parent" android:layout_height="match_parent"