gametel 0.3 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/features/main_screen.feature +1 -1
- data/features/step_definitions/button_steps.rb +1 -1
- data/features/step_definitions/main_screen_steps.rb +1 -2
- data/features/support/env.rb +24 -1
- data/features/text.feature +0 -12
- data/features/view.feature +0 -1
- data/lib/gametel.rb +3 -4
- data/lib/gametel/accessors.rb +0 -1
- data/lib/gametel/platforms/brazenhead/basic.rb +17 -0
- data/lib/gametel/platforms/brazenhead/spinner.rb +17 -0
- data/lib/gametel/platforms/brazenhead/text.rb +39 -0
- data/lib/gametel/platforms/brazenhead/view.rb +24 -0
- data/lib/gametel/platforms/brazenhead_platform.rb +139 -0
- data/lib/gametel/version.rb +1 -1
- data/spec/lib/gametel/accessors_spec.rb +46 -31
- data/spec/lib/gametel_spec.rb +30 -12
- data/spec/spec_helper.rb +4 -2
- metadata +32 -897
- data/.calabash_settings +0 -1
- data/.gitignore +0 -26
- data/.irbrc +0 -16
- data/.rspec +0 -2
- data/.rvmrc +0 -1
- data/.travis.yml +0 -5
- data/ApiDemos/.classpath +0 -8
- data/ApiDemos/.project +0 -33
- data/ApiDemos/.settings/org.eclipse.jdt.core.prefs +0 -4
- data/ApiDemos/AndroidManifest.xml +0 -2715
- data/ApiDemos/README.txt +0 -19
- data/ApiDemos/assets/HelloActivity.apk +0 -0
- data/ApiDemos/assets/fonts/samplefont.ttf +0 -0
- data/ApiDemos/assets/read_asset.txt +0 -3
- data/ApiDemos/build.xml +0 -83
- data/ApiDemos/proguard-project.txt +0 -20
- data/ApiDemos/project.properties +0 -14
- data/ApiDemos/res/anim/animator.xml +0 -23
- data/ApiDemos/res/anim/animator_set.xml +0 -32
- data/ApiDemos/res/anim/color_animator.xml +0 -23
- data/ApiDemos/res/anim/cycle_7.xml +0 -17
- data/ApiDemos/res/anim/fade.xml +0 -20
- data/ApiDemos/res/anim/hold.xml +0 -20
- data/ApiDemos/res/anim/hyperspace_in.xml +0 -17
- data/ApiDemos/res/anim/hyperspace_out.xml +0 -61
- data/ApiDemos/res/anim/layout_animation_row_left_slide.xml +0 -19
- data/ApiDemos/res/anim/layout_animation_row_right_slide.xml +0 -20
- data/ApiDemos/res/anim/layout_animation_table.xml +0 -19
- data/ApiDemos/res/anim/layout_bottom_to_top_slide.xml +0 -20
- data/ApiDemos/res/anim/layout_grid_fade.xml +0 -20
- data/ApiDemos/res/anim/layout_grid_inverse_fade.xml +0 -21
- data/ApiDemos/res/anim/layout_random_fade.xml +0 -20
- data/ApiDemos/res/anim/layout_wave_scale.xml +0 -21
- data/ApiDemos/res/anim/object_animator.xml +0 -23
- data/ApiDemos/res/anim/push_left_in.xml +0 -20
- data/ApiDemos/res/anim/push_left_out.xml +0 -20
- data/ApiDemos/res/anim/push_up_in.xml +0 -20
- data/ApiDemos/res/anim/push_up_out.xml +0 -20
- data/ApiDemos/res/anim/shake.xml +0 -17
- data/ApiDemos/res/anim/slide_left.xml +0 -20
- data/ApiDemos/res/anim/slide_right.xml +0 -20
- data/ApiDemos/res/anim/slide_top_to_bottom.xml +0 -20
- data/ApiDemos/res/anim/wave_scale.xml +0 -33
- data/ApiDemos/res/anim/zoom_enter.xml +0 -28
- data/ApiDemos/res/anim/zoom_exit.xml +0 -33
- data/ApiDemos/res/animator/fragment_slide_left_enter.xml +0 -32
- data/ApiDemos/res/animator/fragment_slide_left_exit.xml +0 -32
- data/ApiDemos/res/animator/fragment_slide_right_enter.xml +0 -32
- data/ApiDemos/res/animator/fragment_slide_right_exit.xml +0 -32
- data/ApiDemos/res/drawable-hdpi/alert_dialog_icon.png +0 -0
- data/ApiDemos/res/drawable-hdpi/apidemo_androidlogo.png +0 -0
- data/ApiDemos/res/drawable-hdpi/app_sample_code.png +0 -0
- data/ApiDemos/res/drawable-hdpi/arrow_down_float.png +0 -0
- data/ApiDemos/res/drawable-hdpi/arrow_up_float.png +0 -0
- data/ApiDemos/res/drawable-hdpi/btn_check_off.png +0 -0
- data/ApiDemos/res/drawable-hdpi/btn_check_on.png +0 -0
- data/ApiDemos/res/drawable-hdpi/btn_circle_normal.png +0 -0
- data/ApiDemos/res/drawable-hdpi/btn_default_normal.9.png +0 -0
- data/ApiDemos/res/drawable-hdpi/button.9.png +0 -0
- data/ApiDemos/res/drawable-hdpi/ic_contact_picture.png +0 -0
- data/ApiDemos/res/drawable-hdpi/ic_launcher_settings.png +0 -0
- data/ApiDemos/res/drawable-hdpi/ic_popup_reminder.png +0 -0
- data/ApiDemos/res/drawable-hdpi/icon48x48_2.png +0 -0
- data/ApiDemos/res/drawable-hdpi/logo240dpi.png +0 -0
- data/ApiDemos/res/drawable-hdpi/npatch240dpi.9.png +0 -0
- data/ApiDemos/res/drawable-hdpi/progress_circular_background.png +0 -0
- data/ApiDemos/res/drawable-hdpi/progress_particle.png +0 -0
- data/ApiDemos/res/drawable-hdpi/reslogo240dpi.png +0 -0
- data/ApiDemos/res/drawable-hdpi/scrollbar_state2.png +0 -0
- data/ApiDemos/res/drawable-hdpi/smlnpatch240dpi.9.png +0 -0
- data/ApiDemos/res/drawable-hdpi/star_big_on.png +0 -0
- data/ApiDemos/res/drawable-hdpi/stat_happy.png +0 -0
- data/ApiDemos/res/drawable-hdpi/stat_neutral.png +0 -0
- data/ApiDemos/res/drawable-hdpi/stat_sad.png +0 -0
- data/ApiDemos/res/drawable-hdpi/stat_sample.png +0 -0
- data/ApiDemos/res/drawable-hdpi/stylogo240dpi.png +0 -0
- data/ApiDemos/res/drawable-ldpi/logo120dpi.png +0 -0
- data/ApiDemos/res/drawable-ldpi/npatch120dpi.9.png +0 -0
- data/ApiDemos/res/drawable-ldpi/reslogo120dpi.png +0 -0
- data/ApiDemos/res/drawable-ldpi/smlnpatch120dpi.9.png +0 -0
- data/ApiDemos/res/drawable-ldpi/stylogo120dpi.png +0 -0
- data/ApiDemos/res/drawable-mdpi/alert_dialog_icon.png +0 -0
- data/ApiDemos/res/drawable-mdpi/apidemo_androidlogo.png +0 -0
- data/ApiDemos/res/drawable-mdpi/app_sample_code.png +0 -0
- data/ApiDemos/res/drawable-mdpi/arrow_down_float.png +0 -0
- data/ApiDemos/res/drawable-mdpi/arrow_up_float.png +0 -0
- data/ApiDemos/res/drawable-mdpi/btn_check_off.png +0 -0
- data/ApiDemos/res/drawable-mdpi/btn_check_on.png +0 -0
- data/ApiDemos/res/drawable-mdpi/btn_circle_normal.png +0 -0
- data/ApiDemos/res/drawable-mdpi/btn_default_normal.9.png +0 -0
- data/ApiDemos/res/drawable-mdpi/button.9.png +0 -0
- data/ApiDemos/res/drawable-mdpi/ic_contact_picture.png +0 -0
- data/ApiDemos/res/drawable-mdpi/ic_launcher_settings.png +0 -0
- data/ApiDemos/res/drawable-mdpi/ic_popup_reminder.png +0 -0
- data/ApiDemos/res/drawable-mdpi/ic_settings_applications.png +0 -0
- data/ApiDemos/res/drawable-mdpi/ic_settings_display.png +0 -0
- data/ApiDemos/res/drawable-mdpi/icon48x48_2.png +0 -0
- data/ApiDemos/res/drawable-mdpi/progress_circular_background.png +0 -0
- data/ApiDemos/res/drawable-mdpi/progress_particle.png +0 -0
- data/ApiDemos/res/drawable-mdpi/scrollbar_state2.png +0 -0
- data/ApiDemos/res/drawable-mdpi/star_big_on.png +0 -0
- data/ApiDemos/res/drawable-mdpi/stat_happy.png +0 -0
- data/ApiDemos/res/drawable-mdpi/stat_neutral.png +0 -0
- data/ApiDemos/res/drawable-mdpi/stat_sad.png +0 -0
- data/ApiDemos/res/drawable-mdpi/stat_sample.png +0 -0
- data/ApiDemos/res/drawable-nodpi/frantic.jpg +0 -0
- data/ApiDemos/res/drawable-nodpi/logonodpi120.png +0 -0
- data/ApiDemos/res/drawable-nodpi/logonodpi160.png +0 -0
- data/ApiDemos/res/drawable-nodpi/logonodpi240.png +0 -0
- data/ApiDemos/res/drawable-xhdpi/ic_launcher_settings.png +0 -0
- data/ApiDemos/res/drawable/animated_gif.gif +0 -0
- data/ApiDemos/res/drawable/balloons.jpg +0 -0
- data/ApiDemos/res/drawable/beach.jpg +0 -0
- data/ApiDemos/res/drawable/black_box.xml +0 -21
- data/ApiDemos/res/drawable/black_opaque_box.xml +0 -21
- data/ApiDemos/res/drawable/box.xml +0 -24
- data/ApiDemos/res/drawable/circular_progress.xml +0 -29
- data/ApiDemos/res/drawable/filled_box.xml +0 -25
- data/ApiDemos/res/drawable/frog.gif +0 -0
- data/ApiDemos/res/drawable/gallery_background_1.xml +0 -20
- data/ApiDemos/res/drawable/gallery_photo_1.jpg +0 -0
- data/ApiDemos/res/drawable/gallery_photo_2.jpg +0 -0
- data/ApiDemos/res/drawable/gallery_photo_3.jpg +0 -0
- data/ApiDemos/res/drawable/gallery_photo_4.jpg +0 -0
- data/ApiDemos/res/drawable/gallery_photo_5.jpg +0 -0
- data/ApiDemos/res/drawable/gallery_photo_6.jpg +0 -0
- data/ApiDemos/res/drawable/gallery_photo_7.jpg +0 -0
- data/ApiDemos/res/drawable/gallery_photo_8.jpg +0 -0
- data/ApiDemos/res/drawable/hover_background.xml +0 -20
- data/ApiDemos/res/drawable/hover_background_active.xml +0 -23
- data/ApiDemos/res/drawable/hover_background_inactive.xml +0 -23
- data/ApiDemos/res/drawable/icon48x48_1.png +0 -0
- data/ApiDemos/res/drawable/line.xml +0 -21
- data/ApiDemos/res/drawable/logo160dpi.png +0 -0
- data/ApiDemos/res/drawable/magnifying_glass.png +0 -0
- data/ApiDemos/res/drawable/npatch160dpi.9.png +0 -0
- data/ApiDemos/res/drawable/photo1.jpg +0 -0
- data/ApiDemos/res/drawable/photo2.jpg +0 -0
- data/ApiDemos/res/drawable/photo3.jpg +0 -0
- data/ApiDemos/res/drawable/photo4.jpg +0 -0
- data/ApiDemos/res/drawable/photo5.jpg +0 -0
- data/ApiDemos/res/drawable/photo6.jpg +0 -0
- data/ApiDemos/res/drawable/picture_frame.png +0 -0
- data/ApiDemos/res/drawable/reslogo160dpi.png +0 -0
- data/ApiDemos/res/drawable/sample_0.jpg +0 -0
- data/ApiDemos/res/drawable/sample_1.jpg +0 -0
- data/ApiDemos/res/drawable/sample_2.jpg +0 -0
- data/ApiDemos/res/drawable/sample_3.jpg +0 -0
- data/ApiDemos/res/drawable/sample_4.jpg +0 -0
- data/ApiDemos/res/drawable/sample_5.jpg +0 -0
- data/ApiDemos/res/drawable/sample_6.jpg +0 -0
- data/ApiDemos/res/drawable/sample_7.jpg +0 -0
- data/ApiDemos/res/drawable/sample_thumb_0.jpg +0 -0
- data/ApiDemos/res/drawable/sample_thumb_1.jpg +0 -0
- data/ApiDemos/res/drawable/sample_thumb_2.jpg +0 -0
- data/ApiDemos/res/drawable/sample_thumb_3.jpg +0 -0
- data/ApiDemos/res/drawable/sample_thumb_4.jpg +0 -0
- data/ApiDemos/res/drawable/sample_thumb_5.jpg +0 -0
- data/ApiDemos/res/drawable/sample_thumb_6.jpg +0 -0
- data/ApiDemos/res/drawable/sample_thumb_7.jpg +0 -0
- data/ApiDemos/res/drawable/scrollbar_vertical_thumb.xml +0 -21
- data/ApiDemos/res/drawable/scrollbar_vertical_track.xml +0 -21
- data/ApiDemos/res/drawable/shape_1.xml +0 -22
- data/ApiDemos/res/drawable/shape_2.xml +0 -24
- data/ApiDemos/res/drawable/shape_3.xml +0 -24
- data/ApiDemos/res/drawable/shape_4.xml +0 -20
- data/ApiDemos/res/drawable/shape_5.xml +0 -23
- data/ApiDemos/res/drawable/smlnpatch160dpi.9.png +0 -0
- data/ApiDemos/res/drawable/stylogo160dpi.png +0 -0
- data/ApiDemos/res/layout-h550dp/resources_height.xml +0 -53
- data/ApiDemos/res/layout-h670dp/resources_height.xml +0 -63
- data/ApiDemos/res/layout-h974dp/resources_height.xml +0 -83
- data/ApiDemos/res/layout-land/fragment_arguments.xml +0 -57
- data/ApiDemos/res/layout-land/fragment_layout.xml +0 -34
- data/ApiDemos/res/layout-sw480dp/resources_smallest_width_inner.xml +0 -43
- data/ApiDemos/res/layout-sw480dp/resources_smallest_width_row.xml +0 -43
- data/ApiDemos/res/layout-sw600dp/resources_smallest_width_inner.xml +0 -53
- data/ApiDemos/res/layout-sw600dp/resources_smallest_width_row.xml +0 -53
- data/ApiDemos/res/layout-sw720dp/resources_smallest_width_inner.xml +0 -63
- data/ApiDemos/res/layout-sw720dp/resources_smallest_width_row.xml +0 -63
- data/ApiDemos/res/layout-w1024dp/resources_width.xml +0 -83
- data/ApiDemos/res/layout-w600dp/resources_width.xml +0 -53
- data/ApiDemos/res/layout-w720dp/resources_width.xml +0 -63
- data/ApiDemos/res/layout/accessibility_service.xml +0 -36
- data/ApiDemos/res/layout/action_bar_display_options.xml +0 -48
- data/ApiDemos/res/layout/action_bar_display_options_custom.xml +0 -17
- data/ApiDemos/res/layout/action_bar_settings_action_provider.xml +0 -34
- data/ApiDemos/res/layout/action_bar_tab_content.xml +0 -19
- data/ApiDemos/res/layout/action_bar_tabs.xml +0 -49
- data/ApiDemos/res/layout/activity_animation.xml +0 -42
- data/ApiDemos/res/layout/activity_recreate.xml +0 -37
- data/ApiDemos/res/layout/alarm_controller.xml +0 -45
- data/ApiDemos/res/layout/alarm_service.xml +0 -41
- data/ApiDemos/res/layout/alert_dialog.xml +0 -60
- data/ApiDemos/res/layout/alert_dialog_text_entry.xml +0 -67
- data/ApiDemos/res/layout/animation_1.xml +0 -44
- data/ApiDemos/res/layout/animation_2.xml +0 -67
- data/ApiDemos/res/layout/animation_3.xml +0 -44
- data/ApiDemos/res/layout/animation_cloning.xml +0 -28
- data/ApiDemos/res/layout/animation_custom_evaluator.xml +0 -28
- data/ApiDemos/res/layout/animation_loading.xml +0 -28
- data/ApiDemos/res/layout/animation_multi_property.xml +0 -28
- data/ApiDemos/res/layout/animation_reversing.xml +0 -40
- data/ApiDemos/res/layout/animation_seeking.xml +0 -40
- data/ApiDemos/res/layout/animations_main_screen.xml +0 -36
- data/ApiDemos/res/layout/animator_custom_evaluator.xml +0 -34
- data/ApiDemos/res/layout/animator_events.xml +0 -122
- data/ApiDemos/res/layout/appwidget_configure.xml +0 -42
- data/ApiDemos/res/layout/appwidget_provider.xml +0 -24
- data/ApiDemos/res/layout/autocomplete_1.xml +0 -48
- data/ApiDemos/res/layout/autocomplete_2.xml +0 -44
- data/ApiDemos/res/layout/autocomplete_3.xml +0 -165
- data/ApiDemos/res/layout/autocomplete_4.xml +0 -49
- data/ApiDemos/res/layout/autocomplete_5.xml +0 -45
- data/ApiDemos/res/layout/autocomplete_6.xml +0 -48
- data/ApiDemos/res/layout/baseline_1.xml +0 -40
- data/ApiDemos/res/layout/baseline_2.xml +0 -43
- data/ApiDemos/res/layout/baseline_3.xml +0 -56
- data/ApiDemos/res/layout/baseline_4.xml +0 -55
- data/ApiDemos/res/layout/baseline_6.xml +0 -34
- data/ApiDemos/res/layout/baseline_7.xml +0 -36
- data/ApiDemos/res/layout/baseline_nested_1.xml +0 -85
- data/ApiDemos/res/layout/baseline_nested_2.xml +0 -85
- data/ApiDemos/res/layout/baseline_nested_3.xml +0 -96
- data/ApiDemos/res/layout/bouncing_balls.xml +0 -22
- data/ApiDemos/res/layout/buttons_1.xml +0 -53
- data/ApiDemos/res/layout/chronometer.xml +0 -64
- data/ApiDemos/res/layout/clipboard.xml +0 -107
- data/ApiDemos/res/layout/contacts_filter.xml +0 -37
- data/ApiDemos/res/layout/controls_1.xml +0 -154
- data/ApiDemos/res/layout/custom_dialog_activity.xml +0 -24
- data/ApiDemos/res/layout/custom_title.xml +0 -57
- data/ApiDemos/res/layout/custom_title_1.xml +0 -33
- data/ApiDemos/res/layout/custom_view_1.xml +0 -44
- data/ApiDemos/res/layout/custom_view_accessibility.xml +0 -44
- data/ApiDemos/res/layout/date_widgets_example_1.xml +0 -40
- data/ApiDemos/res/layout/date_widgets_example_2.xml +0 -33
- data/ApiDemos/res/layout/density_image_views.xml +0 -37
- data/ApiDemos/res/layout/density_styled_image_views.xml +0 -26
- data/ApiDemos/res/layout/dialog_activity.xml +0 -53
- data/ApiDemos/res/layout/drag_layout.xml +0 -93
- data/ApiDemos/res/layout/external_storage.xml +0 -27
- data/ApiDemos/res/layout/external_storage_item.xml +0 -58
- data/ApiDemos/res/layout/focus_1.xml +0 -42
- data/ApiDemos/res/layout/focus_2.xml +0 -41
- data/ApiDemos/res/layout/focus_3.xml +0 -64
- data/ApiDemos/res/layout/focus_5.xml +0 -60
- data/ApiDemos/res/layout/foreground_dispatch.xml +0 -23
- data/ApiDemos/res/layout/foreground_service_controller.xml +0 -49
- data/ApiDemos/res/layout/forward_target.xml +0 -30
- data/ApiDemos/res/layout/forwarding.xml +0 -37
- data/ApiDemos/res/layout/fragment_arguments.xml +0 -54
- data/ApiDemos/res/layout/fragment_context_menu.xml +0 -38
- data/ApiDemos/res/layout/fragment_dialog.xml +0 -40
- data/ApiDemos/res/layout/fragment_dialog_or_activity.xml +0 -64
- data/ApiDemos/res/layout/fragment_hide_show.xml +0 -57
- data/ApiDemos/res/layout/fragment_layout.xml +0 -27
- data/ApiDemos/res/layout/fragment_menu.xml +0 -46
- data/ApiDemos/res/layout/fragment_pager_support.xml +0 -44
- data/ApiDemos/res/layout/fragment_pager_support_list.xml +0 -52
- data/ApiDemos/res/layout/fragment_retain_instance.xml +0 -46
- data/ApiDemos/res/layout/fragment_stack.xml +0 -38
- data/ApiDemos/res/layout/gallery_1.xml +0 -32
- data/ApiDemos/res/layout/gallery_2.xml +0 -38
- data/ApiDemos/res/layout/game_controller_input.xml +0 -52
- data/ApiDemos/res/layout/game_controller_input_heading.xml +0 -21
- data/ApiDemos/res/layout/game_controller_input_text_column.xml +0 -34
- data/ApiDemos/res/layout/google_login.xml +0 -60
- data/ApiDemos/res/layout/grid_1.xml +0 -29
- data/ApiDemos/res/layout/grid_2.xml +0 -30
- data/ApiDemos/res/layout/grid_layout_1.xml +0 -87
- data/ApiDemos/res/layout/hello_world.xml +0 -26
- data/ApiDemos/res/layout/horizontal_scroll_view1.xml +0 -26
- data/ApiDemos/res/layout/hover.xml +0 -64
- data/ApiDemos/res/layout/image_button_1.xml +0 -36
- data/ApiDemos/res/layout/image_switcher_1.xml +0 -40
- data/ApiDemos/res/layout/image_view_1.xml +0 -144
- data/ApiDemos/res/layout/incoming_message.xml +0 -50
- data/ApiDemos/res/layout/incoming_message_info.xml +0 -38
- data/ApiDemos/res/layout/incoming_message_interstitial.xml +0 -37
- data/ApiDemos/res/layout/incoming_message_panel.xml +0 -42
- data/ApiDemos/res/layout/incoming_message_view.xml +0 -80
- data/ApiDemos/res/layout/install_apk.xml +0 -56
- data/ApiDemos/res/layout/intent_activity_flags.xml +0 -43
- data/ApiDemos/res/layout/intents.xml +0 -37
- data/ApiDemos/res/layout/labeled_text_edit.xml +0 -38
- data/ApiDemos/res/layout/launcher_shortcuts.xml +0 -40
- data/ApiDemos/res/layout/layout_animation_1.xml +0 -30
- data/ApiDemos/res/layout/layout_animation_3.xml +0 -21
- data/ApiDemos/res/layout/layout_animation_4.xml +0 -30
- data/ApiDemos/res/layout/layout_animation_5.xml +0 -30
- data/ApiDemos/res/layout/layout_animation_6.xml +0 -29
- data/ApiDemos/res/layout/layout_animation_7.xml +0 -57
- data/ApiDemos/res/layout/layout_animations.xml +0 -80
- data/ApiDemos/res/layout/layout_animations_by_default.xml +0 -34
- data/ApiDemos/res/layout/layout_animations_hideshow.xml +0 -52
- data/ApiDemos/res/layout/linear_layout_1.xml +0 -46
- data/ApiDemos/res/layout/linear_layout_10.xml +0 -122
- data/ApiDemos/res/layout/linear_layout_2.xml +0 -47
- data/ApiDemos/res/layout/linear_layout_3.xml +0 -51
- data/ApiDemos/res/layout/linear_layout_4.xml +0 -50
- data/ApiDemos/res/layout/linear_layout_5.xml +0 -76
- data/ApiDemos/res/layout/linear_layout_6.xml +0 -53
- data/ApiDemos/res/layout/linear_layout_7.xml +0 -54
- data/ApiDemos/res/layout/linear_layout_8.xml +0 -53
- data/ApiDemos/res/layout/linear_layout_9.xml +0 -38
- data/ApiDemos/res/layout/link.xml +0 -68
- data/ApiDemos/res/layout/list_12.xml +0 -35
- data/ApiDemos/res/layout/list_13.xml +0 -34
- data/ApiDemos/res/layout/list_7.xml +0 -35
- data/ApiDemos/res/layout/list_8.xml +0 -61
- data/ApiDemos/res/layout/list_item_checkbox.xml +0 -22
- data/ApiDemos/res/layout/list_item_icon_text.xml +0 -32
- data/ApiDemos/res/layout/list_position.xml +0 -25
- data/ApiDemos/res/layout/local_sample.xml +0 -37
- data/ApiDemos/res/layout/local_service_binding.xml +0 -42
- data/ApiDemos/res/layout/local_service_controller.xml +0 -42
- data/ApiDemos/res/layout/log_text_box_1.xml +0 -42
- data/ApiDemos/res/layout/mapview.xml +0 -31
- data/ApiDemos/res/layout/marquee.xml +0 -46
- data/ApiDemos/res/layout/mediaplayer_1.xml +0 -31
- data/ApiDemos/res/layout/mediaplayer_2.xml +0 -13
- data/ApiDemos/res/layout/messenger_service_binding.xml +0 -47
- data/ApiDemos/res/layout/morse_code.xml +0 -37
- data/ApiDemos/res/layout/notify_with_text.xml +0 -34
- data/ApiDemos/res/layout/notifying_controller.xml +0 -41
- data/ApiDemos/res/layout/overscan.xml +0 -79
- data/ApiDemos/res/layout/pick_contact.xml +0 -48
- data/ApiDemos/res/layout/popup_menu_1.xml +0 -25
- data/ApiDemos/res/layout/preference_widget_mypreference.xml +0 -25
- data/ApiDemos/res/layout/progressbar_1.xml +0 -74
- data/ApiDemos/res/layout/progressbar_2.xml +0 -41
- data/ApiDemos/res/layout/progressbar_3.xml +0 -32
- data/ApiDemos/res/layout/progressbar_4.xml +0 -27
- data/ApiDemos/res/layout/quick_contacts.xml +0 -47
- data/ApiDemos/res/layout/radio_group_1.xml +0 -49
- data/ApiDemos/res/layout/ratingbar_1.xml +0 -60
- data/ApiDemos/res/layout/read_asset.xml +0 -29
- data/ApiDemos/res/layout/receive_result.xml +0 -50
- data/ApiDemos/res/layout/redirect_enter.xml +0 -36
- data/ApiDemos/res/layout/redirect_getter.xml +0 -42
- data/ApiDemos/res/layout/redirect_main.xml +0 -47
- data/ApiDemos/res/layout/relative_layout_1.xml +0 -54
- data/ApiDemos/res/layout/relative_layout_2.xml +0 -78
- data/ApiDemos/res/layout/remote_binding_options.xml +0 -82
- data/ApiDemos/res/layout/remote_service_binding.xml +0 -52
- data/ApiDemos/res/layout/remote_service_controller.xml +0 -42
- data/ApiDemos/res/layout/reorder_four.xml +0 -38
- data/ApiDemos/res/layout/reorder_on_launch.xml +0 -38
- data/ApiDemos/res/layout/reorder_three.xml +0 -38
- data/ApiDemos/res/layout/reorder_two.xml +0 -38
- data/ApiDemos/res/layout/resources.xml +0 -55
- data/ApiDemos/res/layout/resources_height.xml +0 -33
- data/ApiDemos/res/layout/resources_layout_reference.xml +0 -35
- data/ApiDemos/res/layout/resources_layout_reference_tablet.xml +0 -35
- data/ApiDemos/res/layout/resources_smallest_width.xml +0 -35
- data/ApiDemos/res/layout/resources_smallest_width_inner.xml +0 -33
- data/ApiDemos/res/layout/resources_smallest_width_row.xml +0 -33
- data/ApiDemos/res/layout/resources_width.xml +0 -33
- data/ApiDemos/res/layout/resources_width_and_height.xml +0 -35
- data/ApiDemos/res/layout/rotating_list.xml +0 -37
- data/ApiDemos/res/layout/rotating_view.xml +0 -160
- data/ApiDemos/res/layout/save_restore_state.xml +0 -58
- data/ApiDemos/res/layout/screen_orientation.xml +0 -37
- data/ApiDemos/res/layout/scroll_view_1.xml +0 -90
- data/ApiDemos/res/layout/scroll_view_2.xml +0 -41
- data/ApiDemos/res/layout/scrollbar1.xml +0 -169
- data/ApiDemos/res/layout/scrollbar2.xml +0 -172
- data/ApiDemos/res/layout/scrollbar3.xml +0 -136
- data/ApiDemos/res/layout/search_invoke.xml +0 -96
- data/ApiDemos/res/layout/search_query_results.xml +0 -76
- data/ApiDemos/res/layout/search_view.xml +0 -19
- data/ApiDemos/res/layout/searchview_actionbar.xml +0 -28
- data/ApiDemos/res/layout/searchview_filter.xml +0 -31
- data/ApiDemos/res/layout/secure_view.xml +0 -112
- data/ApiDemos/res/layout/secure_view_overlay.xml +0 -50
- data/ApiDemos/res/layout/seekbar_1.xml +0 -36
- data/ApiDemos/res/layout/select_dialog.xml +0 -29
- data/ApiDemos/res/layout/send_result.xml +0 -45
- data/ApiDemos/res/layout/service_start_arguments_controller.xml +0 -57
- data/ApiDemos/res/layout/shape_drawable_1.xml +0 -73
- data/ApiDemos/res/layout/simple_list_item_checkable_1.xml +0 -29
- data/ApiDemos/res/layout/sms_demo.xml +0 -67
- data/ApiDemos/res/layout/soft_input_modes.xml +0 -64
- data/ApiDemos/res/layout/spinner_1.xml +0 -51
- data/ApiDemos/res/layout/split_touch_view.xml +0 -42
- data/ApiDemos/res/layout/status_bar_balloon.xml +0 -32
- data/ApiDemos/res/layout/status_bar_notifications.xml +0 -157
- data/ApiDemos/res/layout/styled_text.xml +0 -52
- data/ApiDemos/res/layout/surface_view_overlay.xml +0 -84
- data/ApiDemos/res/layout/switches.xml +0 -82
- data/ApiDemos/res/layout/table_layout_1.xml +0 -56
- data/ApiDemos/res/layout/table_layout_10.xml +0 -58
- data/ApiDemos/res/layout/table_layout_11.xml +0 -93
- data/ApiDemos/res/layout/table_layout_12.xml +0 -85
- data/ApiDemos/res/layout/table_layout_2.xml +0 -40
- data/ApiDemos/res/layout/table_layout_3.xml +0 -62
- data/ApiDemos/res/layout/table_layout_4.xml +0 -42
- data/ApiDemos/res/layout/table_layout_5.xml +0 -82
- data/ApiDemos/res/layout/table_layout_6.xml +0 -92
- data/ApiDemos/res/layout/table_layout_7.xml +0 -106
- data/ApiDemos/res/layout/table_layout_8.xml +0 -87
- data/ApiDemos/res/layout/table_layout_9.xml +0 -92
- data/ApiDemos/res/layout/tabs1.xml +0 -39
- data/ApiDemos/res/layout/tabs_right_gravity.xml +0 -37
- data/ApiDemos/res/layout/tabs_scroll.xml +0 -41
- data/ApiDemos/res/layout/tasklist_main.xml +0 -47
- data/ApiDemos/res/layout/tasklist_row.xml +0 -38
- data/ApiDemos/res/layout/text_switcher_1.xml +0 -31
- data/ApiDemos/res/layout/text_to_speech.xml +0 -26
- data/ApiDemos/res/layout/translucent_background.xml +0 -24
- data/ApiDemos/res/layout/videoview.xml +0 -14
- data/ApiDemos/res/layout/visibility_1.xml +0 -71
- data/ApiDemos/res/layout/voice_recognition.xml +0 -61
- data/ApiDemos/res/layout/wallpaper_2.xml +0 -27
- data/ApiDemos/res/layout/webview_1.xml +0 -79
- data/ApiDemos/res/menu/action_bar_settings_action_provider.xml +0 -28
- data/ApiDemos/res/menu/action_bar_share_action_provider.xml +0 -28
- data/ApiDemos/res/menu/actions.xml +0 -48
- data/ApiDemos/res/menu/camera_menu.xml +0 -5
- data/ApiDemos/res/menu/category_order.xml +0 -57
- data/ApiDemos/res/menu/checkable.xml +0 -91
- data/ApiDemos/res/menu/disabled.xml +0 -55
- data/ApiDemos/res/menu/display_options_actions.xml +0 -19
- data/ApiDemos/res/menu/groups.xml +0 -45
- data/ApiDemos/res/menu/list_select_menu.xml +0 -22
- data/ApiDemos/res/menu/order.xml +0 -38
- data/ApiDemos/res/menu/popup.xml +0 -32
- data/ApiDemos/res/menu/searchview_in_menu.xml +0 -22
- data/ApiDemos/res/menu/shortcuts.xml +0 -60
- data/ApiDemos/res/menu/submenu.xml +0 -44
- data/ApiDemos/res/menu/title_icon.xml +0 -31
- data/ApiDemos/res/menu/title_only.xml +0 -25
- data/ApiDemos/res/menu/visible.xml +0 -37
- data/ApiDemos/res/raw/androids.pkm +0 -0
- data/ApiDemos/res/raw/robot.png +0 -0
- data/ApiDemos/res/raw/skycubemap0.jpg +0 -0
- data/ApiDemos/res/raw/skycubemap1.jpg +0 -0
- data/ApiDemos/res/raw/skycubemap2.jpg +0 -0
- data/ApiDemos/res/raw/skycubemap3.jpg +0 -0
- data/ApiDemos/res/raw/skycubemap4.jpg +0 -0
- data/ApiDemos/res/raw/skycubemap5.jpg +0 -0
- data/ApiDemos/res/raw/sound_ringer_normal.ogg +0 -0
- data/ApiDemos/res/raw/sound_ringer_silent.ogg +0 -0
- data/ApiDemos/res/raw/sound_ringer_vibrate.ogg +0 -0
- data/ApiDemos/res/raw/sound_screen_off.ogg +0 -0
- data/ApiDemos/res/raw/sound_screen_on.ogg +0 -0
- data/ApiDemos/res/raw/sound_view_clicked.ogg +0 -0
- data/ApiDemos/res/raw/sound_view_focused_or_selected.ogg +0 -0
- data/ApiDemos/res/raw/sound_view_hover_enter.ogg +0 -0
- data/ApiDemos/res/raw/sound_window_state_changed.ogg +0 -0
- data/ApiDemos/res/raw/test_cbr.mp3 +0 -0
- data/ApiDemos/res/values-hdpi/strings.xml +0 -19
- data/ApiDemos/res/values-ldpi/strings.xml +0 -19
- data/ApiDemos/res/values-mdpi/strings.xml +0 -19
- data/ApiDemos/res/values-sw600dp/layout.xml +0 -22
- data/ApiDemos/res/values-v11/bools.xml +0 -20
- data/ApiDemos/res/values-v11/styles.xml +0 -29
- data/ApiDemos/res/values-v13/bools.xml +0 -20
- data/ApiDemos/res/values-v14/bools.xml +0 -20
- data/ApiDemos/res/values-xhdpi/strings.xml +0 -19
- data/ApiDemos/res/values-xlarge/layout.xml +0 -22
- data/ApiDemos/res/values/arrays.xml +0 -149
- data/ApiDemos/res/values/attrs.xml +0 -55
- data/ApiDemos/res/values/bools.xml +0 -32
- data/ApiDemos/res/values/colors.xml +0 -32
- data/ApiDemos/res/values/ids.xml +0 -19
- data/ApiDemos/res/values/strings.xml +0 -1343
- data/ApiDemos/res/values/styles.xml +0 -124
- data/ApiDemos/res/xml/advanced_preferences.xml +0 -38
- data/ApiDemos/res/xml/appwidget_provider.xml +0 -28
- data/ApiDemos/res/xml/default_values.xml +0 -44
- data/ApiDemos/res/xml/device_admin_encryption.xml +0 -34
- data/ApiDemos/res/xml/device_admin_expiration.xml +0 -53
- data/ApiDemos/res/xml/device_admin_general.xml +0 -40
- data/ApiDemos/res/xml/device_admin_headers.xml +0 -41
- data/ApiDemos/res/xml/device_admin_lock_wipe.xml +0 -50
- data/ApiDemos/res/xml/device_admin_quality.xml +0 -79
- data/ApiDemos/res/xml/device_admin_sample.xml +0 -30
- data/ApiDemos/res/xml/filter_nfc.xml +0 -28
- data/ApiDemos/res/xml/fragmented_preferences.xml +0 -97
- data/ApiDemos/res/xml/fragmented_preferences_inner.xml +0 -26
- data/ApiDemos/res/xml/preference_dependencies.xml +0 -35
- data/ApiDemos/res/xml/preference_headers.xml +0 -44
- data/ApiDemos/res/xml/preference_switch +0 -46
- data/ApiDemos/res/xml/preferences.xml +0 -101
- data/ApiDemos/res/xml/searchable.xml +0 -30
- data/ApiDemos/res/xml/taskbackconfig.xml +0 -24
- data/ApiDemos/src/com/example/android/apis/ApiDemos.java +0 -149
- data/ApiDemos/src/com/example/android/apis/ApiDemosApplication.java +0 -36
- data/ApiDemos/src/com/example/android/apis/Shakespeare.java +0 -223
- data/ApiDemos/src/com/example/android/apis/accessibility/ClockBackActivity.java +0 -54
- data/ApiDemos/src/com/example/android/apis/accessibility/ClockBackService.java +0 -575
- data/ApiDemos/src/com/example/android/apis/accessibility/CustomViewAccessibilityActivity.java +0 -280
- data/ApiDemos/src/com/example/android/apis/accessibility/TaskBackService.java +0 -190
- data/ApiDemos/src/com/example/android/apis/accessibility/TaskListActivity.java +0 -58
- data/ApiDemos/src/com/example/android/apis/accessibility/TaskListView.java +0 -115
- data/ApiDemos/src/com/example/android/apis/animation/AnimationCloning.java +0 -148
- data/ApiDemos/src/com/example/android/apis/animation/AnimationLoading.java +0 -165
- data/ApiDemos/src/com/example/android/apis/animation/AnimationSeeking.java +0 -173
- data/ApiDemos/src/com/example/android/apis/animation/AnimatorEvents.java +0 -237
- data/ApiDemos/src/com/example/android/apis/animation/BouncingBalls.java +0 -184
- data/ApiDemos/src/com/example/android/apis/animation/CustomEvaluator.java +0 -174
- data/ApiDemos/src/com/example/android/apis/animation/FixedGridLayout.java +0 -108
- data/ApiDemos/src/com/example/android/apis/animation/LayoutAnimations.java +0 -210
- data/ApiDemos/src/com/example/android/apis/animation/LayoutAnimationsByDefault.java +0 -61
- data/ApiDemos/src/com/example/android/apis/animation/LayoutAnimationsHideShow.java +0 -178
- data/ApiDemos/src/com/example/android/apis/animation/ListFlipper.java +0 -126
- data/ApiDemos/src/com/example/android/apis/animation/MultiPropertyAnimation.java +0 -178
- data/ApiDemos/src/com/example/android/apis/animation/ReversingAnimation.java +0 -135
- data/ApiDemos/src/com/example/android/apis/animation/Rotate3dAnimation.java +0 -92
- data/ApiDemos/src/com/example/android/apis/animation/ShapeHolder.java +0 -100
- data/ApiDemos/src/com/example/android/apis/animation/Transition3d.java +0 -175
- data/ApiDemos/src/com/example/android/apis/app/ActionBarDisplayOptions.java +0 -124
- data/ApiDemos/src/com/example/android/apis/app/ActionBarMechanics.java +0 -73
- data/ApiDemos/src/com/example/android/apis/app/ActionBarSettingsActionProviderActivity.java +0 -111
- data/ApiDemos/src/com/example/android/apis/app/ActionBarShareActionProviderActivity.java +0 -125
- data/ApiDemos/src/com/example/android/apis/app/ActionBarTabs.java +0 -131
- data/ApiDemos/src/com/example/android/apis/app/ActionBarUsage.java +0 -93
- data/ApiDemos/src/com/example/android/apis/app/ActivityRecreate.java +0 -73
- data/ApiDemos/src/com/example/android/apis/app/AlarmController.java +0 -168
- data/ApiDemos/src/com/example/android/apis/app/AlarmService.java +0 -89
- data/ApiDemos/src/com/example/android/apis/app/AlarmService_Service.java +0 -131
- data/ApiDemos/src/com/example/android/apis/app/AlertDialogSamples.java +0 -423
- data/ApiDemos/src/com/example/android/apis/app/Animation.java +0 -74
- data/ApiDemos/src/com/example/android/apis/app/AppUpdateReceiver.java +0 -34
- data/ApiDemos/src/com/example/android/apis/app/ContactsFilter.java +0 -53
- data/ApiDemos/src/com/example/android/apis/app/ContactsFilterInstrumentation.java +0 -73
- data/ApiDemos/src/com/example/android/apis/app/ContactsSelectInstrumentation.java +0 -86
- data/ApiDemos/src/com/example/android/apis/app/CustomDialogActivity.java +0 -48
- data/ApiDemos/src/com/example/android/apis/app/CustomTitle.java +0 -85
- data/ApiDemos/src/com/example/android/apis/app/DeviceAdminSample.java +0 -934
- data/ApiDemos/src/com/example/android/apis/app/DialogActivity.java +0 -86
- data/ApiDemos/src/com/example/android/apis/app/ForegroundService.java +0 -240
- data/ApiDemos/src/com/example/android/apis/app/ForwardTarget.java +0 -41
- data/ApiDemos/src/com/example/android/apis/app/Forwarding.java +0 -85
- data/ApiDemos/src/com/example/android/apis/app/FragmentAlertDialog.java +0 -109
- data/ApiDemos/src/com/example/android/apis/app/FragmentArguments.java +0 -108
- data/ApiDemos/src/com/example/android/apis/app/FragmentContextMenu.java +0 -77
- data/ApiDemos/src/com/example/android/apis/app/FragmentCustomAnimations.java +0 -131
- data/ApiDemos/src/com/example/android/apis/app/FragmentDialog.java +0 -168
- data/ApiDemos/src/com/example/android/apis/app/FragmentDialogOrActivity.java +0 -82
- data/ApiDemos/src/com/example/android/apis/app/FragmentHideShow.java +0 -113
- data/ApiDemos/src/com/example/android/apis/app/FragmentLayout.java +0 -220
- data/ApiDemos/src/com/example/android/apis/app/FragmentListArray.java +0 -60
- data/ApiDemos/src/com/example/android/apis/app/FragmentMenu.java +0 -132
- data/ApiDemos/src/com/example/android/apis/app/FragmentReceiveResult.java +0 -133
- data/ApiDemos/src/com/example/android/apis/app/FragmentRetainInstance.java +0 -232
- data/ApiDemos/src/com/example/android/apis/app/FragmentStack.java +0 -124
- data/ApiDemos/src/com/example/android/apis/app/FragmentTabs.java +0 -118
- data/ApiDemos/src/com/example/android/apis/app/HelloWorld.java +0 -66
- data/ApiDemos/src/com/example/android/apis/app/IRemoteService.aidl +0 -37
- data/ApiDemos/src/com/example/android/apis/app/IRemoteServiceCallback.aidl +0 -29
- data/ApiDemos/src/com/example/android/apis/app/ISecondary.aidl +0 -36
- data/ApiDemos/src/com/example/android/apis/app/IncomingMessage.java +0 -197
- data/ApiDemos/src/com/example/android/apis/app/IncomingMessageInterstitial.java +0 -64
- data/ApiDemos/src/com/example/android/apis/app/IncomingMessageView.java +0 -59
- data/ApiDemos/src/com/example/android/apis/app/IntentActivityFlags.java +0 -86
- data/ApiDemos/src/com/example/android/apis/app/Intents.java +0 -47
- data/ApiDemos/src/com/example/android/apis/app/LauncherShortcuts.java +0 -141
- data/ApiDemos/src/com/example/android/apis/app/LoaderCursor.java +0 -177
- data/ApiDemos/src/com/example/android/apis/app/LoaderCustom.java +0 -481
- data/ApiDemos/src/com/example/android/apis/app/LoaderThrottle.java +0 -512
- data/ApiDemos/src/com/example/android/apis/app/LocalSample.java +0 -53
- data/ApiDemos/src/com/example/android/apis/app/LocalSampleInstrumentation.java +0 -92
- data/ApiDemos/src/com/example/android/apis/app/LocalService.java +0 -120
- data/ApiDemos/src/com/example/android/apis/app/LocalServiceActivities.java +0 -171
- data/ApiDemos/src/com/example/android/apis/app/MenuInflateFromXml.java +0 -174
- data/ApiDemos/src/com/example/android/apis/app/MessengerService.java +0 -169
- data/ApiDemos/src/com/example/android/apis/app/MessengerServiceActivities.java +0 -178
- data/ApiDemos/src/com/example/android/apis/app/NotificationDisplay.java +0 -82
- data/ApiDemos/src/com/example/android/apis/app/NotifyWithText.java +0 -80
- data/ApiDemos/src/com/example/android/apis/app/NotifyingController.java +0 -61
- data/ApiDemos/src/com/example/android/apis/app/NotifyingService.java +0 -128
- data/ApiDemos/src/com/example/android/apis/app/OneShotAlarm.java +0 -42
- data/ApiDemos/src/com/example/android/apis/app/PersistentState.java +0 -128
- data/ApiDemos/src/com/example/android/apis/app/QuickContactsDemo.java +0 -104
- data/ApiDemos/src/com/example/android/apis/app/ReceiveResult.java +0 -153
- data/ApiDemos/src/com/example/android/apis/app/RedirectEnter.java +0 -59
- data/ApiDemos/src/com/example/android/apis/app/RedirectGetter.java +0 -87
- data/ApiDemos/src/com/example/android/apis/app/RedirectMain.java +0 -122
- data/ApiDemos/src/com/example/android/apis/app/RemoteService.java +0 -652
- data/ApiDemos/src/com/example/android/apis/app/ReorderFour.java +0 -46
- data/ApiDemos/src/com/example/android/apis/app/ReorderOnLaunch.java +0 -44
- data/ApiDemos/src/com/example/android/apis/app/ReorderThree.java +0 -44
- data/ApiDemos/src/com/example/android/apis/app/ReorderTwo.java +0 -44
- data/ApiDemos/src/com/example/android/apis/app/RepeatingAlarm.java +0 -40
- data/ApiDemos/src/com/example/android/apis/app/SaveRestoreState.java +0 -98
- data/ApiDemos/src/com/example/android/apis/app/ScreenOrientation.java +0 -73
- data/ApiDemos/src/com/example/android/apis/app/SearchInvoke.java +0 -241
- data/ApiDemos/src/com/example/android/apis/app/SearchQueryResults.java +0 -118
- data/ApiDemos/src/com/example/android/apis/app/SearchSuggestionSampleProvider.java +0 -50
- data/ApiDemos/src/com/example/android/apis/app/SendResult.java +0 -81
- data/ApiDemos/src/com/example/android/apis/app/ServiceStartArguments.java +0 -272
- data/ApiDemos/src/com/example/android/apis/app/SetWallpaperActivity.java +0 -89
- data/ApiDemos/src/com/example/android/apis/app/SoftInputModes.java +0 -67
- data/ApiDemos/src/com/example/android/apis/app/StatusBarNotifications.java +0 -270
- data/ApiDemos/src/com/example/android/apis/app/TextToSpeechActivity.java +0 -136
- data/ApiDemos/src/com/example/android/apis/app/TranslucentActivity.java +0 -48
- data/ApiDemos/src/com/example/android/apis/app/TranslucentBlurActivity.java +0 -55
- data/ApiDemos/src/com/example/android/apis/app/VoiceRecognition.java +0 -226
- data/ApiDemos/src/com/example/android/apis/app/WallpaperActivity.java +0 -48
- data/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetConfigure.java +0 -134
- data/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetProvider.java +0 -122
- data/ApiDemos/src/com/example/android/apis/appwidget/ExampleBroadcastReceiver.java +0 -56
- data/ApiDemos/src/com/example/android/apis/content/ClipboardSample.java +0 -144
- data/ApiDemos/src/com/example/android/apis/content/ExternalStorage.java +0 -376
- data/ApiDemos/src/com/example/android/apis/content/FileProvider.java +0 -114
- data/ApiDemos/src/com/example/android/apis/content/InstallApk.java +0 -179
- data/ApiDemos/src/com/example/android/apis/content/PickContact.java +0 -114
- data/ApiDemos/src/com/example/android/apis/content/ReadAsset.java +0 -73
- data/ApiDemos/src/com/example/android/apis/content/ResourcesLayoutReference.java +0 -33
- data/ApiDemos/src/com/example/android/apis/content/ResourcesSample.java +0 -90
- data/ApiDemos/src/com/example/android/apis/content/ResourcesSmallestWidth.java +0 -33
- data/ApiDemos/src/com/example/android/apis/content/ResourcesWidthAndHeight.java +0 -33
- data/ApiDemos/src/com/example/android/apis/content/StyledText.java +0 -51
- data/ApiDemos/src/com/example/android/apis/graphics/AlphaBitmap.java +0 -91
- data/ApiDemos/src/com/example/android/apis/graphics/AnimateDrawable.java +0 -72
- data/ApiDemos/src/com/example/android/apis/graphics/AnimateDrawables.java +0 -67
- data/ApiDemos/src/com/example/android/apis/graphics/Arcs.java +0 -118
- data/ApiDemos/src/com/example/android/apis/graphics/BitmapDecode.java +0 -144
- data/ApiDemos/src/com/example/android/apis/graphics/BitmapMesh.java +0 -130
- data/ApiDemos/src/com/example/android/apis/graphics/BitmapPixels.java +0 -161
- data/ApiDemos/src/com/example/android/apis/graphics/CameraPreview.java +0 -311
- data/ApiDemos/src/com/example/android/apis/graphics/Clipping.java +0 -111
- data/ApiDemos/src/com/example/android/apis/graphics/ColorFilters.java +0 -180
- data/ApiDemos/src/com/example/android/apis/graphics/ColorMatrixSample.java +0 -122
- data/ApiDemos/src/com/example/android/apis/graphics/ColorPickerDialog.java +0 -233
- data/ApiDemos/src/com/example/android/apis/graphics/Compass.java +0 -130
- data/ApiDemos/src/com/example/android/apis/graphics/CompressedTextureActivity.java +0 -157
- data/ApiDemos/src/com/example/android/apis/graphics/CreateBitmap.java +0 -126
- data/ApiDemos/src/com/example/android/apis/graphics/Cube.java +0 -100
- data/ApiDemos/src/com/example/android/apis/graphics/CubeMapActivity.java +0 -416
- data/ApiDemos/src/com/example/android/apis/graphics/CubeRenderer.java +0 -108
- data/ApiDemos/src/com/example/android/apis/graphics/DensityActivity.java +0 -220
- data/ApiDemos/src/com/example/android/apis/graphics/DrawPoints.java +0 -79
- data/ApiDemos/src/com/example/android/apis/graphics/FingerPaint.java +0 -208
- data/ApiDemos/src/com/example/android/apis/graphics/FrameBufferObjectActivity.java +0 -282
- data/ApiDemos/src/com/example/android/apis/graphics/GLES20Activity.java +0 -72
- data/ApiDemos/src/com/example/android/apis/graphics/GLES20TriangleRenderer.java +0 -255
- data/ApiDemos/src/com/example/android/apis/graphics/GLSurfaceViewActivity.java +0 -56
- data/ApiDemos/src/com/example/android/apis/graphics/GradientDrawable1.java +0 -31
- data/ApiDemos/src/com/example/android/apis/graphics/GraphicsActivity.java +0 -43
- data/ApiDemos/src/com/example/android/apis/graphics/Layers.java +0 -65
- data/ApiDemos/src/com/example/android/apis/graphics/MatrixPaletteActivity.java +0 -52
- data/ApiDemos/src/com/example/android/apis/graphics/MatrixPaletteRenderer.java +0 -408
- data/ApiDemos/src/com/example/android/apis/graphics/MeasureText.java +0 -112
- data/ApiDemos/src/com/example/android/apis/graphics/PathEffects.java +0 -121
- data/ApiDemos/src/com/example/android/apis/graphics/PathFillTypes.java +0 -77
- data/ApiDemos/src/com/example/android/apis/graphics/Patterns.java +0 -125
- data/ApiDemos/src/com/example/android/apis/graphics/PictureLayout.java +0 -161
- data/ApiDemos/src/com/example/android/apis/graphics/Pictures.java +0 -81
- data/ApiDemos/src/com/example/android/apis/graphics/PolyToPoly.java +0 -107
- data/ApiDemos/src/com/example/android/apis/graphics/ProxyDrawable.java +0 -102
- data/ApiDemos/src/com/example/android/apis/graphics/PurgeableBitmap.java +0 -118
- data/ApiDemos/src/com/example/android/apis/graphics/PurgeableBitmapView.java +0 -116
- data/ApiDemos/src/com/example/android/apis/graphics/Regions.java +0 -126
- data/ApiDemos/src/com/example/android/apis/graphics/RoundRects.java +0 -113
- data/ApiDemos/src/com/example/android/apis/graphics/ScaleToFit.java +0 -121
- data/ApiDemos/src/com/example/android/apis/graphics/SensorTest.java +0 -213
- data/ApiDemos/src/com/example/android/apis/graphics/ShapeDrawable1.java +0 -136
- data/ApiDemos/src/com/example/android/apis/graphics/StaticTriangleRenderer.java +0 -274
- data/ApiDemos/src/com/example/android/apis/graphics/SurfaceViewOverlay.java +0 -116
- data/ApiDemos/src/com/example/android/apis/graphics/Sweep.java +0 -97
- data/ApiDemos/src/com/example/android/apis/graphics/TextAlign.java +0 -161
- data/ApiDemos/src/com/example/android/apis/graphics/TouchPaint.java +0 -528
- data/ApiDemos/src/com/example/android/apis/graphics/TouchRotateActivity.java +0 -184
- data/ApiDemos/src/com/example/android/apis/graphics/TranslucentGLSurfaceViewActivity.java +0 -63
- data/ApiDemos/src/com/example/android/apis/graphics/TriangleActivity.java +0 -49
- data/ApiDemos/src/com/example/android/apis/graphics/TriangleRenderer.java +0 -241
- data/ApiDemos/src/com/example/android/apis/graphics/Typefaces.java +0 -55
- data/ApiDemos/src/com/example/android/apis/graphics/UnicodeChart.java +0 -119
- data/ApiDemos/src/com/example/android/apis/graphics/Vertices.java +0 -103
- data/ApiDemos/src/com/example/android/apis/graphics/WindowSurface.java +0 -271
- data/ApiDemos/src/com/example/android/apis/graphics/Xfermodes.java +0 -171
- data/ApiDemos/src/com/example/android/apis/graphics/kube/Cube.java +0 -57
- data/ApiDemos/src/com/example/android/apis/graphics/kube/GLColor.java +0 -51
- data/ApiDemos/src/com/example/android/apis/graphics/kube/GLFace.java +0 -94
- data/ApiDemos/src/com/example/android/apis/graphics/kube/GLShape.java +0 -102
- data/ApiDemos/src/com/example/android/apis/graphics/kube/GLVertex.java +0 -89
- data/ApiDemos/src/com/example/android/apis/graphics/kube/GLWorld.java +0 -98
- data/ApiDemos/src/com/example/android/apis/graphics/kube/Kube.java +0 -342
- data/ApiDemos/src/com/example/android/apis/graphics/kube/KubeRenderer.java +0 -116
- data/ApiDemos/src/com/example/android/apis/graphics/kube/Layer.java +0 -101
- data/ApiDemos/src/com/example/android/apis/graphics/kube/M4.java +0 -80
- data/ApiDemos/src/com/example/android/apis/graphics/spritetext/Grid.java +0 -140
- data/ApiDemos/src/com/example/android/apis/graphics/spritetext/LabelMaker.java +0 -411
- data/ApiDemos/src/com/example/android/apis/graphics/spritetext/MatrixGrabber.java +0 -63
- data/ApiDemos/src/com/example/android/apis/graphics/spritetext/MatrixStack.java +0 -179
- data/ApiDemos/src/com/example/android/apis/graphics/spritetext/MatrixTrackingGL.java +0 -1086
- data/ApiDemos/src/com/example/android/apis/graphics/spritetext/NumericSprite.java +0 -99
- data/ApiDemos/src/com/example/android/apis/graphics/spritetext/Projector.java +0 -84
- data/ApiDemos/src/com/example/android/apis/graphics/spritetext/SpriteTextActivity.java +0 -52
- data/ApiDemos/src/com/example/android/apis/graphics/spritetext/SpriteTextRenderer.java +0 -354
- data/ApiDemos/src/com/example/android/apis/media/AudioFxDemo.java +0 -252
- data/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo.java +0 -102
- data/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo_Audio.java +0 -102
- data/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo_Video.java +0 -219
- data/ApiDemos/src/com/example/android/apis/media/VideoViewDemo.java +0 -61
- data/ApiDemos/src/com/example/android/apis/nfc/ForegroundDispatch.java +0 -93
- data/ApiDemos/src/com/example/android/apis/nfc/ForegroundNdefPush.java +0 -86
- data/ApiDemos/src/com/example/android/apis/nfc/TechFilter.java +0 -51
- data/ApiDemos/src/com/example/android/apis/os/MorseCode.java +0 -93
- data/ApiDemos/src/com/example/android/apis/os/MorseCodeConverter.java +0 -141
- data/ApiDemos/src/com/example/android/apis/os/RotationVectorDemo.java +0 -216
- data/ApiDemos/src/com/example/android/apis/os/Sensors.java +0 -241
- data/ApiDemos/src/com/example/android/apis/os/SmsMessageReceiver.java +0 -78
- data/ApiDemos/src/com/example/android/apis/os/SmsMessagingDemo.java +0 -159
- data/ApiDemos/src/com/example/android/apis/os/SmsReceivedDialog.java +0 -115
- data/ApiDemos/src/com/example/android/apis/preference/AdvancedPreferences.java +0 -94
- data/ApiDemos/src/com/example/android/apis/preference/DefaultValues.java +0 -61
- data/ApiDemos/src/com/example/android/apis/preference/FragmentPreferences.java +0 -52
- data/ApiDemos/src/com/example/android/apis/preference/LaunchingPreferences.java +0 -100
- data/ApiDemos/src/com/example/android/apis/preference/MyPreference.java +0 -171
- data/ApiDemos/src/com/example/android/apis/preference/PreferenceDependencies.java +0 -33
- data/ApiDemos/src/com/example/android/apis/preference/PreferenceWithHeaders.java +0 -108
- data/ApiDemos/src/com/example/android/apis/preference/PreferencesFromCode.java +0 -151
- data/ApiDemos/src/com/example/android/apis/preference/PreferencesFromXml.java +0 -34
- data/ApiDemos/src/com/example/android/apis/preference/SwitchPreference.java +0 -38
- data/ApiDemos/src/com/example/android/apis/text/Link.java +0 -84
- data/ApiDemos/src/com/example/android/apis/text/LogTextBox.java +0 -64
- data/ApiDemos/src/com/example/android/apis/text/LogTextBox1.java +0 -50
- data/ApiDemos/src/com/example/android/apis/text/Marquee.java +0 -31
- data/ApiDemos/src/com/example/android/apis/view/Animation1.java +0 -45
- data/ApiDemos/src/com/example/android/apis/view/Animation2.java +0 -90
- data/ApiDemos/src/com/example/android/apis/view/Animation3.java +0 -101
- data/ApiDemos/src/com/example/android/apis/view/AutoComplete1.java +0 -82
- data/ApiDemos/src/com/example/android/apis/view/AutoComplete2.java +0 -41
- data/ApiDemos/src/com/example/android/apis/view/AutoComplete3.java +0 -43
- data/ApiDemos/src/com/example/android/apis/view/AutoComplete4.java +0 -103
- data/ApiDemos/src/com/example/android/apis/view/AutoComplete5.java +0 -44
- data/ApiDemos/src/com/example/android/apis/view/AutoComplete6.java +0 -83
- data/ApiDemos/src/com/example/android/apis/view/Baseline1.java +0 -35
- data/ApiDemos/src/com/example/android/apis/view/Baseline2.java +0 -35
- data/ApiDemos/src/com/example/android/apis/view/Baseline3.java +0 -36
- data/ApiDemos/src/com/example/android/apis/view/Baseline4.java +0 -35
- data/ApiDemos/src/com/example/android/apis/view/Baseline6.java +0 -35
- data/ApiDemos/src/com/example/android/apis/view/Baseline7.java +0 -35
- data/ApiDemos/src/com/example/android/apis/view/BaselineNested1.java +0 -36
- data/ApiDemos/src/com/example/android/apis/view/BaselineNested2.java +0 -36
- data/ApiDemos/src/com/example/android/apis/view/BaselineNested3.java +0 -36
- data/ApiDemos/src/com/example/android/apis/view/Buttons1.java +0 -36
- data/ApiDemos/src/com/example/android/apis/view/CheckableFrameLayout.java +0 -49
- data/ApiDemos/src/com/example/android/apis/view/Cheeses.java +0 -155
- data/ApiDemos/src/com/example/android/apis/view/ChronometerDemo.java +0 -90
- data/ApiDemos/src/com/example/android/apis/view/Controls1.java +0 -54
- data/ApiDemos/src/com/example/android/apis/view/Controls2.java +0 -19
- data/ApiDemos/src/com/example/android/apis/view/Controls3.java +0 -19
- data/ApiDemos/src/com/example/android/apis/view/Controls4.java +0 -19
- data/ApiDemos/src/com/example/android/apis/view/Controls5.java +0 -19
- data/ApiDemos/src/com/example/android/apis/view/Controls6.java +0 -19
- data/ApiDemos/src/com/example/android/apis/view/CustomView1.java +0 -40
- data/ApiDemos/src/com/example/android/apis/view/DateWidgets1.java +0 -156
- data/ApiDemos/src/com/example/android/apis/view/DateWidgets2.java +0 -68
- data/ApiDemos/src/com/example/android/apis/view/DragAndDropDemo.java +0 -72
- data/ApiDemos/src/com/example/android/apis/view/DraggableDot.java +0 -261
- data/ApiDemos/src/com/example/android/apis/view/ExpandableList1.java +0 -160
- data/ApiDemos/src/com/example/android/apis/view/ExpandableList2.java +0 -138
- data/ApiDemos/src/com/example/android/apis/view/ExpandableList3.java +0 -76
- data/ApiDemos/src/com/example/android/apis/view/Focus1.java +0 -47
- data/ApiDemos/src/com/example/android/apis/view/Focus2.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/Focus3.java +0 -45
- data/ApiDemos/src/com/example/android/apis/view/Focus5.java +0 -31
- data/ApiDemos/src/com/example/android/apis/view/Gallery1.java +0 -139
- data/ApiDemos/src/com/example/android/apis/view/Gallery2.java +0 -61
- data/ApiDemos/src/com/example/android/apis/view/GameControllerInput.java +0 -460
- data/ApiDemos/src/com/example/android/apis/view/GameView.java +0 -747
- data/ApiDemos/src/com/example/android/apis/view/Grid1.java +0 -95
- data/ApiDemos/src/com/example/android/apis/view/Grid2.java +0 -166
- data/ApiDemos/src/com/example/android/apis/view/Grid3.java +0 -164
- data/ApiDemos/src/com/example/android/apis/view/GridLayout0.java +0 -113
- data/ApiDemos/src/com/example/android/apis/view/GridLayout1.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/HorizontalScrollView1.java +0 -33
- data/ApiDemos/src/com/example/android/apis/view/Hover.java +0 -96
- data/ApiDemos/src/com/example/android/apis/view/HoverInterceptorView.java +0 -71
- data/ApiDemos/src/com/example/android/apis/view/ImageButton1.java +0 -33
- data/ApiDemos/src/com/example/android/apis/view/ImageSwitcher1.java +0 -120
- data/ApiDemos/src/com/example/android/apis/view/ImageView1.java +0 -36
- data/ApiDemos/src/com/example/android/apis/view/InternalSelectionFocus.java +0 -74
- data/ApiDemos/src/com/example/android/apis/view/InternalSelectionScroll.java +0 -64
- data/ApiDemos/src/com/example/android/apis/view/InternalSelectionView.java +0 -272
- data/ApiDemos/src/com/example/android/apis/view/LabelView.java +0 -194
- data/ApiDemos/src/com/example/android/apis/view/LayoutAnimation1.java +0 -81
- data/ApiDemos/src/com/example/android/apis/view/LayoutAnimation2.java +0 -64
- data/ApiDemos/src/com/example/android/apis/view/LayoutAnimation3.java +0 -44
- data/ApiDemos/src/com/example/android/apis/view/LayoutAnimation4.java +0 -81
- data/ApiDemos/src/com/example/android/apis/view/LayoutAnimation5.java +0 -81
- data/ApiDemos/src/com/example/android/apis/view/LayoutAnimation6.java +0 -81
- data/ApiDemos/src/com/example/android/apis/view/LayoutAnimation7.java +0 -31
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout1.java +0 -37
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout10.java +0 -37
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout2.java +0 -37
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout3.java +0 -37
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout4.java +0 -38
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout5.java +0 -38
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout6.java +0 -38
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout7.java +0 -38
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout8.java +0 -106
- data/ApiDemos/src/com/example/android/apis/view/LinearLayout9.java +0 -41
- data/ApiDemos/src/com/example/android/apis/view/List1.java +0 -42
- data/ApiDemos/src/com/example/android/apis/view/List10.java +0 -49
- data/ApiDemos/src/com/example/android/apis/view/List11.java +0 -49
- data/ApiDemos/src/com/example/android/apis/view/List12.java +0 -83
- data/ApiDemos/src/com/example/android/apis/view/List13.java +0 -341
- data/ApiDemos/src/com/example/android/apis/view/List14.java +0 -141
- data/ApiDemos/src/com/example/android/apis/view/List15.java +0 -104
- data/ApiDemos/src/com/example/android/apis/view/List16.java +0 -100
- data/ApiDemos/src/com/example/android/apis/view/List17.java +0 -57
- data/ApiDemos/src/com/example/android/apis/view/List2.java +0 -57
- data/ApiDemos/src/com/example/android/apis/view/List3.java +0 -84
- data/ApiDemos/src/com/example/android/apis/view/List4.java +0 -154
- data/ApiDemos/src/com/example/android/apis/view/List5.java +0 -118
- data/ApiDemos/src/com/example/android/apis/view/List6.java +0 -410
- data/ApiDemos/src/com/example/android/apis/view/List7.java +0 -99
- data/ApiDemos/src/com/example/android/apis/view/List8.java +0 -133
- data/ApiDemos/src/com/example/android/apis/view/List9.java +0 -144
- data/ApiDemos/src/com/example/android/apis/view/OverscanActivity.java +0 -184
- data/ApiDemos/src/com/example/android/apis/view/PopupMenu1.java +0 -53
- data/ApiDemos/src/com/example/android/apis/view/ProgressBar1.java +0 -84
- data/ApiDemos/src/com/example/android/apis/view/ProgressBar2.java +0 -44
- data/ApiDemos/src/com/example/android/apis/view/ProgressBar3.java +0 -84
- data/ApiDemos/src/com/example/android/apis/view/ProgressBar4.java +0 -51
- data/ApiDemos/src/com/example/android/apis/view/RadioGroup1.java +0 -74
- data/ApiDemos/src/com/example/android/apis/view/RatingBar1.java +0 -74
- data/ApiDemos/src/com/example/android/apis/view/RelativeLayout1.java +0 -37
- data/ApiDemos/src/com/example/android/apis/view/RelativeLayout2.java +0 -38
- data/ApiDemos/src/com/example/android/apis/view/RotatingButton.java +0 -152
- data/ApiDemos/src/com/example/android/apis/view/ScrollBar1.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/ScrollBar2.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/ScrollBar3.java +0 -35
- data/ApiDemos/src/com/example/android/apis/view/ScrollView1.java +0 -37
- data/ApiDemos/src/com/example/android/apis/view/ScrollView2.java +0 -52
- data/ApiDemos/src/com/example/android/apis/view/SearchViewActionBar.java +0 -115
- data/ApiDemos/src/com/example/android/apis/view/SearchViewAlwaysVisible.java +0 -46
- data/ApiDemos/src/com/example/android/apis/view/SearchViewFilterMode.java +0 -78
- data/ApiDemos/src/com/example/android/apis/view/SecureView.java +0 -144
- data/ApiDemos/src/com/example/android/apis/view/SecureViewOverlay.java +0 -74
- data/ApiDemos/src/com/example/android/apis/view/SeekBar1.java +0 -60
- data/ApiDemos/src/com/example/android/apis/view/Spinner1.java +0 -78
- data/ApiDemos/src/com/example/android/apis/view/SplitTouchView.java +0 -66
- data/ApiDemos/src/com/example/android/apis/view/Switches.java +0 -47
- data/ApiDemos/src/com/example/android/apis/view/TableLayout1.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/TableLayout10.java +0 -31
- data/ApiDemos/src/com/example/android/apis/view/TableLayout11.java +0 -34
- data/ApiDemos/src/com/example/android/apis/view/TableLayout12.java +0 -34
- data/ApiDemos/src/com/example/android/apis/view/TableLayout2.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/TableLayout3.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/TableLayout4.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/TableLayout5.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/TableLayout6.java +0 -32
- data/ApiDemos/src/com/example/android/apis/view/TableLayout7.java +0 -80
- data/ApiDemos/src/com/example/android/apis/view/TableLayout8.java +0 -71
- data/ApiDemos/src/com/example/android/apis/view/TableLayout9.java +0 -48
- data/ApiDemos/src/com/example/android/apis/view/Tabs1.java +0 -50
- data/ApiDemos/src/com/example/android/apis/view/Tabs2.java +0 -57
- data/ApiDemos/src/com/example/android/apis/view/Tabs3.java +0 -50
- data/ApiDemos/src/com/example/android/apis/view/Tabs4.java +0 -23
- data/ApiDemos/src/com/example/android/apis/view/Tabs5.java +0 -54
- data/ApiDemos/src/com/example/android/apis/view/Tabs6.java +0 -55
- data/ApiDemos/src/com/example/android/apis/view/TextSwitcher1.java +0 -79
- data/ApiDemos/src/com/example/android/apis/view/Visibility1.java +0 -74
- data/ApiDemos/src/com/example/android/apis/view/WebView1.java +0 -71
- data/ApiDemos/tests/AndroidManifest.xml +0 -37
- data/ApiDemos/tests/ant.properties +0 -18
- data/ApiDemos/tests/build.xml +0 -83
- data/ApiDemos/tests/local.properties +0 -10
- data/ApiDemos/tests/proguard-project.txt +0 -20
- data/ApiDemos/tests/project.properties +0 -14
- data/ApiDemos/tests/src/com/example/android/apis/AllTests.java +0 -53
- data/ApiDemos/tests/src/com/example/android/apis/ApiDemosApplicationTests.java +0 -62
- data/ApiDemos/tests/src/com/example/android/apis/ApiDemosTest.java +0 -40
- data/ApiDemos/tests/src/com/example/android/apis/app/ForwardingTest.java +0 -129
- data/ApiDemos/tests/src/com/example/android/apis/app/LocalServiceTest.java +0 -80
- data/ApiDemos/tests/src/com/example/android/apis/os/MorseCodeConverterTest.java +0 -54
- data/ApiDemos/tests/src/com/example/android/apis/view/Focus2ActivityTest.java +0 -111
- data/ApiDemos/tests/src/com/example/android/apis/view/Focus2AndroidTest.java +0 -113
- data/ChangeLog +0 -16
- data/Gemfile +0 -12
- data/Guardfile +0 -17
- data/LICENSE +0 -22
- data/README.md +0 -72
- data/Rakefile +0 -24
- data/cucumber.yml +0 -14
- data/features/step_definitions/calabash_steps.rb +0 -1
- data/features/support/app_installation_hooks.rb +0 -23
- data/features/support/app_life_cycle_hooks.rb +0 -11
- data/gametel.gemspec +0 -23
- data/irb_android.sh +0 -2
- data/lib/gametel/platforms/calabash.rb +0 -155
@@ -1,747 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (C) 2011 The Android Open Source Project
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
|
17
|
-
package com.example.android.apis.view;
|
18
|
-
|
19
|
-
import android.content.Context;
|
20
|
-
import android.graphics.Canvas;
|
21
|
-
import android.graphics.Paint;
|
22
|
-
import android.graphics.Path;
|
23
|
-
import android.graphics.Paint.Style;
|
24
|
-
import android.os.Handler;
|
25
|
-
import android.os.SystemClock;
|
26
|
-
import android.util.AttributeSet;
|
27
|
-
import android.view.InputDevice;
|
28
|
-
import android.view.KeyEvent;
|
29
|
-
import android.view.MotionEvent;
|
30
|
-
import android.view.View;
|
31
|
-
|
32
|
-
import java.util.ArrayList;
|
33
|
-
import java.util.List;
|
34
|
-
import java.util.Random;
|
35
|
-
|
36
|
-
/**
|
37
|
-
* A trivial joystick based physics game to demonstrate joystick handling.
|
38
|
-
*
|
39
|
-
* @see GameControllerInput
|
40
|
-
*/
|
41
|
-
public class GameView extends View {
|
42
|
-
private final long ANIMATION_TIME_STEP = 1000 / 60;
|
43
|
-
private final int MAX_OBSTACLES = 12;
|
44
|
-
|
45
|
-
private final Random mRandom;
|
46
|
-
private Ship mShip;
|
47
|
-
private final List<Bullet> mBullets;
|
48
|
-
private final List<Obstacle> mObstacles;
|
49
|
-
|
50
|
-
private long mLastStepTime;
|
51
|
-
private InputDevice mLastInputDevice;
|
52
|
-
|
53
|
-
private static final int DPAD_STATE_LEFT = 1 << 0;
|
54
|
-
private static final int DPAD_STATE_RIGHT = 1 << 1;
|
55
|
-
private static final int DPAD_STATE_UP = 1 << 2;
|
56
|
-
private static final int DPAD_STATE_DOWN = 1 << 3;
|
57
|
-
|
58
|
-
private int mDPadState;
|
59
|
-
|
60
|
-
private float mShipSize;
|
61
|
-
private float mMaxShipThrust;
|
62
|
-
private float mMaxShipSpeed;
|
63
|
-
|
64
|
-
private float mBulletSize;
|
65
|
-
private float mBulletSpeed;
|
66
|
-
|
67
|
-
private float mMinObstacleSize;
|
68
|
-
private float mMaxObstacleSize;
|
69
|
-
private float mMinObstacleSpeed;
|
70
|
-
private float mMaxObstacleSpeed;
|
71
|
-
|
72
|
-
private final Runnable mAnimationRunnable = new Runnable() {
|
73
|
-
public void run() {
|
74
|
-
animateFrame();
|
75
|
-
}
|
76
|
-
};
|
77
|
-
|
78
|
-
public GameView(Context context, AttributeSet attrs) {
|
79
|
-
super(context, attrs);
|
80
|
-
|
81
|
-
mRandom = new Random();
|
82
|
-
mBullets = new ArrayList<Bullet>();
|
83
|
-
mObstacles = new ArrayList<Obstacle>();
|
84
|
-
|
85
|
-
setFocusable(true);
|
86
|
-
setFocusableInTouchMode(true);
|
87
|
-
|
88
|
-
float baseSize = getContext().getResources().getDisplayMetrics().density * 5f;
|
89
|
-
float baseSpeed = baseSize * 3;
|
90
|
-
|
91
|
-
mShipSize = baseSize * 3;
|
92
|
-
mMaxShipThrust = baseSpeed * 0.25f;
|
93
|
-
mMaxShipSpeed = baseSpeed * 12;
|
94
|
-
|
95
|
-
mBulletSize = baseSize;
|
96
|
-
mBulletSpeed = baseSpeed * 12;
|
97
|
-
|
98
|
-
mMinObstacleSize = baseSize * 2;
|
99
|
-
mMaxObstacleSize = baseSize * 12;
|
100
|
-
mMinObstacleSpeed = baseSpeed;
|
101
|
-
mMaxObstacleSpeed = baseSpeed * 3;
|
102
|
-
}
|
103
|
-
|
104
|
-
@Override
|
105
|
-
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
|
106
|
-
super.onSizeChanged(w, h, oldw, oldh);
|
107
|
-
|
108
|
-
// Reset the game when the view changes size.
|
109
|
-
reset();
|
110
|
-
}
|
111
|
-
|
112
|
-
@Override
|
113
|
-
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
114
|
-
ensureInitialized();
|
115
|
-
|
116
|
-
// Handle DPad keys and fire button on initial down but not on auto-repeat.
|
117
|
-
boolean handled = false;
|
118
|
-
if (event.getRepeatCount() == 0) {
|
119
|
-
switch (keyCode) {
|
120
|
-
case KeyEvent.KEYCODE_DPAD_LEFT:
|
121
|
-
mShip.setHeadingX(-1);
|
122
|
-
mDPadState |= DPAD_STATE_LEFT;
|
123
|
-
handled = true;
|
124
|
-
break;
|
125
|
-
case KeyEvent.KEYCODE_DPAD_RIGHT:
|
126
|
-
mShip.setHeadingX(1);
|
127
|
-
mDPadState |= DPAD_STATE_RIGHT;
|
128
|
-
handled = true;
|
129
|
-
break;
|
130
|
-
case KeyEvent.KEYCODE_DPAD_UP:
|
131
|
-
mShip.setHeadingY(-1);
|
132
|
-
mDPadState |= DPAD_STATE_UP;
|
133
|
-
handled = true;
|
134
|
-
break;
|
135
|
-
case KeyEvent.KEYCODE_DPAD_DOWN:
|
136
|
-
mShip.setHeadingY(1);
|
137
|
-
mDPadState |= DPAD_STATE_DOWN;
|
138
|
-
handled = true;
|
139
|
-
break;
|
140
|
-
default:
|
141
|
-
if (isFireKey(keyCode)) {
|
142
|
-
fire();
|
143
|
-
handled = true;
|
144
|
-
}
|
145
|
-
break;
|
146
|
-
}
|
147
|
-
}
|
148
|
-
if (handled) {
|
149
|
-
step(event.getEventTime());
|
150
|
-
return true;
|
151
|
-
}
|
152
|
-
return super.onKeyDown(keyCode, event);
|
153
|
-
}
|
154
|
-
|
155
|
-
@Override
|
156
|
-
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
157
|
-
ensureInitialized();
|
158
|
-
|
159
|
-
// Handle keys going up.
|
160
|
-
boolean handled = false;
|
161
|
-
switch (keyCode) {
|
162
|
-
case KeyEvent.KEYCODE_DPAD_LEFT:
|
163
|
-
mShip.setHeadingX(0);
|
164
|
-
mDPadState &= ~DPAD_STATE_LEFT;
|
165
|
-
handled = true;
|
166
|
-
break;
|
167
|
-
case KeyEvent.KEYCODE_DPAD_RIGHT:
|
168
|
-
mShip.setHeadingX(0);
|
169
|
-
mDPadState &= ~DPAD_STATE_RIGHT;
|
170
|
-
handled = true;
|
171
|
-
break;
|
172
|
-
case KeyEvent.KEYCODE_DPAD_UP:
|
173
|
-
mShip.setHeadingY(0);
|
174
|
-
mDPadState &= ~DPAD_STATE_UP;
|
175
|
-
handled = true;
|
176
|
-
break;
|
177
|
-
case KeyEvent.KEYCODE_DPAD_DOWN:
|
178
|
-
mShip.setHeadingY(0);
|
179
|
-
mDPadState &= ~DPAD_STATE_DOWN;
|
180
|
-
handled = true;
|
181
|
-
break;
|
182
|
-
default:
|
183
|
-
if (isFireKey(keyCode)) {
|
184
|
-
handled = true;
|
185
|
-
}
|
186
|
-
break;
|
187
|
-
}
|
188
|
-
if (handled) {
|
189
|
-
step(event.getEventTime());
|
190
|
-
return true;
|
191
|
-
}
|
192
|
-
return super.onKeyUp(keyCode, event);
|
193
|
-
}
|
194
|
-
|
195
|
-
private static boolean isFireKey(int keyCode) {
|
196
|
-
return KeyEvent.isGamepadButton(keyCode)
|
197
|
-
|| keyCode == KeyEvent.KEYCODE_DPAD_CENTER
|
198
|
-
|| keyCode == KeyEvent.KEYCODE_SPACE;
|
199
|
-
}
|
200
|
-
|
201
|
-
@Override
|
202
|
-
public boolean onGenericMotionEvent(MotionEvent event) {
|
203
|
-
ensureInitialized();
|
204
|
-
|
205
|
-
// Check that the event came from a joystick since a generic motion event
|
206
|
-
// could be almost anything.
|
207
|
-
if ((event.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0
|
208
|
-
&& event.getAction() == MotionEvent.ACTION_MOVE) {
|
209
|
-
// Cache the most recently obtained device information.
|
210
|
-
// The device information may change over time but it can be
|
211
|
-
// somewhat expensive to query.
|
212
|
-
if (mLastInputDevice == null || mLastInputDevice.getId() != event.getDeviceId()) {
|
213
|
-
mLastInputDevice = event.getDevice();
|
214
|
-
// It's possible for the device id to be invalid.
|
215
|
-
// In that case, getDevice() will return null.
|
216
|
-
if (mLastInputDevice == null) {
|
217
|
-
return false;
|
218
|
-
}
|
219
|
-
}
|
220
|
-
|
221
|
-
// Ignore joystick while the DPad is pressed to avoid conflicting motions.
|
222
|
-
if (mDPadState != 0) {
|
223
|
-
return true;
|
224
|
-
}
|
225
|
-
|
226
|
-
// Process all historical movement samples in the batch.
|
227
|
-
final int historySize = event.getHistorySize();
|
228
|
-
for (int i = 0; i < historySize; i++) {
|
229
|
-
processJoystickInput(event, i);
|
230
|
-
}
|
231
|
-
|
232
|
-
// Process the current movement sample in the batch.
|
233
|
-
processJoystickInput(event, -1);
|
234
|
-
return true;
|
235
|
-
}
|
236
|
-
return super.onGenericMotionEvent(event);
|
237
|
-
}
|
238
|
-
|
239
|
-
private void processJoystickInput(MotionEvent event, int historyPos) {
|
240
|
-
// Get joystick position.
|
241
|
-
// Many game pads with two joysticks report the position of the second joystick
|
242
|
-
// using the Z and RZ axes so we also handle those.
|
243
|
-
// In a real game, we would allow the user to configure the axes manually.
|
244
|
-
float x = getCenteredAxis(event, mLastInputDevice, MotionEvent.AXIS_X, historyPos);
|
245
|
-
if (x == 0) {
|
246
|
-
x = getCenteredAxis(event, mLastInputDevice, MotionEvent.AXIS_HAT_X, historyPos);
|
247
|
-
}
|
248
|
-
if (x == 0) {
|
249
|
-
x = getCenteredAxis(event, mLastInputDevice, MotionEvent.AXIS_Z, historyPos);
|
250
|
-
}
|
251
|
-
|
252
|
-
float y = getCenteredAxis(event, mLastInputDevice, MotionEvent.AXIS_Y, historyPos);
|
253
|
-
if (y == 0) {
|
254
|
-
y = getCenteredAxis(event, mLastInputDevice, MotionEvent.AXIS_HAT_Y, historyPos);
|
255
|
-
}
|
256
|
-
if (y == 0) {
|
257
|
-
y = getCenteredAxis(event, mLastInputDevice, MotionEvent.AXIS_RZ, historyPos);
|
258
|
-
}
|
259
|
-
|
260
|
-
// Set the ship heading.
|
261
|
-
mShip.setHeading(x, y);
|
262
|
-
step(historyPos < 0 ? event.getEventTime() : event.getHistoricalEventTime(historyPos));
|
263
|
-
}
|
264
|
-
|
265
|
-
private static float getCenteredAxis(MotionEvent event, InputDevice device,
|
266
|
-
int axis, int historyPos) {
|
267
|
-
final InputDevice.MotionRange range = device.getMotionRange(axis, event.getSource());
|
268
|
-
if (range != null) {
|
269
|
-
final float flat = range.getFlat();
|
270
|
-
final float value = historyPos < 0 ? event.getAxisValue(axis)
|
271
|
-
: event.getHistoricalAxisValue(axis, historyPos);
|
272
|
-
|
273
|
-
// Ignore axis values that are within the 'flat' region of the joystick axis center.
|
274
|
-
// A joystick at rest does not always report an absolute position of (0,0).
|
275
|
-
if (Math.abs(value) > flat) {
|
276
|
-
return value;
|
277
|
-
}
|
278
|
-
}
|
279
|
-
return 0;
|
280
|
-
}
|
281
|
-
|
282
|
-
@Override
|
283
|
-
public void onWindowFocusChanged(boolean hasWindowFocus) {
|
284
|
-
// Turn on and off animations based on the window focus.
|
285
|
-
// Alternately, we could update the game state using the Activity onResume()
|
286
|
-
// and onPause() lifecycle events.
|
287
|
-
if (hasWindowFocus) {
|
288
|
-
getHandler().postDelayed(mAnimationRunnable, ANIMATION_TIME_STEP);
|
289
|
-
mLastStepTime = SystemClock.uptimeMillis();
|
290
|
-
} else {
|
291
|
-
getHandler().removeCallbacks(mAnimationRunnable);
|
292
|
-
|
293
|
-
mDPadState = 0;
|
294
|
-
if (mShip != null) {
|
295
|
-
mShip.setHeading(0, 0);
|
296
|
-
mShip.setVelocity(0, 0);
|
297
|
-
}
|
298
|
-
}
|
299
|
-
|
300
|
-
super.onWindowFocusChanged(hasWindowFocus);
|
301
|
-
}
|
302
|
-
|
303
|
-
private void fire() {
|
304
|
-
if (mShip != null && !mShip.isDestroyed()) {
|
305
|
-
Bullet bullet = new Bullet();
|
306
|
-
bullet.setPosition(mShip.getBulletInitialX(), mShip.getBulletInitialY());
|
307
|
-
bullet.setVelocity(mShip.getBulletVelocityX(mBulletSpeed),
|
308
|
-
mShip.getBulletVelocityY(mBulletSpeed));
|
309
|
-
mBullets.add(bullet);
|
310
|
-
}
|
311
|
-
}
|
312
|
-
|
313
|
-
private void ensureInitialized() {
|
314
|
-
if (mShip == null) {
|
315
|
-
reset();
|
316
|
-
}
|
317
|
-
}
|
318
|
-
|
319
|
-
private void reset() {
|
320
|
-
mShip = new Ship();
|
321
|
-
mBullets.clear();
|
322
|
-
mObstacles.clear();
|
323
|
-
}
|
324
|
-
|
325
|
-
void animateFrame() {
|
326
|
-
long currentStepTime = SystemClock.uptimeMillis();
|
327
|
-
step(currentStepTime);
|
328
|
-
|
329
|
-
Handler handler = getHandler();
|
330
|
-
if (handler != null) {
|
331
|
-
handler.postAtTime(mAnimationRunnable, currentStepTime + ANIMATION_TIME_STEP);
|
332
|
-
invalidate();
|
333
|
-
}
|
334
|
-
}
|
335
|
-
|
336
|
-
private void step(long currentStepTime) {
|
337
|
-
float tau = (currentStepTime - mLastStepTime) * 0.001f;
|
338
|
-
mLastStepTime = currentStepTime;
|
339
|
-
|
340
|
-
ensureInitialized();
|
341
|
-
|
342
|
-
// Move the ship.
|
343
|
-
mShip.accelerate(tau, mMaxShipThrust, mMaxShipSpeed);
|
344
|
-
if (!mShip.step(tau)) {
|
345
|
-
reset();
|
346
|
-
}
|
347
|
-
|
348
|
-
// Move the bullets.
|
349
|
-
int numBullets = mBullets.size();
|
350
|
-
for (int i = 0; i < numBullets; i++) {
|
351
|
-
final Bullet bullet = mBullets.get(i);
|
352
|
-
if (!bullet.step(tau)) {
|
353
|
-
mBullets.remove(i);
|
354
|
-
i -= 1;
|
355
|
-
numBullets -= 1;
|
356
|
-
}
|
357
|
-
}
|
358
|
-
|
359
|
-
// Move obstacles.
|
360
|
-
int numObstacles = mObstacles.size();
|
361
|
-
for (int i = 0; i < numObstacles; i++) {
|
362
|
-
final Obstacle obstacle = mObstacles.get(i);
|
363
|
-
if (!obstacle.step(tau)) {
|
364
|
-
mObstacles.remove(i);
|
365
|
-
i -= 1;
|
366
|
-
numObstacles -= 1;
|
367
|
-
}
|
368
|
-
}
|
369
|
-
|
370
|
-
// Check for collisions between bullets and obstacles.
|
371
|
-
for (int i = 0; i < numBullets; i++) {
|
372
|
-
final Bullet bullet = mBullets.get(i);
|
373
|
-
for (int j = 0; j < numObstacles; j++) {
|
374
|
-
final Obstacle obstacle = mObstacles.get(j);
|
375
|
-
if (bullet.collidesWith(obstacle)) {
|
376
|
-
bullet.destroy();
|
377
|
-
obstacle.destroy();
|
378
|
-
break;
|
379
|
-
}
|
380
|
-
}
|
381
|
-
}
|
382
|
-
|
383
|
-
// Check for collisions between the ship and obstacles.
|
384
|
-
for (int i = 0; i < numObstacles; i++) {
|
385
|
-
final Obstacle obstacle = mObstacles.get(i);
|
386
|
-
if (mShip.collidesWith(obstacle)) {
|
387
|
-
mShip.destroy();
|
388
|
-
obstacle.destroy();
|
389
|
-
break;
|
390
|
-
}
|
391
|
-
}
|
392
|
-
|
393
|
-
// Spawn more obstacles offscreen when needed.
|
394
|
-
// Avoid putting them right on top of the ship.
|
395
|
-
OuterLoop: while (mObstacles.size() < MAX_OBSTACLES) {
|
396
|
-
final float minDistance = mShipSize * 4;
|
397
|
-
float size = mRandom.nextFloat() * (mMaxObstacleSize - mMinObstacleSize)
|
398
|
-
+ mMinObstacleSize;
|
399
|
-
float positionX, positionY;
|
400
|
-
int tries = 0;
|
401
|
-
do {
|
402
|
-
int edge = mRandom.nextInt(4);
|
403
|
-
switch (edge) {
|
404
|
-
case 0:
|
405
|
-
positionX = -size;
|
406
|
-
positionY = mRandom.nextInt(getHeight());
|
407
|
-
break;
|
408
|
-
case 1:
|
409
|
-
positionX = getWidth() + size;
|
410
|
-
positionY = mRandom.nextInt(getHeight());
|
411
|
-
break;
|
412
|
-
case 2:
|
413
|
-
positionX = mRandom.nextInt(getWidth());
|
414
|
-
positionY = -size;
|
415
|
-
break;
|
416
|
-
default:
|
417
|
-
positionX = mRandom.nextInt(getWidth());
|
418
|
-
positionY = getHeight() + size;
|
419
|
-
break;
|
420
|
-
}
|
421
|
-
if (++tries > 10) {
|
422
|
-
break OuterLoop;
|
423
|
-
}
|
424
|
-
} while (mShip.distanceTo(positionX, positionY) < minDistance);
|
425
|
-
|
426
|
-
float direction = mRandom.nextFloat() * (float) Math.PI * 2;
|
427
|
-
float speed = mRandom.nextFloat() * (mMaxObstacleSpeed - mMinObstacleSpeed)
|
428
|
-
+ mMinObstacleSpeed;
|
429
|
-
float velocityX = (float) Math.cos(direction) * speed;
|
430
|
-
float velocityY = (float) Math.sin(direction) * speed;
|
431
|
-
|
432
|
-
Obstacle obstacle = new Obstacle();
|
433
|
-
obstacle.setPosition(positionX, positionY);
|
434
|
-
obstacle.setSize(size);
|
435
|
-
obstacle.setVelocity(velocityX, velocityY);
|
436
|
-
mObstacles.add(obstacle);
|
437
|
-
}
|
438
|
-
}
|
439
|
-
|
440
|
-
@Override
|
441
|
-
protected void onDraw(Canvas canvas) {
|
442
|
-
super.onDraw(canvas);
|
443
|
-
|
444
|
-
// Draw the ship.
|
445
|
-
if (mShip != null) {
|
446
|
-
mShip.draw(canvas);
|
447
|
-
}
|
448
|
-
|
449
|
-
// Draw bullets.
|
450
|
-
int numBullets = mBullets.size();
|
451
|
-
for (int i = 0; i < numBullets; i++) {
|
452
|
-
final Bullet bullet = mBullets.get(i);
|
453
|
-
bullet.draw(canvas);
|
454
|
-
}
|
455
|
-
|
456
|
-
// Draw obstacles.
|
457
|
-
int numObstacles = mObstacles.size();
|
458
|
-
for (int i = 0; i < numObstacles; i++) {
|
459
|
-
final Obstacle obstacle = mObstacles.get(i);
|
460
|
-
obstacle.draw(canvas);
|
461
|
-
}
|
462
|
-
}
|
463
|
-
|
464
|
-
static float pythag(float x, float y) {
|
465
|
-
return (float) Math.sqrt(x * x + y * y);
|
466
|
-
}
|
467
|
-
|
468
|
-
static int blend(float alpha, int from, int to) {
|
469
|
-
return from + (int) ((to - from) * alpha);
|
470
|
-
}
|
471
|
-
|
472
|
-
static void setPaintARGBBlend(Paint paint, float alpha,
|
473
|
-
int a1, int r1, int g1, int b1,
|
474
|
-
int a2, int r2, int g2, int b2) {
|
475
|
-
paint.setARGB(blend(alpha, a1, a2), blend(alpha, r1, r2),
|
476
|
-
blend(alpha, g1, g2), blend(alpha, b1, b2));
|
477
|
-
}
|
478
|
-
|
479
|
-
private abstract class Sprite {
|
480
|
-
protected float mPositionX;
|
481
|
-
protected float mPositionY;
|
482
|
-
protected float mVelocityX;
|
483
|
-
protected float mVelocityY;
|
484
|
-
protected float mSize;
|
485
|
-
protected boolean mDestroyed;
|
486
|
-
protected float mDestroyAnimProgress;
|
487
|
-
|
488
|
-
public void setPosition(float x, float y) {
|
489
|
-
mPositionX = x;
|
490
|
-
mPositionY = y;
|
491
|
-
}
|
492
|
-
|
493
|
-
public void setVelocity(float x, float y) {
|
494
|
-
mVelocityX = x;
|
495
|
-
mVelocityY = y;
|
496
|
-
}
|
497
|
-
|
498
|
-
public void setSize(float size) {
|
499
|
-
mSize = size;
|
500
|
-
}
|
501
|
-
|
502
|
-
public float distanceTo(float x, float y) {
|
503
|
-
return pythag(mPositionX - x, mPositionY - y);
|
504
|
-
}
|
505
|
-
|
506
|
-
public float distanceTo(Sprite other) {
|
507
|
-
return distanceTo(other.mPositionX, other.mPositionY);
|
508
|
-
}
|
509
|
-
|
510
|
-
public boolean collidesWith(Sprite other) {
|
511
|
-
// Really bad collision detection.
|
512
|
-
return !mDestroyed && !other.mDestroyed
|
513
|
-
&& distanceTo(other) <= Math.max(mSize, other.mSize)
|
514
|
-
+ Math.min(mSize, other.mSize) * 0.5f;
|
515
|
-
}
|
516
|
-
|
517
|
-
public boolean isDestroyed() {
|
518
|
-
return mDestroyed;
|
519
|
-
}
|
520
|
-
|
521
|
-
public boolean step(float tau) {
|
522
|
-
mPositionX += mVelocityX * tau;
|
523
|
-
mPositionY += mVelocityY * tau;
|
524
|
-
|
525
|
-
if (mDestroyed) {
|
526
|
-
mDestroyAnimProgress += tau / getDestroyAnimDuration();
|
527
|
-
if (mDestroyAnimProgress >= 1.0f) {
|
528
|
-
return false;
|
529
|
-
}
|
530
|
-
}
|
531
|
-
return true;
|
532
|
-
}
|
533
|
-
|
534
|
-
public abstract void draw(Canvas canvas);
|
535
|
-
|
536
|
-
public abstract float getDestroyAnimDuration();
|
537
|
-
|
538
|
-
protected boolean isOutsidePlayfield() {
|
539
|
-
final int width = GameView.this.getWidth();
|
540
|
-
final int height = GameView.this.getHeight();
|
541
|
-
return mPositionX < 0 || mPositionX >= width
|
542
|
-
|| mPositionY < 0 || mPositionY >= height;
|
543
|
-
}
|
544
|
-
|
545
|
-
protected void wrapAtPlayfieldBoundary() {
|
546
|
-
final int width = GameView.this.getWidth();
|
547
|
-
final int height = GameView.this.getHeight();
|
548
|
-
while (mPositionX <= -mSize) {
|
549
|
-
mPositionX += width + mSize * 2;
|
550
|
-
}
|
551
|
-
while (mPositionX >= width + mSize) {
|
552
|
-
mPositionX -= width + mSize * 2;
|
553
|
-
}
|
554
|
-
while (mPositionY <= -mSize) {
|
555
|
-
mPositionY += height + mSize * 2;
|
556
|
-
}
|
557
|
-
while (mPositionY >= height + mSize) {
|
558
|
-
mPositionY -= height + mSize * 2;
|
559
|
-
}
|
560
|
-
}
|
561
|
-
|
562
|
-
public void destroy() {
|
563
|
-
mDestroyed = true;
|
564
|
-
step(0);
|
565
|
-
}
|
566
|
-
}
|
567
|
-
|
568
|
-
private class Ship extends Sprite {
|
569
|
-
private static final float CORNER_ANGLE = (float) Math.PI * 2 / 3;
|
570
|
-
private static final float TO_DEGREES = (float) (180.0 / Math.PI);
|
571
|
-
|
572
|
-
private float mHeadingX;
|
573
|
-
private float mHeadingY;
|
574
|
-
private float mHeadingAngle;
|
575
|
-
private float mHeadingMagnitude;
|
576
|
-
private final Paint mPaint;
|
577
|
-
private final Path mPath;
|
578
|
-
|
579
|
-
|
580
|
-
public Ship() {
|
581
|
-
mPaint = new Paint();
|
582
|
-
mPaint.setStyle(Style.FILL);
|
583
|
-
|
584
|
-
setPosition(getWidth() * 0.5f, getHeight() * 0.5f);
|
585
|
-
setVelocity(0, 0);
|
586
|
-
setSize(mShipSize);
|
587
|
-
|
588
|
-
mPath = new Path();
|
589
|
-
mPath.moveTo(0, 0);
|
590
|
-
mPath.lineTo((float)Math.cos(-CORNER_ANGLE) * mSize,
|
591
|
-
(float)Math.sin(-CORNER_ANGLE) * mSize);
|
592
|
-
mPath.lineTo(mSize, 0);
|
593
|
-
mPath.lineTo((float)Math.cos(CORNER_ANGLE) * mSize,
|
594
|
-
(float)Math.sin(CORNER_ANGLE) * mSize);
|
595
|
-
mPath.lineTo(0, 0);
|
596
|
-
}
|
597
|
-
|
598
|
-
public void setHeadingX(float x) {
|
599
|
-
mHeadingX = x;
|
600
|
-
updateHeading();
|
601
|
-
}
|
602
|
-
|
603
|
-
public void setHeadingY(float y) {
|
604
|
-
mHeadingY = y;
|
605
|
-
updateHeading();
|
606
|
-
}
|
607
|
-
|
608
|
-
public void setHeading(float x, float y) {
|
609
|
-
mHeadingX = x;
|
610
|
-
mHeadingY = y;
|
611
|
-
updateHeading();
|
612
|
-
}
|
613
|
-
|
614
|
-
private void updateHeading() {
|
615
|
-
mHeadingMagnitude = pythag(mHeadingX, mHeadingY);
|
616
|
-
if (mHeadingMagnitude > 0.1f) {
|
617
|
-
mHeadingAngle = (float) Math.atan2(mHeadingY, mHeadingX);
|
618
|
-
}
|
619
|
-
}
|
620
|
-
|
621
|
-
private float polarX(float radius) {
|
622
|
-
return (float) Math.cos(mHeadingAngle) * radius;
|
623
|
-
}
|
624
|
-
|
625
|
-
private float polarY(float radius) {
|
626
|
-
return (float) Math.sin(mHeadingAngle) * radius;
|
627
|
-
}
|
628
|
-
|
629
|
-
public float getBulletInitialX() {
|
630
|
-
return mPositionX + polarX(mSize);
|
631
|
-
}
|
632
|
-
|
633
|
-
public float getBulletInitialY() {
|
634
|
-
return mPositionY + polarY(mSize);
|
635
|
-
}
|
636
|
-
|
637
|
-
public float getBulletVelocityX(float relativeSpeed) {
|
638
|
-
return mVelocityX + polarX(relativeSpeed);
|
639
|
-
}
|
640
|
-
|
641
|
-
public float getBulletVelocityY(float relativeSpeed) {
|
642
|
-
return mVelocityY + polarY(relativeSpeed);
|
643
|
-
}
|
644
|
-
|
645
|
-
public void accelerate(float tau, float maxThrust, float maxSpeed) {
|
646
|
-
final float thrust = mHeadingMagnitude * maxThrust;
|
647
|
-
mVelocityX += polarX(thrust);
|
648
|
-
mVelocityY += polarY(thrust);
|
649
|
-
|
650
|
-
final float speed = pythag(mVelocityX, mVelocityY);
|
651
|
-
if (speed > maxSpeed) {
|
652
|
-
final float scale = maxSpeed / speed;
|
653
|
-
mVelocityX = mVelocityX * scale;
|
654
|
-
mVelocityY = mVelocityY * scale;
|
655
|
-
}
|
656
|
-
}
|
657
|
-
|
658
|
-
@Override
|
659
|
-
public boolean step(float tau) {
|
660
|
-
if (!super.step(tau)) {
|
661
|
-
return false;
|
662
|
-
}
|
663
|
-
wrapAtPlayfieldBoundary();
|
664
|
-
return true;
|
665
|
-
}
|
666
|
-
|
667
|
-
public void draw(Canvas canvas) {
|
668
|
-
setPaintARGBBlend(mPaint, mDestroyAnimProgress,
|
669
|
-
255, 63, 255, 63,
|
670
|
-
0, 255, 0, 0);
|
671
|
-
|
672
|
-
canvas.save(Canvas.MATRIX_SAVE_FLAG);
|
673
|
-
canvas.translate(mPositionX, mPositionY);
|
674
|
-
canvas.rotate(mHeadingAngle * TO_DEGREES);
|
675
|
-
canvas.drawPath(mPath, mPaint);
|
676
|
-
canvas.restore();
|
677
|
-
}
|
678
|
-
|
679
|
-
@Override
|
680
|
-
public float getDestroyAnimDuration() {
|
681
|
-
return 1.0f;
|
682
|
-
}
|
683
|
-
}
|
684
|
-
|
685
|
-
private class Bullet extends Sprite {
|
686
|
-
private final Paint mPaint;
|
687
|
-
|
688
|
-
public Bullet() {
|
689
|
-
mPaint = new Paint();
|
690
|
-
mPaint.setStyle(Style.FILL);
|
691
|
-
|
692
|
-
setSize(mBulletSize);
|
693
|
-
}
|
694
|
-
|
695
|
-
@Override
|
696
|
-
public boolean step(float tau) {
|
697
|
-
if (!super.step(tau)) {
|
698
|
-
return false;
|
699
|
-
}
|
700
|
-
return !isOutsidePlayfield();
|
701
|
-
}
|
702
|
-
|
703
|
-
public void draw(Canvas canvas) {
|
704
|
-
setPaintARGBBlend(mPaint, mDestroyAnimProgress,
|
705
|
-
255, 255, 255, 0,
|
706
|
-
0, 255, 255, 255);
|
707
|
-
canvas.drawCircle(mPositionX, mPositionY, mSize, mPaint);
|
708
|
-
}
|
709
|
-
|
710
|
-
@Override
|
711
|
-
public float getDestroyAnimDuration() {
|
712
|
-
return 0.125f;
|
713
|
-
}
|
714
|
-
}
|
715
|
-
|
716
|
-
private class Obstacle extends Sprite {
|
717
|
-
private final Paint mPaint;
|
718
|
-
|
719
|
-
public Obstacle() {
|
720
|
-
mPaint = new Paint();
|
721
|
-
mPaint.setARGB(255, 127, 127, 255);
|
722
|
-
mPaint.setStyle(Style.FILL);
|
723
|
-
}
|
724
|
-
|
725
|
-
@Override
|
726
|
-
public boolean step(float tau) {
|
727
|
-
if (!super.step(tau)) {
|
728
|
-
return false;
|
729
|
-
}
|
730
|
-
wrapAtPlayfieldBoundary();
|
731
|
-
return true;
|
732
|
-
}
|
733
|
-
|
734
|
-
public void draw(Canvas canvas) {
|
735
|
-
setPaintARGBBlend(mPaint, mDestroyAnimProgress,
|
736
|
-
255, 127, 127, 255,
|
737
|
-
0, 255, 0, 0);
|
738
|
-
canvas.drawCircle(mPositionX, mPositionY,
|
739
|
-
mSize * (1.0f - mDestroyAnimProgress), mPaint);
|
740
|
-
}
|
741
|
-
|
742
|
-
@Override
|
743
|
-
public float getDestroyAnimDuration() {
|
744
|
-
return 0.25f;
|
745
|
-
}
|
746
|
-
}
|
747
|
-
}
|