Questions tagged [android-3.0-honeycomb]

Android 3.0 (codename Honeycomb) is API level 11 of the mobile operating system developed by Google. This version is an adaptation for larger screens to better support tablets.

3.0 (codename Honeycomb) is API level 11 of the mobile operating system developed by Google. This version is an adaptation for larger screens to better support tablets.

The SDK was released in the beginning of 2011. For details about features etc see: http://developer.android.com/sdk/android-3.0.html

893 questions
625
votes
13 answers

Why fragments, and when to use fragments instead of activities?

In Android API 11+, Google has released a new class called Fragment. In the videos, Google suggests that whenever possible (link1, link2), we should use fragments instead of activities, but they didn't explain exactly why. What's the purpose of…
312
votes
28 answers

ActionBar text color

how can I change the text color of the ActionBar? I've inherited the Holo Light Theme, I'm able to change the background of the ActionBar but I don't find out what is the attribute to tweak to change the text color. Ok, I'm able to change the text…
303
votes
9 answers

Animate the transition between fragments

I'm trying to animate the transition between fragments. I got the answer from the following Android Fragments and animation FragmentTransaction ft = getFragmentManager().beginTransaction(); ft.setCustomAnimations(R.anim.slide_in_left,…
Labeeb Panampullan
  • 34,521
  • 28
  • 94
  • 112
277
votes
6 answers

Android Fragments and animation

How should you implement the sort of sliding that for example the Honeycomb Gmail client uses? Can TransactionManager handle this automatically by adding and removing the Fragments, it's kind of difficult to test this due to the emulator being a…
alexanderblom
  • 8,632
  • 6
  • 34
  • 40
266
votes
8 answers

How do I add a Fragment to an Activity with a programmatically created content view

I want to add a Fragment to an Activity that implements its layout programmatically. I looked over the Fragment documentation but there aren't many examples describing what I need. Here is the type of code I tried to write: public class…
Tony Wong
  • 5,444
  • 5
  • 22
  • 18
245
votes
27 answers

How to hide action bar before activity is created, and then show it again?

I need to implement splash screen in my honeycomb app. I use this code in activity's onCreate to show splash: setContentView(R.layout.splash); getActionBar().hide(); and this code to show main UI after…
Ilya Izhovkin
  • 3,455
  • 4
  • 22
  • 25
187
votes
26 answers

getActionBar() returns null

I'm having an odd problem. I am making an app with targetsdk 13. In my main activity's onCreate method i call getActionBar() to setup my actionbar. This works fine when running on the Android 3.2 emulator, but when using Android 3.0 and 3.1 the…
Christian Skogsberg
  • 2,350
  • 2
  • 15
  • 12
153
votes
8 answers

Was PreferenceFragment intentionally excluded from the compatibility package?

I'm looking to write preferences that can be applied to both 3.0 and pre-3.0 devices. Discovering that PreferenceActivity contains deprecated methods (although these are used in the accompanying sample code), I looked at PreferenceFragement and the…
James
  • 3,729
  • 3
  • 20
  • 16
150
votes
8 answers

How to set a Fragment tag by code?

I haven't found something like setTag(String tagName) method in the Fragment class. The only way to set a Fragment tag that I have found is by doing a FragmentTransaction and passing a tag name as parameter. Is this the only way to explicitly set a…
Axel M. Garcia
  • 5,138
  • 9
  • 27
  • 29
149
votes
14 answers

How to implement the Android ActionBar back button?

I have an activity with a listview. When the user click the item, the item "viewer" opens: List1.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView arg0, View arg1, int arg2,long arg3) { …
Joaolvcm
  • 1,983
  • 3
  • 20
  • 24
115
votes
8 answers

Android: How to change the ActionBar "Home" Icon to be something other than the app icon?

My application's main icon consists of two parts in one image: a logo and a few letters below it. This works well for the launcher icon for the app, but when the icon appears on the left edge of the ActionBar, the letters get cut off and it doesn't…
Phil Ringsmuth
  • 2,037
  • 4
  • 20
  • 29
112
votes
7 answers

Changing overflow icon in the action bar

Is it possible to change the overflow icon in the action bar? I have blue icons for all ActionBar items and I also want to change the overflow icon when it appears.
109
votes
19 answers

SearchView's OnCloseListener doesn't work

I'm trying to add support for the SearchView in the Android 3.0+ ActionBar, but I can't get the OnCloseListener to work. Here's my code: @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu, menu); …
109
votes
10 answers

Is there a method that works like start fragment for result?

I currently have a fragment in an overlay. This is for signing in to the service. In the phone app, each of the steps I want to show in the overlay are their own screens and activities. There are 3 parts of the sign-in process and each had their own…
CACuzcatlan
  • 5,407
  • 8
  • 41
  • 59
105
votes
12 answers

Fragments onResume from back stack

I'm using the compatibility package to use Fragments with Android 2.2. When using fragments, and adding transitions between them to the backstack, I'd like to achieve the same behavior of onResume of an activity, i.e., whenever a fragment is…
1
2 3
59 60