android-3.0-honeycomb

How Fragments affect the Activity “single, focused thing that the user can do” principle?

試著忘記壹切 提交于 2019-12-03 11:50:04
As Android documentation states: "An activity is a single, focused thing that the user can do." However with Fragments we will be able to do many "things" within the same Activity as Reto Meier suggest . His suggestion is to replace a selection fragment by a content fragment within the same Activity (section "Within our code this produces a dilemma"). Lets say my application is a "bit" more complex, with many activities, with a complex navigation tree and designed with the "single, focused thing that the user can do" principle in mind. Lets say now I have to adapt it to Fragments and large

Does Android's large heap option work for older phones upgraded to ICS?

浪尽此生 提交于 2019-12-03 09:04:27
问题 I've got a Galaxy Nexus myself, and I know that the android:largeHeap="true" manifest option works on this phone, but I was wondering if it's working on older phones that are being upgraded to Ice Cream Sandwich, i.e. the Samsung Nexus S. The reason why I'm asking is that I've built an application that makes heavy use of large bitmaps and the application was originally designed for tablets with 48 MB of heap size. The Galaxy Nexus also features 48 MB of available heap size for each

Which APIs are supported when hardware acceleration is enabled on Honeycomb?

半世苍凉 提交于 2019-12-03 08:57:29
The Honeycomb docs are vague: When the hardware-accelerated renderer is enabled, most operations in Canvas, Paint, Xfermode, ColorFilter, Shader, and Camera are accelerated. Is there a definitive list of the exact APIs that are (and are not) supported when hardware acceleration is enabled? Some methods fail fast with exceptions, while other features simply render differently when acceleration is enabled. For example, Canvas.clipPath(...) fails fast with an exception. Though the clipPath API makes no mention of this, it is easy enough to determine when testing on real hardware. Other features

ActionBar Dropdown Spinner item defaults to first item

半腔热情 提交于 2019-12-03 08:48:02
问题 I'm trying to set the index of the item that needs to be selected in the spinner by default, but it always defaults to 0 (1st item) actionBar.setDisplayShowTitleEnabled(false); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST); SpinnerAdapter spinnerAdapter = new ArrayAdapter<String>(activity, android.R.layout.simple_spinner_dropdown_item, names); int selectedIndex = actionBar.getSelectedNavigationIndex(); if (selectedIndex != targetIndex) { actionBar.setSelectedNavigationItem

ListView row marker ala GMail

落花浮王杯 提交于 2019-12-03 08:44:47
I am interested in creating a ListView where each row is marked the way it is done in GMail for 3.0+. This creates a nice separation of the left and right ListFragment. Other examples include also Google Calendar on 2.3.4 for instance where a color marker is on the left of the ListView. See the grey vertical divider between the two lists. How does one achive something like this? A bonus would be also the alternating width, but I guess that is only a smaller layout change. I know I could probably do something like inserting an ImageView in there and then fill it with the color I would like but

Is there a way to display fragments in TabHost?

心已入冬 提交于 2019-12-03 08:28:09
I'd like to show a different fragment in a TabHost, for every tab. But it seems that there's no easy way to do this. TabHost can only accept A. Views or B. Intents that launch Activities when the user selects a tab. Going with A means that I have to initialize every fragment and load them into container Views that are given to the TabHost. But I want these fragments to load only when needed - when the user selects their tab that is. Going with B means that I load the fragments into separate Activities for each tab. But I'd like the fragment to be able to reach the "original" parent Activity,

How do I access PreferenceFragment by id?

流过昼夜 提交于 2019-12-03 08:25:43
I have a Honeycomb style preferences. I define the headers: <preference-headers xmlns:android="http://schemas.android.com/apk/res/android"> <header android:id="@+id/pref_general" android:fragment="MyPreferencesFragment" android:title="@string/pref_general_title"> <extra android:name="resource" android:value="pref_general" /> </header> <header android:id="@+id/pref_sharing" android:fragment="MyPreferencesFragment" android:title="@string/pref_sharing_title"> <extra android:name="resource" android:value="pref_sharing" /> </header> </preference-headers> Then I load them in PreferenceActivity:

Honeycomb Android emulator is dog slow - will it get manageable before the official release? [closed]

好久不见. 提交于 2019-12-03 08:08:40
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . I thought the Gingerbread emulator was slow, but man - the Honeycomb emulator is so slow on a modern PC, it's practically unusable.

Can Honeycomb Loaders solve problems with AsyncTask + UI update?

你说的曾经没有我的故事 提交于 2019-12-03 06:01:23
问题 Doing something in background and then updating UI is very hard to implement correctly in Android. It's simply badly designed. Typical example is an AsyncTask that fetches something from the web and displays the result. There are 2 problems with this: The AsyncTask has a reference to Activity (because it needs to update its UI). After screen orientation change, the Activity is restarted. But the AsyncTask still references to the old destroyed Activity therefore it can't update the UI of the

Is it possible to get the resolution of a video in Android?

▼魔方 西西 提交于 2019-12-03 05:53:21
问题 I'm looking for a way to get the resolution of any given video in Android. It doesn't have to work with other formats than the ones supported in Android, but it'd be great if it did. If you're unsure of the supported formats in Android, please refer to this page: http://developer.android.com/guide/appendix/media-formats.html I think it's possible to do what I want using the MediaPlayer class, but that seems incredibly stupid and inefficient. Also, I'd like a way that's relatively fast. I'm