android-3.0-honeycomb

Font size too large to fit in cache

岁酱吖の 提交于 2019-11-27 01:35:23
So i recently switched to android 3.0 (honeycomb) and i'm having some issues with hardware rendering, specifically at a certain custom view i've written where I use a font size of 200 to display some text. Unfortunately it seems the openGLRenderer doesn't like that kind of rather large font sizes very much, given the error i'm getting in the log: 06-06 16:22:00.080: ERROR/OpenGLRenderer(2503): Font size to large to fit in cache. width, height = 97, 145 Are there ways around this (or ways to fix it) such that I can get the text displayed at the wanted font size? Just an idea: Perhaps you can

Is there a standard way to add dividers between action bar items in Android 3.0?

走远了吗. 提交于 2019-11-27 01:23:36
问题 I have a slight problem trying to customise the look of the action bar in my app. I want to be able to have the pixel wide dividers to group action bar items that you see in many of the native apps (e.g. Gmail, Calendar). I found a way to do this by adding a menu item and setting the 'android:actionLayout' attribute to a custom layout for the divider: <View android:background="@color/LightGray" android:layout_marginTop="5dip" android:layout_marginBottom="5dip" android:layout_width="1dip"

Proguard error when exporting signed app using android.support.v4.app honeycomb compatibility package

試著忘記壹切 提交于 2019-11-27 01:03:32
问题 I am using v4 compatibility package in my project, but when I try to export a signed app, I get the following message from Proguard. I've Googled the whole evening, but I didn't find the answer to solve this. [2011-07-03 01:46:29 - worldscopeApp] Proguard returned with error code 1. See console [2011-07-03 01:46:29 - worldscopeApp] Warning: android.support.v4.app.ActivityCompatHoneycomb: can't find referenced method 'void invalidateOptionsMenu()' in class android.app.Activity [2011-07-03 01

Where is API call to do “lights out mode” in honeycomb?

爷,独闯天下 提交于 2019-11-27 00:57:38
问题 I am working on a game and would like to have the full screen to itself. Did anyone found a way to make the app go full screen on Android Honeycomb preview emulator? 回答1: Lights out mode has changed in the full 3.0 SDK. You can now enter lights out mode as follows: View v = findViewById(R.id.view_id); v.setSystemUiVisibility(View.STATUS_BAR_HIDDEN); You can also set a listener on the view to be notified on changes to the system bar's visibility. 回答2: In prior versions of Android you can set

Action bar custom view

淺唱寂寞╮ 提交于 2019-11-27 00:43:35
问题 I want to declare a custom view, BUT I also want the home logo with up icon to appear on the left with its default functionality. How can I achieve to use both? 回答1: Best way is to use XML styles: <style name="Theme.Main" parent="android:Theme.Holo.Light"> <item name="android:actionBarStyle">@style/Widget.ActionBar</item> </style> <style name="Widget.ActionBar" parent="android:Widget.Holo.Light.ActionBar"> <item name="android:displayOptions">showHome|useLogo|showCustom</item> <item name=

Android - can I increase the textSize for the NumberPicker widget?

我的未来我决定 提交于 2019-11-27 00:28:26
问题 We got a NumberPicker widget in 3.0, but it seems that the textSize for this widget can't be modified. Am I missing something or is this the case? I'd really like to increase the font size, it's quite small with the default value. But I can't see a textSize property for it. 回答1: We ran into the same problem and ended up recreating NumberPicker locally. There's a more in depth tutorial here. 回答2: I was able to accomplish this by extending the default NumberPicker. Not ideal, but it works.

Change theme according to android version

一世执手 提交于 2019-11-27 00:23:22
问题 I am preparing my app to work smoothly with honeycomb. I have an small aesthetics question regarding with the android theme. For honeycomb it is recommended that the following theme is used. android:theme="@android:style/Theme.Holo.Light" How can I make my app use another theme when it is used in a previous version? Thanks in advance 回答1: EDIT : Updated for released version of the 3.0 SDK. One way to do this is to set <uses-sdk android:targetSdkVersion="11"> . You should also place this above

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

蓝咒 提交于 2019-11-26 23:28:30
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 look good. I would like to provide the ActionBar with a separate version of the icon, with only the "logo" part and not the letters beneath it, but so far have been coming up empty. I honestly can't find any answer to this, and I can't even find the question itself anywhere. The ActionBar will use the android:logo attribute of your manifest, if one

How to implement the Android ActionBar back button?

落花浮王杯 提交于 2019-11-26 23:24:43
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) { Intent nextScreen = new Intent(context,ServicesViewActivity.class); String[] Service = (String[])List1.getItemAtPosition(arg2); //Sending data to another Activity nextScreen.putExtra("data", datainfo); startActivityForResult(nextScreen,0); overridePendingTransition(R.anim.right_enter, R.anim.left_exit); } }); This works fine, but on the actionbar the back arrow

How to invoke the ActionBar's ContextMenu-like behavior?

余生颓废 提交于 2019-11-26 22:57:37
问题 In Android 3.0, when you select some text for example, the ActionBar switches to a ContextMenu-like mode, which enables you to do actions with the selected text: copy/share/etc, and a "Done" button appears on the left side to enable the user to leave this mode. How can I switch the ActionBar into this mode in my app (with my menu items of course)? I just couldn't find this in the docs. 回答1: Yeah, I couldn't find it either -- I had to ask at Google I|O. Use startActionMode(). Here is one of