Tag: android-actionbar

Overflow button forces Action Mode to finish

I have an EditText and I want the user to be able to select some text and apply some basic formatting to the selected text (bold, italic, etc). I still want the standard copy, cut, paste options to show, though. I read somewhere in the Android documentation that to do this, you should call setCustomSelectionActionModeCallback() […]

AppCompat v7:21 Split Action Bar Broken?

I am currently developing an application in which I use a heavily modified Split Action Bar. Here is a link to the app’s current state: You’ll notice a transparent action bar up top, with a custom view inflated into it, with a hacked together split action bar on bottom. The bottom view is actually a […]

How to remove the margin between the app icon and the edge of the screen on the ActionBar?

I have a custom home icon for my app and I want it to align all the way to the left of the actionbar, so that it’s touching the edge of the screen. Is this possible, and if so, how can it be done? I don’t see anything that sets the padding or margin to […]

Custom image instead of logo in ActionBar/ActionBarSherlock

How can I change the default logo icon of an ActionBar to be a custom image? Similar as how it works on Whatsapp?

Activity extending ActionBarActivity and YouTubeBaseActivity

In my application I need to getSupportActionBar() in order to change its title and enable home as back button. I also need to have a YouTubePlayerView to display a video. I cannot extend ActionBarActivity and YouTubeBaseActivity in the same time. What is the proper way to solve such problem?

getSupportActionBar() returns null with Robolectric

The method getSupportActionBar() returns null when i invoke it through a Test Case based in Roboelectric and JUnit. This is my simple test case: package com.mobile.test; import static org.hamcrest.CoreMatchers.equalTo; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.Robolectric; import org.robolectric.RobolectricTestRunner; import android.app.Activity; import android.content.Intent; import com.mobile.android.core.R; import com.mobile.android.core.activity.MainActivity; import com.mobile.android.core.activity.TestActivity; @RunWith(RobolectricTestRunner.class) public […]

Android Studio “can't resolove symbol 'Theme'”

I’m using android studio 0.8.4 when I extend @style/Theme.AppCompat.Light, android studio says can’t resolove symbol ‘Theme’ with red font colored Theme. but when I run this project, it runs well. I can’t know how to solve this problem. belows are my codes. styles.xml <resources> <!– the theme applied to the application or activity –> <style […]

Action bar icon size in Android 4.2

Has the action bar icon size changed in Android 4.2 ? I’ve had a 120x48px HDPI icon that was rendered perfectly in Android 4.1 and below. It still is. However, on any 4.2 device, it is squelched to fit as 48x48px from what I can see. Or something like that; it’s definitely a square. Any […]

ActionBar border won't go away when in overlay

The problem is the following one : on one of my activities, I needed a custom layout for my action bar, and the only way to do it like needed was to have a transparent ActionBar over my screen. In order to do that, I marked the ActionBar as overlay, and specified the action bar […]

ActionBarSherlock: how to access home button view?

I am using ActionBarSherlock and want a similiar functionality of the home button as it is known by Google Maps. I already managed to open a QuickAction (http://code.google.com/p/simple-quickactions/) when pressing the home button with this piece of code: @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: View anchor = findViewById(R.id.text); // how […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.