android-3.0-honeycomb

Android Fragment Duplication

天涯浪子 提交于 2019-12-10 23:22:44
问题 I'm trying out the new class in android Honeycomb preview, and I've got a small issue. I am making a baseball scoring app, and I want the buttons on the left (Action Menu) to switch the "Action Pane" on the right, which I've set up as a fragment. I'd like the buttons' onClickListener() to call a Fragment Transaction to swap it out. So far it works, EXCEPT that when the app loads, it creates the default fragment, but when I hit a button, instead of REPLACING the default fragment, it creates a

How do I control the soft menu button in Honeycomb?

心不动则不痛 提交于 2019-12-10 22:35:32
问题 I have an app in which I want to turn the menu button off (I'm picking up someone else's project and am not sure what is provoking the menu button to appear)... it doesn't *do anything. Is there a way to turn off that icon manually? Or do I have to hunt down the reason for its being displayed in the first place? (please no flak for looking for a workaround, obviously in an ideal world I'd be familiar enough with the code to know why the menu button is being generated, but time is of the

How to create a custom Pulldown in the Honeycomb ActionBar?

。_饼干妹妹 提交于 2019-12-10 17:34:55
问题 I would like to add a custom pulldown menu to the actionbar in my project similar to the one that can be found in the google books app (screen). In this case it represents the complete table of contents of the book. I tried to follow the guide from the developer site where there is an example with a SpinnerAdapter. But when i use a custom Layout (in my case a RelativeLayout with two TextViews in it) i get an Exception that saying "ArrayAdapter requires the resource ID to be a TextView". So i

Fragments behaviour: FragmentTransaction::replace() and reverse backStack operation

房东的猫 提交于 2019-12-10 13:58:15
问题 I call this method to go forward from AFrag to BFrag: showFragment() { FragmentTransaction fragmentTransaction = mFragmentMgr.beginTransaction(); // Add fragment to the container ContentView fragmentTransaction.replace(R.id.operation_fragments_frame, mBFrag, mBFrag.getTag()); // Add FADE effect fragmentTransaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE); // Keep the transaction in the back stack so it will be reversed when backbutton is pressed fragmentTransaction

Is it possible to animate a DialogFragment?

牧云@^-^@ 提交于 2019-12-10 13:49:12
问题 I tried various samples regarding animation of fragments, but nothing happens so is DialogFragment not a "proper" fragment? Or am I missing something here? FragmentTransaction ft = getFragmentManager().beginTransaction(); InfoDialogFragment newFragment = InfoDialogFragment.newInstance(); newFragment.setAsset(mainShow, c,backgroundDrawable); ft.setCustomAnimations(R.anim.grow_in, R.anim.fadeout); ft.add(newFragment, "dialog"); ft.commit(); ... public class InfoDialogFragment extends

Honeycomb - customize SearchView inside the action bar

让人想犯罪 __ 提交于 2019-12-10 12:46:34
问题 I have a field where the user can type a search query in the action bar of the application. This is declared in the action bar using a menu inflate in the Activity: <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/action_search" android:showAsAction="ifRoom" android:actionViewClass="android.widget.SearchView" android:title="@string/search" ></item> </menu> I need to customize the appearance of the SearchView (for instance background and text color). So

OpenGL random crash on Honeycomb with Hardware Accelerated param set to true

ぃ、小莉子 提交于 2019-12-10 11:16:15
问题 I am experiencing a big probleme on Android Honeycomb 3.0 (Acer Iconia). I don't use any openGL view, I only set in the manifest android:hardwareAccelerated="true" The fact is that when I load a view with a certain amount of pictures, and I change its content and background several times on clicking on a button, my intent finishes and the previous intent appears. I thinks I well manage memory. This message appears when it appends: 06-22 10:13:53.510: ERROR/libEGL(951): call to OpenGL ES API

DexClassLoader on Android Honeycomb

我的未来我决定 提交于 2019-12-10 03:15:04
问题 I'm working on a project that tries to load an external library via DexClassLoader. This worked pretty well in 2.3: public class FormularDisplayLoader { public final static String PATH ="/data/data/at.mSystem.client/files/mSystem_Client_FormularLibrary.jar"; private DexClassLoader classLoader; public FormularDisplayLoader(Context context){ this.context = context; this.classLoader = new DexClassLoader("/data/data/at.mSystem.client/ files/mSystem_Client_FormularLibrary.jar", context.getFilesDir

Does “Clear Data” also kill the app?

混江龙づ霸主 提交于 2019-12-10 01:42:47
问题 When (in Gingerbread, 2.3.x) I hit “Clear Data” button in Menu => Manage Apps => App, “Force Close” button also becomes disabled. Does it mean that “Clear Data” also kills the app? Also, I noticed that in Ice Cream Sandwich this doesn’t happen. So, the way “Clear Data” works is different between Gingerbread and Ice Cream Sandwich? Update : as MisterSquonk said, Froyo (2.2.x) behaves the same way as ICS (4.x), that is doesn’t disable Force Close after you clear data of the app. Anyone knows

ListView row marker ala GMail

我们两清 提交于 2019-12-09 06:54:55
问题 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