android-3.0-honeycomb

How to add a Dropdown item on the action bar

守給你的承諾、 提交于 2019-11-26 12:02:29
In my Android Honeycomb application I use Tabs as the navigation style. I would like to add one item next to the overflow button, but I want that item to be a dropdown list, and the user will be able to select an option there, but not related to navigation. What is the easiest way since I'm using mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); Is it possible to do it without using a custom view? fhucho First option: menu/options.xml: <item android:icon="@drawable/ic_menu_sort" android:showAsAction="ifRoom"> <menu> <item android:id="@+id/menuSortNewest" android:title="Sort by

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

江枫思渺然 提交于 2019-11-26 11:44:14
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 that are going to be used internally, I need to secure the device. You cannot hide the system bar on

Custom Translucent Android ActionBar

早过忘川 提交于 2019-11-26 10:07:35
问题 I\'ve been scouring the interwebs (e.g. Android documentation, answers here, etc.) for the answer to what I thought would be a fairly trivial question. How do you achieve a translucent action bar like the ones in Google Music and YouTube (links are image examples)? I want video content to be full screen and not constrained/pushed down by the action bar while still leveraging the benefits of a built in UI component. I can obviously use a completely custom view, but I\'d rather leverage the

Disable Home Button in Android ICS (4.0)

笑着哭i 提交于 2019-11-26 09:45:02
问题 I am making a proprietary app for a company which will never release it to the Android Market (or Play Store I guess now) in Ice Cream Sandwich (Android 4.0). I need to disable the Home so the users cannot maliciously uninstall software or delete the data that the app captures. This latest version is the first to be written in 4.0, the previous versions were written in 2.2 and 3.2. For disabling the Home button in 2.2, I associated the app as a home replacement, so the button just reopened

Android replace the current fragment with another fragment

試著忘記壹切 提交于 2019-11-26 09:38:43
问题 I just started with fragment design for HoneyComb. I created two fragments. When i click a button in the left side fragment, a new fragment is created in right side. Meanwhile when i click a button in the right fragment(ie. DetialsFragment in my code below should be replaced by another fragment. main.xml <?xml version=\"1.0\" encoding=\"utf-8\"?> <LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\" android:layout_width=\"match_parent\" android:layout_height=\"match

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

被刻印的时光 ゝ 提交于 2019-11-26 08:46:14
问题 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

How to implement the Android ActionBar back button?

时光总嘲笑我的痴心妄想 提交于 2019-11-26 08:43:47
问题 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);

Font size too large to fit in cache

你离开我真会死。 提交于 2019-11-26 08:23:04
问题 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

Is there a way to get references for all currently active fragments in an Activity?

耗尽温柔 提交于 2019-11-26 08:07:48
问题 I haven\'t found a simple way to get all currently active (visible, currently in Resumed state) Fragments in an Activity. Is it possible without custom bookkeeping in my Activity? It seems that the FragmentManager doesn\'t support this feature. 回答1: Looks like the API currently misses a method like "getFragments". However using the event "onAttachFragment" of class Activity it should be quite easy to do what you want. I would do something like: List<WeakReference<Fragment>> fragList = new

HW accelerated activity - how to get OpenGL texture size limit?

馋奶兔 提交于 2019-11-26 07:25:22
问题 I\'m trying to enable hw acceleration in Honeycomb, and display some Bitmaps on Canvas. All works fine, but for large bitmaps (>2048 in one dimension), I get error in log: OpenGLRenderer: Bitmap too large to be uploaded into a texture I know this is because of hw limitation, and can work-around it by reducing max bitmap size to be displayed if hw acceleration is enabled (checking by View.isHardwareAccelerated()). My question is: how to easily determine max texture size available for Bitmap