android-3.0-honeycomb

Android Fragments and animation

你离开我真会死。 提交于 2019-11-26 00:26:34
问题 How should you implement the sort of sliding that for example the Honeycomb Gmail client uses? Can TransactionManager handle this automatically by adding and removing the Fragments, it\'s kind of difficult to test this due to the emulator being a slideshow :) 回答1: To animate the transition between fragments, or to animate the process of showing or hiding a fragment you use the Fragment Manager to create a Fragment Transaction . Within each Fragment Transaction you can specify in and out

Animate the transition between fragments

元气小坏坏 提交于 2019-11-26 00:23:18
问题 I\'m trying to animate the transition between fragments. I got the answer from the following Android Fragments and animation FragmentTransaction ft = getFragmentManager().beginTransaction(); ft.setCustomAnimations(R.anim.slide_in_left, R.anim.slide_out_right); DetailsFragment newFragment = DetailsFragment.newInstance(); ft.replace(R.id.details_fragment_container, newFragment, \"detailFragment\"); // Start the animated transition. ft.commit(); And my R.anim.slide_in_left <?xml version=\"1.0\"

MapView in a Fragment (Honeycomb)

*爱你&永不变心* 提交于 2019-11-26 00:06:25
now that the final SDK is out with google apis - what is the best way to create a Fragment with a MapView? MapView needs a MapActivity to work right. Having the Activity managing the Fragments inherit from MapActivity (bad solution because it goes against the idea that Fragments are self contained) and use a regular xml based layout does not work. I get a NullPointerException in MapActivity.setupMapView(): E/AndroidRuntime( 597): Caused by: java.lang.NullPointerException E/AndroidRuntime( 597): at com.google.android.maps.MapActivity.setupMapView(MapActivity.java:400) E/AndroidRuntime( 597): at

ActionBar text color

可紊 提交于 2019-11-25 22:44:34
问题 how can I change the text color of the ActionBar? I\'ve inherited the Holo Light Theme, I\'m able to change the background of the ActionBar but I don\'t find out what is the attribute to tweak to change the text color. Ok, I\'m able to change the text color with the attribute android:textColorPrimary but it also changes the text color of the dropdown menu displayed when an overflow happen on the ActionBar buttons. Any idea how to change the color of those dropdown menu / List ? 回答1: Ok, I've