android-3.0-honeycomb

Adding a Fragment with add() method doesn't hide previous fragments

流过昼夜 提交于 2020-01-01 09:46:55
问题 I'm experiencing "unexpected behaviour" when using add() method to add a new fragment. I want to add a new fragment on a FrameLayout, but when I do it the previous fragment stills visible. Is this the expected result when using add() method? It is because I am using a FrameLayout and add() method just place a fragment over the FrameLayout without affect the previous one? Thx 回答1: Not a bug. Try replace(..). instead adding to the back stack if required. EDIT I think that using replace or

Global Loader (LoaderManager) for reuse in multiple Activities / Fragments

余生颓废 提交于 2020-01-01 07:42:04
问题 What I would like to achieve: I have two different fragments. I would like them both to show the same data in two forms (in a list and on a map). I would like them to share one Loader ( AsyncTaskLoader in particular). Everything works fine, but the Loader isn't re-used. Another one is created and the data is loaded twice. What I do: In the Fragment s I use LoaderManager lm = getActivity().getSupportLoaderManager(); In both of them I implement LoaderCallbacks<ArrayList<Item>> and the required

Implementing ActionBar tabs with v4 Fragments API

六月ゝ 毕业季﹏ 提交于 2020-01-01 01:13:14
问题 My app is currently using the Fragments/v4 compatibility package to support Android versions all the way down to 1.6. This means all my Fragments inherit from the compatibility package's version of Fragment . I'm currently trying to rework parts of the app to take advantage of Honeycomb features, like ActionBar . I already use my own action-bar-like implementation on pre-3.0 devices, and the Honeycomb Action Bar otherwise. This bit isn't an issue. The problem I have is trying to implement

Honeycomb themes *.NoActionBar or *.NoTitleBar - where is Menu button?

匆匆过客 提交于 2019-12-30 08:16:07
问题 My manifest setup: targetSdkVersion=11 I have Activity with theme set to android:style/Theme.Holo.NoActionBar or android:style/Theme.NoTitleBar Desired result: app that doesn't show top bar (action bar or title bar), and has menu. I want almost full screen (video player or image viewer) possibly with dimmed status bar. Problem is that in such combination, there's no way to push menu button, because there's no Menu button shown. If targetSdkVersion is <11, then there's legacy Menu button at

Custom Action View can't be clicked

走远了吗. 提交于 2019-12-29 22:58:07
问题 I am trying to add a custom ActionView to my ActionBar . I am trying to add the common refresh button. ( ImageButton , ProgressBar inside a FrameLayout ) but if I use an ActionView onOptionsItemSelected() is never called. Here's the code: In my Activity : @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.messages_actionbar, menu); mRefreshView = (RefreshView) menu.findItem(R.id.messages_refresh).getActionView(); return

Google Calendar API OAuth2 Troubles on Android Honeycomb

南笙酒味 提交于 2019-12-29 05:28:08
问题 I am working on an Android Honeycomb (v3.0) application that has a requirement of communicating with the Google Calendar API. I would like to allow my application to access a particular Google account's Calendar data in order to read and create events. Unfortunately, I ran into a problem with authorization using OAuth2. Here's what I have so far: 1) The Google account whose calendar I would like to access is registered within the Android device I am working with. 2) I enabled the Calendar API

toddler safe app on android

*爱你&永不变心* 提交于 2019-12-29 04:28:06
问题 I have an app, that should be toddler safe. Meaning that, it blocks any single key touch, yet handles long pressing for exiting the app. This is so that, the toddler will be safe from doing (too) nasty things while playing. Up to version 2.3.4, I succeeded in achieving this. However, now I have 2 problems: On honeycomb, I have the status bar notifications which can be pressed on. Also , I have the switch-windows key which can be pressed. The only thing I succeeded with it is to dim the status

HLS (http live streaming) on Android 3.0 and seeking

穿精又带淫゛_ 提交于 2019-12-29 03:52:05
问题 We have a provider that gives us m3u8 files for HLS streams (originally intended for use in an iOS app). Android 3.0+ supports http live streaming (http://developer.android.com/guide/appendix/media-formats.html) - and we can in fact play these m3u8 files using the standard VideoView on Android 3.0+. EDIT: Android seems to treat this as "real-time" video feed, and disables the ability to seek or calculate a video duration. (Where-as iOS let's you seek within the stream without issue) Is there

How Android application decide if they want to use network proxy or not

好久不见. 提交于 2019-12-29 01:29:30
问题 I have been running some testing with wifi proxy settings on a Motorola Xoom with Android 3.2. So first of all, it is a big step forward comparing to 2.x releases. now if you set proxy, most of the apps automatically get it (in 2.x, only builtin browser uses it). So I tried things like yahoo finance, bloomberg, etc. and they all going through proxy fine. What I don't get is some browsers like firefox, Opera, will not go through proxy. Any idea how they did that. Basically in my app, how can I

Is there a way to hide the system bar in Android 3.0? It's an internal device and I'm managing navigation

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-27 10:41:59
问题 In Android 2.3 and below, you could make an application full screen, and then "hijack" the menu/back/search buttons by just returning false onKeyDown()... and registering the app as a default home launcher application, that way, there's no way to exit the application. In Android 3.0 (Honeycomb) the navigation buttons (System Bar) is always present, I'd like to hide it. Is it possible? FYI, I am not publishing this application on the Android Market. This is an internal application for devices