android-3.0-honeycomb

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

梦想的初衷 提交于 2019-12-19 02:31:08
问题 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 make it align all the way to the left. 回答1: I finally managed to get this. You need to use a custom actionbar view. It's actually quite easy: (This is using ActionbarSherlock, it should work with the stock compat library also...) First in your

Why android:layout_width=”0px” for fragments?

放肆的年华 提交于 2019-12-19 00:08:31
问题 The layout width is always zero in fragment examples. What is behind this value? 回答1: To hopefully explain, take a look at the Design Philosophy for Fragments in the Dev Guide. If you look at the image, to the left it shows how a phone would show an intial Activity A which would then start Activity B when an item in a list is selected. To the right, however, it is showing how those two Activities can be shown as Fragments at the same time. Notice Fragment A is taking 1/3 of the screen and

SD card files updated programmatically are not updated in windows explorer

会有一股神秘感。 提交于 2019-12-18 16:57:10
问题 My application does file operations on the SD card (delete or update file). But when I connect the device to Windows 7 through USB, I do not see any changes. However I can confirm files where updated or deleted with adb shell. I use an ASUS eee Pad with Android 3.0. It seems devices running Android 3.0 have a different way to provide access to the file system (MTP instead of USB Mass Storage). I also read about how we can use MediaScannerConnection.scanFile to refresh the content of Windows

How to get the available Screen Height minus Navigation Bar in HoneyComb?

只愿长相守 提交于 2019-12-18 16:19:13
问题 Is there a way the measure the hight of the navigation bar at the bottom in pixels? 回答1: By the way... for anyone else like me who stumbled upon this question looking for the actual number, it's 48 pixels (on the Motorola Xoom, at least). This was based upon the debug output of this (admittedly crude) test Activity, combined with a Theme with no title bar (e.g., @android:style/Theme.NoTitleBar) and a single-View LinearLayout with both height and width set to "match_parent" (e.g., the one

android honeycomb menu button target

筅森魡賤 提交于 2019-12-18 13:16:30
问题 I am trying to get my app to be backward compatible so i need to show the menu button since we used the menu button in our app on previous versions. So I was reading and it says that if your target is 11 (3.0) than you don't get the menu button but it your target is 10 they you do. But the issue is I am using fragments so my target has to be 11. Any thoughts. 回答1: Ordinary options menus will appear regardless of Android version. If you have: android:targetSdkVersion="11" then the options menu

gcc ON arm/android

不羁的心 提交于 2019-12-18 12:18:56
问题 I just got a EEE pad transformer. Like any hardware I own I'd like to have a C compiler on it. I know I can cross compile, but I'd like to do development ON the device itself. I've searched google and all I can seem to find are pages on how to build an arm toolchain for x86/64 Linux. Thoughts? 回答1: The process of building gcc (et al.) to run on your target should be similar to building a cross-compiler, excepting that you will: need to have an ARM cross compiler that runs on your, for example

Replacing an ActionBar menu item icon with an indeterminate ProgressBar

只谈情不闲聊 提交于 2019-12-18 12:15:00
问题 I would like to add an indeterminate progress bar to the Honeycomb ActionBar, so that any time the user presses "Refresh", the refresh icon temporarily turns into an indeterminate progress bar, until the task completes. The Email app does this already, but I can't figure out how. Any advice? 回答1: Hard to tell exactly how the Email app does it, but you may want to stay simple and just call setIcon with the id of a StateDrawable XML file, and then just change the state using a Timer. 回答2: To

Patterns when to use Activity Transition vs Dynamic Fragments

半城伤御伤魂 提交于 2019-12-18 11:49:17
问题 Are there any patterns on how to handle UI Transitions in Android Activities vs Fragments? I am currently looking into a UI that has at most 3 columns in Landscape. I would like the UI to start with 1 column all the way across the screen and then on selection of something move in the second column and then on clicking on something in the second fade in the 3rd on tablets and phones and fade out the 1st column on phones. I am wondering when I should do this as an Activity transition and when I

How should a fragment get notified about the result of an asynchronous task?

女生的网名这么多〃 提交于 2019-12-18 11:48:25
问题 I have an Activity that uses fragments. These fragments may come and go, based on the users interactions. Many of these fragments launch jobs to an IntentService, which get to run async this way. How should the IntentService report back the results of these jobs? The fragment that started the job may of may not be present. If a job finishes and the starting fragment is currently active, then it should get notified about this, and act accordingly. If it's not, then no action is needed. I've

Android 3.x ONLY WebView Text Selection + JavaScript

核能气质少年 提交于 2019-12-18 11:33:00
问题 Problem domain: Android WebView based ePub format reader -- We need text highlights which are accessible via JavaScript methods (ie turn em on, turn em off, save them email them, etc) Anyone in the know, please correct me if I'm wrong: During text selection on a WebView -- Basically we are handed a TextView overlay (WebTextView) which is IN NO WAY attached to the underlying html other than visually (nice job on lining it all up and making it seamless, btw), on which we perform the