├── .gitignore ├── README.md ├── android_api_demos.properties ├── android_api_demos.xml ├── app ├── .gitignore ├── build.gradle ├── module_app.xml └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── example │ │ └── android │ │ └── apis │ │ ├── AllTests.java │ │ ├── ApiDemosApplicationTests.java │ │ ├── ApiDemosTest.java │ │ ├── app │ │ ├── ForwardingTest.java │ │ └── LocalServiceTest.java │ │ ├── os │ │ └── MorseCodeConverterTest.java │ │ └── view │ │ ├── Focus2ActivityTest.java │ │ └── Focus2AndroidTest.java │ └── main │ ├── AndroidManifest.xml │ ├── aidl │ └── com │ │ └── example │ │ └── android │ │ └── apis │ │ └── app │ │ ├── IRemoteService.aidl │ │ ├── IRemoteServiceCallback.aidl │ │ └── ISecondary.aidl │ ├── assets │ ├── fonts │ │ └── samplefont.ttf │ └── read_asset.txt │ ├── java │ └── com │ │ └── example │ │ └── android │ │ └── apis │ │ ├── ApiDemos.java │ │ ├── ApiDemosApplication.java │ │ ├── Shakespeare.java │ │ ├── accessibility │ │ ├── ClockBackActivity.java │ │ ├── ClockBackService.java │ │ ├── CustomViewAccessibilityActivity.java │ │ ├── TaskBackService.java │ │ ├── TaskListActivity.java │ │ └── TaskListView.java │ │ ├── animation │ │ ├── ActivityTransition.java │ │ ├── ActivityTransitionDetails.java │ │ ├── AnimationCloning.java │ │ ├── AnimationLoading.java │ │ ├── AnimationSeeking.java │ │ ├── AnimatorEvents.java │ │ ├── BouncingBalls.java │ │ ├── CustomEvaluator.java │ │ ├── FixedGridLayout.java │ │ ├── LayoutAnimations.java │ │ ├── LayoutAnimationsByDefault.java │ │ ├── LayoutAnimationsHideShow.java │ │ ├── ListFlipper.java │ │ ├── MultiPropertyAnimation.java │ │ ├── PathAnimations.java │ │ ├── ReversingAnimation.java │ │ ├── Rotate3dAnimation.java │ │ ├── ShapeHolder.java │ │ ├── Transition3d.java │ │ └── Transitions.java │ │ ├── app │ │ ├── ActionBarDisplayOptions.java │ │ ├── ActionBarMechanics.java │ │ ├── ActionBarNavigation.java │ │ ├── ActionBarNavigationTarget.java │ │ ├── ActionBarSettingsActionProviderActivity.java │ │ ├── ActionBarShareActionProviderActivity.java │ │ ├── ActionBarTabs.java │ │ ├── ActionBarUsage.java │ │ ├── ActivityRecreate.java │ │ ├── AlarmController.java │ │ ├── AlarmService.java │ │ ├── AlarmService_Service.java │ │ ├── AlertDialogSamples.java │ │ ├── Animation.java │ │ ├── AppUpdateReceiver.java │ │ ├── AppUpdateSspReceiver.java │ │ ├── ContactsFilter.java │ │ ├── ContactsFilterInstrumentation.java │ │ ├── ContactsSelectInstrumentation.java │ │ ├── CustomDialogActivity.java │ │ ├── CustomTitle.java │ │ ├── DeviceAdminSample.java │ │ ├── DialogActivity.java │ │ ├── DoNothing.java │ │ ├── FinishAffinity.java │ │ ├── ForegroundService.java │ │ ├── ForwardTarget.java │ │ ├── Forwarding.java │ │ ├── FragmentAlertDialog.java │ │ ├── FragmentArguments.java │ │ ├── FragmentArgumentsFragment.java │ │ ├── FragmentContextMenu.java │ │ ├── FragmentCustomAnimations.java │ │ ├── FragmentDialog.java │ │ ├── FragmentDialogOrActivity.java │ │ ├── FragmentHideShow.java │ │ ├── FragmentLayout.java │ │ ├── FragmentListArray.java │ │ ├── FragmentMenu.java │ │ ├── FragmentMenuFragment.java │ │ ├── FragmentNestingTabs.java │ │ ├── FragmentReceiveResult.java │ │ ├── FragmentRetainInstance.java │ │ ├── FragmentStack.java │ │ ├── FragmentStackFragment.java │ │ ├── FragmentTabs.java │ │ ├── FragmentTabsFragment.java │ │ ├── HelloWorld.java │ │ ├── IncomingMessage.java │ │ ├── IncomingMessageInterstitial.java │ │ ├── IncomingMessageView.java │ │ ├── IntentActivityFlags.java │ │ ├── Intents.java │ │ ├── IsolatedService.java │ │ ├── IsolatedService2.java │ │ ├── LauncherShortcuts.java │ │ ├── LoaderCursor.java │ │ ├── LoaderCustom.java │ │ ├── LoaderRetained.java │ │ ├── LoaderThrottle.java │ │ ├── LocalSample.java │ │ ├── LocalSampleInstrumentation.java │ │ ├── LocalService.java │ │ ├── LocalServiceActivities.java │ │ ├── MenuInflateFromXml.java │ │ ├── MessengerService.java │ │ ├── MessengerServiceActivities.java │ │ ├── NotificationDisplay.java │ │ ├── NotifyWithText.java │ │ ├── NotifyingController.java │ │ ├── NotifyingService.java │ │ ├── OneShotAlarm.java │ │ ├── OverscanActivity.java │ │ ├── PersistentState.java │ │ ├── PresentationActivity.java │ │ ├── PresentationWithMediaRouterActivity.java │ │ ├── PrintBitmap.java │ │ ├── PrintCustomContent.java │ │ ├── PrintHtmlFromScreen.java │ │ ├── PrintHtmlOffScreen.java │ │ ├── QuickContactsDemo.java │ │ ├── ReceiveResult.java │ │ ├── RedirectEnter.java │ │ ├── RedirectGetter.java │ │ ├── RedirectMain.java │ │ ├── RemoteService.java │ │ ├── ReorderFour.java │ │ ├── ReorderOnLaunch.java │ │ ├── ReorderThree.java │ │ ├── ReorderTwo.java │ │ ├── RepeatingAlarm.java │ │ ├── RotationAnimation.java │ │ ├── SaveRestoreState.java │ │ ├── ScreenOrientation.java │ │ ├── SearchInvoke.java │ │ ├── SearchQueryResults.java │ │ ├── SearchSuggestionSampleProvider.java │ │ ├── SecureDialogActivity.java │ │ ├── SecureSurfaceViewActivity.java │ │ ├── SecureWindowActivity.java │ │ ├── SendResult.java │ │ ├── ServiceStartArguments.java │ │ ├── SetWallpaperActivity.java │ │ ├── SoftInputModes.java │ │ ├── StatusBarNotifications.java │ │ ├── TextToSpeechActivity.java │ │ ├── TranslucentActivity.java │ │ ├── TranslucentBlurActivity.java │ │ ├── VoiceRecognition.java │ │ └── WallpaperActivity.java │ │ ├── appwidget │ │ ├── ExampleAppWidgetConfigure.java │ │ ├── ExampleAppWidgetProvider.java │ │ └── ExampleBroadcastReceiver.java │ │ ├── content │ │ ├── ChangedContacts.java │ │ ├── ClipboardSample.java │ │ ├── DocumentsSample.java │ │ ├── ExternalStorage.java │ │ ├── FileProvider.java │ │ ├── InstallApk.java │ │ ├── PickContact.java │ │ ├── ProcessText.java │ │ ├── ProcessTextLauncher.java │ │ ├── ReadAsset.java │ │ ├── ResourcesLayoutReference.java │ │ ├── ResourcesSample.java │ │ ├── ResourcesSmallestWidth.java │ │ ├── ResourcesWidthAndHeight.java │ │ ├── ShareContent.java │ │ ├── StyledText.java │ │ └── TextUndoActivity.java │ │ ├── graphics │ │ ├── AlphaBitmap.java │ │ ├── AnimateDrawable.java │ │ ├── AnimateDrawables.java │ │ ├── Arcs.java │ │ ├── BitmapDecode.java │ │ ├── BitmapMesh.java │ │ ├── BitmapPixels.java │ │ ├── CameraPreview.java │ │ ├── Clipping.java │ │ ├── ColorFilters.java │ │ ├── ColorMatrixSample.java │ │ ├── ColorPickerDialog.java │ │ ├── Compass.java │ │ ├── CompressedTextureActivity.java │ │ ├── CreateBitmap.java │ │ ├── Cube.java │ │ ├── CubeMapActivity.java │ │ ├── CubeRenderer.java │ │ ├── DensityActivity.java │ │ ├── DrawPoints.java │ │ ├── FingerPaint.java │ │ ├── FrameBufferObjectActivity.java │ │ ├── GLES20Activity.java │ │ ├── GLES20TriangleRenderer.java │ │ ├── GLSurfaceViewActivity.java │ │ ├── GradientDrawable1.java │ │ ├── GraphicsActivity.java │ │ ├── Layers.java │ │ ├── MatrixPaletteActivity.java │ │ ├── MatrixPaletteRenderer.java │ │ ├── MeasureText.java │ │ ├── PathEffects.java │ │ ├── PathFillTypes.java │ │ ├── Patterns.java │ │ ├── PictureLayout.java │ │ ├── Pictures.java │ │ ├── PolyToPoly.java │ │ ├── ProxyDrawable.java │ │ ├── PurgeableBitmap.java │ │ ├── PurgeableBitmapView.java │ │ ├── Regions.java │ │ ├── RoundRects.java │ │ ├── ScaleToFit.java │ │ ├── SensorTest.java │ │ ├── ShadowCardDrag.java │ │ ├── ShadowCardStack.java │ │ ├── ShapeDrawable1.java │ │ ├── StaticTriangleRenderer.java │ │ ├── SurfaceViewOverlay.java │ │ ├── Sweep.java │ │ ├── TextAlign.java │ │ ├── TouchPaint.java │ │ ├── TouchRotateActivity.java │ │ ├── TranslucentGLSurfaceViewActivity.java │ │ ├── TriangleActivity.java │ │ ├── TriangleRenderer.java │ │ ├── Typefaces.java │ │ ├── UnicodeChart.java │ │ ├── Vertices.java │ │ ├── WindowSurface.java │ │ ├── Xfermodes.java │ │ ├── kube │ │ │ ├── Cube.java │ │ │ ├── GLColor.java │ │ │ ├── GLFace.java │ │ │ ├── GLShape.java │ │ │ ├── GLVertex.java │ │ │ ├── GLWorld.java │ │ │ ├── Kube.java │ │ │ ├── KubeRenderer.java │ │ │ ├── Layer.java │ │ │ └── M4.java │ │ └── spritetext │ │ │ ├── Grid.java │ │ │ ├── LabelMaker.java │ │ │ ├── MatrixGrabber.java │ │ │ ├── MatrixStack.java │ │ │ ├── MatrixTrackingGL.java │ │ │ ├── NumericSprite.java │ │ │ ├── Projector.java │ │ │ ├── SpriteTextActivity.java │ │ │ └── SpriteTextRenderer.java │ │ ├── hardware │ │ └── ConsumerIr.java │ │ ├── media │ │ ├── AudioFxDemo.java │ │ ├── MediaPlayerDemo.java │ │ ├── MediaPlayerDemo_Audio.java │ │ ├── MediaPlayerDemo_Video.java │ │ ├── VideoViewDemo.java │ │ └── projection │ │ │ └── MediaProjectionDemo.java │ │ ├── nfc │ │ ├── ForegroundDispatch.java │ │ ├── ForegroundNdefPush.java │ │ └── TechFilter.java │ │ ├── os │ │ ├── HeadlessSmsSendService.java │ │ ├── MmsFileProvider.java │ │ ├── MmsMessagingDemo.java │ │ ├── MmsWapPushReceiver.java │ │ ├── MorseCode.java │ │ ├── MorseCodeConverter.java │ │ ├── PduParserUtil.java │ │ ├── RotationVectorDemo.java │ │ ├── SmsMessageReceiver.java │ │ ├── SmsMessagingDemo.java │ │ ├── SmsReceivedDialog.java │ │ └── TriggerSensors.java │ │ ├── preference │ │ ├── AdvancedPreferences.java │ │ ├── DefaultValues.java │ │ ├── FragmentPreferences.java │ │ ├── LaunchingPreferences.java │ │ ├── MyPreference.java │ │ ├── PreferenceDependencies.java │ │ ├── PreferenceWithHeaders.java │ │ ├── PreferencesFromCode.java │ │ ├── PreferencesFromXml.java │ │ └── SwitchPreference.java │ │ ├── security │ │ └── KeyStoreUsage.java │ │ ├── text │ │ ├── Link.java │ │ ├── LogTextBox.java │ │ ├── LogTextBox1.java │ │ └── Marquee.java │ │ └── view │ │ ├── Animation1.java │ │ ├── Animation2.java │ │ ├── Animation3.java │ │ ├── AutoComplete1.java │ │ ├── AutoComplete2.java │ │ ├── AutoComplete3.java │ │ ├── AutoComplete4.java │ │ ├── AutoComplete5.java │ │ ├── AutoComplete6.java │ │ ├── Baseline1.java │ │ ├── Baseline2.java │ │ ├── Baseline3.java │ │ ├── Baseline4.java │ │ ├── Baseline6.java │ │ ├── Baseline7.java │ │ ├── BaselineNested1.java │ │ ├── BaselineNested2.java │ │ ├── BaselineNested3.java │ │ ├── Buttons1.java │ │ ├── CheckableFrameLayout.java │ │ ├── Cheeses.java │ │ ├── ChronometerDemo.java │ │ ├── ContentBrowserActivity.java │ │ ├── ContentBrowserNavActivity.java │ │ ├── Controls1.java │ │ ├── Controls2.java │ │ ├── Controls3.java │ │ ├── Controls4.java │ │ ├── Controls5.java │ │ ├── Controls6.java │ │ ├── Controls7.java │ │ ├── Controls8.java │ │ ├── Controls9.java │ │ ├── CustomLayout.java │ │ ├── CustomLayoutActivity.java │ │ ├── CustomView1.java │ │ ├── DateWidgets1.java │ │ ├── DateWidgets2.java │ │ ├── DragAndDropDemo.java │ │ ├── DraggableDot.java │ │ ├── EditTextDemo.java │ │ ├── ExpandableList1.java │ │ ├── ExpandableList2.java │ │ ├── ExpandableList3.java │ │ ├── Focus1.java │ │ ├── Focus2.java │ │ ├── Focus3.java │ │ ├── Focus5.java │ │ ├── GameActivity.java │ │ ├── GameControllerInput.java │ │ ├── GameView.java │ │ ├── Grid1.java │ │ ├── Grid2.java │ │ ├── Grid3.java │ │ ├── GridLayout1.java │ │ ├── GridLayout2.java │ │ ├── GridLayout3.java │ │ ├── HorizontalScrollView1.java │ │ ├── Hover.java │ │ ├── HoverInterceptorView.java │ │ ├── ImageButton1.java │ │ ├── ImageView1.java │ │ ├── InternalSelectionFocus.java │ │ ├── InternalSelectionScroll.java │ │ ├── InternalSelectionView.java │ │ ├── LabelView.java │ │ ├── LayoutAnimation1.java │ │ ├── LayoutAnimation2.java │ │ ├── LayoutAnimation3.java │ │ ├── LayoutAnimation4.java │ │ ├── LayoutAnimation5.java │ │ ├── LayoutAnimation6.java │ │ ├── LayoutAnimation7.java │ │ ├── LinearLayout1.java │ │ ├── LinearLayout10.java │ │ ├── LinearLayout2.java │ │ ├── LinearLayout3.java │ │ ├── LinearLayout4.java │ │ ├── LinearLayout5.java │ │ ├── LinearLayout6.java │ │ ├── LinearLayout7.java │ │ ├── LinearLayout8.java │ │ ├── LinearLayout9.java │ │ ├── List1.java │ │ ├── List10.java │ │ ├── List11.java │ │ ├── List12.java │ │ ├── List13.java │ │ ├── List14.java │ │ ├── List15.java │ │ ├── List16.java │ │ ├── List17.java │ │ ├── List2.java │ │ ├── List3.java │ │ ├── List4.java │ │ ├── List5.java │ │ ├── List6.java │ │ ├── List7.java │ │ ├── List8.java │ │ ├── List9.java │ │ ├── PopupMenu1.java │ │ ├── ProgressBar1.java │ │ ├── ProgressBar2.java │ │ ├── ProgressBar3.java │ │ ├── ProgressBar4.java │ │ ├── RadioGroup1.java │ │ ├── RatingBar1.java │ │ ├── RelativeLayout1.java │ │ ├── RelativeLayout2.java │ │ ├── RotatingButton.java │ │ ├── ScrollBar1.java │ │ ├── ScrollBar2.java │ │ ├── ScrollBar3.java │ │ ├── ScrollView1.java │ │ ├── ScrollView2.java │ │ ├── SearchViewActionBar.java │ │ ├── SearchViewAlwaysVisible.java │ │ ├── SearchViewFilterMode.java │ │ ├── SecureView.java │ │ ├── SecureViewOverlay.java │ │ ├── SeekBar1.java │ │ ├── Spinner1.java │ │ ├── SplitTouchView.java │ │ ├── Switches.java │ │ ├── SystemUIModes.java │ │ ├── SystemUIModesOverlay.java │ │ ├── TableLayout1.java │ │ ├── TableLayout10.java │ │ ├── TableLayout11.java │ │ ├── TableLayout12.java │ │ ├── TableLayout2.java │ │ ├── TableLayout3.java │ │ ├── TableLayout4.java │ │ ├── TableLayout5.java │ │ ├── TableLayout6.java │ │ ├── TableLayout7.java │ │ ├── TableLayout8.java │ │ ├── TableLayout9.java │ │ ├── Tabs1.java │ │ ├── Tabs2.java │ │ ├── Tabs3.java │ │ ├── Tabs4.java │ │ ├── Tabs5.java │ │ ├── Tabs6.java │ │ ├── TextClockDemo.java │ │ ├── TextSwitcher1.java │ │ ├── TextViewDemo.java │ │ ├── TranslucentBarsActivity.java │ │ ├── VideoPlayerActivity.java │ │ ├── Visibility1.java │ │ ├── WebView1.java │ │ └── WindowFocusObserver.java │ ├── res │ ├── anim │ │ ├── animator.xml │ │ ├── animator_set.xml │ │ ├── color_animator.xml │ │ ├── cycle_7.xml │ │ ├── fade.xml │ │ ├── hold.xml │ │ ├── hyperspace_in.xml │ │ ├── hyperspace_out.xml │ │ ├── layout_animation_row_left_slide.xml │ │ ├── layout_animation_row_right_slide.xml │ │ ├── layout_animation_table.xml │ │ ├── layout_bottom_to_top_slide.xml │ │ ├── layout_grid_fade.xml │ │ ├── layout_grid_inverse_fade.xml │ │ ├── layout_random_fade.xml │ │ ├── layout_wave_scale.xml │ │ ├── object_animator.xml │ │ ├── object_animator_pvh.xml │ │ ├── object_animator_pvh_kf.xml │ │ ├── object_animator_pvh_kf_interpolated.xml │ │ ├── push_left_in.xml │ │ ├── push_left_out.xml │ │ ├── push_up_in.xml │ │ ├── push_up_out.xml │ │ ├── shake.xml │ │ ├── slide_left.xml │ │ ├── slide_right.xml │ │ ├── slide_top_to_bottom.xml │ │ ├── value_animator_pvh_kf.xml │ │ ├── wave_scale.xml │ │ ├── zoom_enter.xml │ │ └── zoom_exit.xml │ ├── animator │ │ ├── fragment_slide_left_enter.xml │ │ ├── fragment_slide_left_exit.xml │ │ ├── fragment_slide_right_enter.xml │ │ └── fragment_slide_right_exit.xml │ ├── drawable-hdpi │ │ ├── alert_dialog_icon.png │ │ ├── apidemo_androidlogo.png │ │ ├── app_sample_code.png │ │ ├── arrow_down_float.png │ │ ├── arrow_up_float.png │ │ ├── btn_check_off.png │ │ ├── btn_check_on.png │ │ ├── btn_circle_normal.png │ │ ├── btn_default_normal.9.png │ │ ├── button.9.png │ │ ├── ic_contact_picture.png │ │ ├── ic_launcher_settings.png │ │ ├── ic_popup_reminder.png │ │ ├── icon48x48_2.png │ │ ├── logo240dpi.png │ │ ├── npatch240dpi.9.png │ │ ├── progress_circular_background.png │ │ ├── progress_particle.png │ │ ├── reslogo240dpi.png │ │ ├── scrollbar_state2.png │ │ ├── smlnpatch240dpi.9.png │ │ ├── star_big_on.png │ │ ├── stat_happy.png │ │ ├── stat_neutral.png │ │ ├── stat_sad.png │ │ ├── stat_sample.png │ │ └── stylogo240dpi.png │ ├── drawable-ldpi │ │ ├── logo120dpi.png │ │ ├── npatch120dpi.9.png │ │ ├── reslogo120dpi.png │ │ ├── smlnpatch120dpi.9.png │ │ └── stylogo120dpi.png │ ├── drawable-mdpi │ │ ├── alert_dialog_icon.png │ │ ├── apidemo_androidlogo.png │ │ ├── app_sample_code.png │ │ ├── arrow_down_float.png │ │ ├── arrow_up_float.png │ │ ├── btn_check_off.png │ │ ├── btn_check_on.png │ │ ├── btn_circle_normal.png │ │ ├── btn_default_normal.9.png │ │ ├── button.9.png │ │ ├── ic_contact_picture.png │ │ ├── ic_launcher_settings.png │ │ ├── ic_popup_reminder.png │ │ ├── ic_settings_applications.png │ │ ├── ic_settings_display.png │ │ ├── icon48x48_2.png │ │ ├── progress_circular_background.png │ │ ├── progress_particle.png │ │ ├── scrollbar_state2.png │ │ ├── star_big_on.png │ │ ├── stat_happy.png │ │ ├── stat_neutral.png │ │ ├── stat_sad.png │ │ └── stat_sample.png │ ├── drawable-nodpi │ │ ├── ball.jpg │ │ ├── block.jpg │ │ ├── ducky.jpg │ │ ├── frantic.jpg │ │ ├── jellies.jpg │ │ ├── logonodpi120.png │ │ ├── logonodpi160.png │ │ ├── logonodpi240.png │ │ ├── mug.jpg │ │ ├── pencil.jpg │ │ ├── scissors.jpg │ │ └── woot.jpg │ ├── drawable-xhdpi │ │ └── ic_launcher_settings.png │ ├── drawable │ │ ├── animated_gif.gif │ │ ├── balloons.jpg │ │ ├── beach.jpg │ │ ├── black_box.xml │ │ ├── black_opaque_box.xml │ │ ├── box.xml │ │ ├── box_white.xml │ │ ├── circular_progress.xml │ │ ├── filled_box.xml │ │ ├── frog.gif │ │ ├── gallery_background_1.xml │ │ ├── gallery_photo_1.jpg │ │ ├── gallery_photo_2.jpg │ │ ├── gallery_photo_3.jpg │ │ ├── gallery_photo_4.jpg │ │ ├── gallery_photo_5.jpg │ │ ├── gallery_photo_6.jpg │ │ ├── gallery_photo_7.jpg │ │ ├── gallery_photo_8.jpg │ │ ├── hover_background.xml │ │ ├── hover_background_active.xml │ │ ├── hover_background_inactive.xml │ │ ├── icon48x48_1.png │ │ ├── line.xml │ │ ├── logo160dpi.png │ │ ├── magnifying_glass.png │ │ ├── npatch160dpi.9.png │ │ ├── photo1.jpg │ │ ├── photo2.jpg │ │ ├── photo3.jpg │ │ ├── photo4.jpg │ │ ├── photo5.jpg │ │ ├── photo6.jpg │ │ ├── picture_frame.png │ │ ├── reslogo160dpi.png │ │ ├── round_rect.xml │ │ ├── sample_0.jpg │ │ ├── sample_1.jpg │ │ ├── sample_2.jpg │ │ ├── sample_3.jpg │ │ ├── sample_4.jpg │ │ ├── sample_5.jpg │ │ ├── sample_6.jpg │ │ ├── sample_7.jpg │ │ ├── sample_thumb_0.jpg │ │ ├── sample_thumb_1.jpg │ │ ├── sample_thumb_2.jpg │ │ ├── sample_thumb_3.jpg │ │ ├── sample_thumb_4.jpg │ │ ├── sample_thumb_5.jpg │ │ ├── sample_thumb_6.jpg │ │ ├── sample_thumb_7.jpg │ │ ├── scrollbar_vertical_thumb.xml │ │ ├── scrollbar_vertical_track.xml │ │ ├── shape_1.xml │ │ ├── shape_2.xml │ │ ├── shape_3.xml │ │ ├── shape_4.xml │ │ ├── shape_5.xml │ │ ├── smlnpatch160dpi.9.png │ │ └── stylogo160dpi.png │ ├── layout-h550dp │ │ └── resources_height.xml │ ├── layout-h670dp │ │ └── resources_height.xml │ ├── layout-h974dp │ │ └── resources_height.xml │ ├── layout-land │ │ ├── fragment_arguments.xml │ │ ├── fragment_layout.xml │ │ └── grid_layout_2.xml │ ├── layout-sw480dp │ │ ├── resources_smallest_width_inner.xml │ │ └── resources_smallest_width_row.xml │ ├── layout-sw600dp │ │ ├── resources_smallest_width_inner.xml │ │ └── resources_smallest_width_row.xml │ ├── layout-sw720dp │ │ ├── resources_smallest_width_inner.xml │ │ └── resources_smallest_width_row.xml │ ├── layout-v17 │ │ └── textclock.xml │ ├── layout-w1024dp │ │ └── resources_width.xml │ ├── layout-w600dp │ │ └── resources_width.xml │ ├── layout-w720dp │ │ └── resources_width.xml │ ├── layout │ │ ├── accessibility_service.xml │ │ ├── action_bar_display_options.xml │ │ ├── action_bar_display_options_custom.xml │ │ ├── action_bar_navigation.xml │ │ ├── action_bar_navigation_target.xml │ │ ├── action_bar_settings_action_provider.xml │ │ ├── action_bar_tab_content.xml │ │ ├── action_bar_tabs.xml │ │ ├── activity_animation.xml │ │ ├── activity_finish_affinity.xml │ │ ├── activity_recreate.xml │ │ ├── alarm_controller.xml │ │ ├── alarm_service.xml │ │ ├── alert_dialog.xml │ │ ├── alert_dialog_text_entry.xml │ │ ├── animation_1.xml │ │ ├── animation_2.xml │ │ ├── animation_3.xml │ │ ├── animation_cloning.xml │ │ ├── animation_custom_evaluator.xml │ │ ├── animation_loading.xml │ │ ├── animation_multi_property.xml │ │ ├── animation_reversing.xml │ │ ├── animation_seeking.xml │ │ ├── animations_main_screen.xml │ │ ├── animator_custom_evaluator.xml │ │ ├── animator_events.xml │ │ ├── appwidget_configure.xml │ │ ├── appwidget_provider.xml │ │ ├── autocomplete_1.xml │ │ ├── autocomplete_2.xml │ │ ├── autocomplete_3.xml │ │ ├── autocomplete_4.xml │ │ ├── autocomplete_5.xml │ │ ├── autocomplete_6.xml │ │ ├── baseline_1.xml │ │ ├── baseline_2.xml │ │ ├── baseline_3.xml │ │ ├── baseline_4.xml │ │ ├── baseline_6.xml │ │ ├── baseline_7.xml │ │ ├── baseline_nested_1.xml │ │ ├── baseline_nested_2.xml │ │ ├── baseline_nested_3.xml │ │ ├── bouncing_balls.xml │ │ ├── buttons_1.xml │ │ ├── chronometer.xml │ │ ├── clipboard.xml │ │ ├── consumer_ir.xml │ │ ├── contacts_filter.xml │ │ ├── content_browser.xml │ │ ├── content_browser_nav.xml │ │ ├── controls_1.xml │ │ ├── custom_dialog_activity.xml │ │ ├── custom_layout.xml │ │ ├── custom_title.xml │ │ ├── custom_title_1.xml │ │ ├── custom_view_1.xml │ │ ├── custom_view_accessibility.xml │ │ ├── date_widgets_example_1.xml │ │ ├── date_widgets_example_2.xml │ │ ├── density_image_views.xml │ │ ├── density_styled_image_views.xml │ │ ├── dialog_activity.xml │ │ ├── drag_layout.xml │ │ ├── edit_text_demo.xml │ │ ├── external_storage.xml │ │ ├── external_storage_item.xml │ │ ├── focus_1.xml │ │ ├── focus_2.xml │ │ ├── focus_3.xml │ │ ├── focus_5.xml │ │ ├── foreground_dispatch.xml │ │ ├── foreground_service_controller.xml │ │ ├── forward_target.xml │ │ ├── forwarding.xml │ │ ├── fragment_arguments.xml │ │ ├── fragment_arguments_fragment.xml │ │ ├── fragment_context_menu.xml │ │ ├── fragment_dialog.xml │ │ ├── fragment_dialog_or_activity.xml │ │ ├── fragment_hide_show.xml │ │ ├── fragment_layout.xml │ │ ├── fragment_menu.xml │ │ ├── fragment_retain_instance.xml │ │ ├── fragment_stack.xml │ │ ├── fragment_tabs_fragment.xml │ │ ├── game.xml │ │ ├── game_controller_input.xml │ │ ├── game_controller_input_heading.xml │ │ ├── game_controller_input_text_column.xml │ │ ├── google_login.xml │ │ ├── grid_1.xml │ │ ├── grid_2.xml │ │ ├── grid_layout_1.xml │ │ ├── grid_layout_2.xml │ │ ├── hello_world.xml │ │ ├── horizontal_scroll_view1.xml │ │ ├── hover.xml │ │ ├── image_block.xml │ │ ├── image_button_1.xml │ │ ├── image_details.xml │ │ ├── image_view_1.xml │ │ ├── incoming_message.xml │ │ ├── incoming_message_info.xml │ │ ├── incoming_message_interstitial.xml │ │ ├── incoming_message_panel.xml │ │ ├── incoming_message_view.xml │ │ ├── install_apk.xml │ │ ├── intent_activity_flags.xml │ │ ├── intents.xml │ │ ├── isolated_service_controller.xml │ │ ├── keystore_usage.xml │ │ ├── labeled_text_edit.xml │ │ ├── launcher_shortcuts.xml │ │ ├── layout_animation_1.xml │ │ ├── layout_animation_3.xml │ │ ├── layout_animation_4.xml │ │ ├── layout_animation_5.xml │ │ ├── layout_animation_6.xml │ │ ├── layout_animation_7.xml │ │ ├── layout_animations.xml │ │ ├── layout_animations_by_default.xml │ │ ├── layout_animations_hideshow.xml │ │ ├── linear_layout_1.xml │ │ ├── linear_layout_10.xml │ │ ├── linear_layout_2.xml │ │ ├── linear_layout_3.xml │ │ ├── linear_layout_4.xml │ │ ├── linear_layout_5.xml │ │ ├── linear_layout_6.xml │ │ ├── linear_layout_7.xml │ │ ├── linear_layout_8.xml │ │ ├── linear_layout_9.xml │ │ ├── link.xml │ │ ├── list_12.xml │ │ ├── list_13.xml │ │ ├── list_7.xml │ │ ├── list_8.xml │ │ ├── list_item_checkbox.xml │ │ ├── list_item_icon_text.xml │ │ ├── list_position.xml │ │ ├── local_sample.xml │ │ ├── local_service_binding.xml │ │ ├── local_service_controller.xml │ │ ├── log_text_box_1.xml │ │ ├── mapview.xml │ │ ├── marquee.xml │ │ ├── media_projection.xml │ │ ├── mediaplayer_1.xml │ │ ├── mediaplayer_2.xml │ │ ├── messenger_service_binding.xml │ │ ├── mms_demo.xml │ │ ├── morse_code.xml │ │ ├── motogp_stat_item.xml │ │ ├── notify_with_text.xml │ │ ├── notifying_controller.xml │ │ ├── overscan_activity.xml │ │ ├── path_animations.xml │ │ ├── pick_contact.xml │ │ ├── popup_menu_1.xml │ │ ├── preference_widget_mypreference.xml │ │ ├── presentation_activity.xml │ │ ├── presentation_content.xml │ │ ├── presentation_list_item.xml │ │ ├── presentation_with_media_router_activity.xml │ │ ├── presentation_with_media_router_content.xml │ │ ├── print_bitmap.xml │ │ ├── print_html_from_screen.xml │ │ ├── print_html_off_screen.xml │ │ ├── process_text_main.xml │ │ ├── process_text_send.xml │ │ ├── progressbar_1.xml │ │ ├── progressbar_2.xml │ │ ├── progressbar_3.xml │ │ ├── progressbar_4.xml │ │ ├── quick_contacts.xml │ │ ├── radio_group_1.xml │ │ ├── ratingbar_1.xml │ │ ├── read_asset.xml │ │ ├── receive_result.xml │ │ ├── redirect_enter.xml │ │ ├── redirect_getter.xml │ │ ├── redirect_main.xml │ │ ├── relative_layout_1.xml │ │ ├── relative_layout_2.xml │ │ ├── remote_binding_options.xml │ │ ├── remote_service_binding.xml │ │ ├── remote_service_controller.xml │ │ ├── reorder_four.xml │ │ ├── reorder_on_launch.xml │ │ ├── reorder_three.xml │ │ ├── reorder_two.xml │ │ ├── resources.xml │ │ ├── resources_height.xml │ │ ├── resources_layout_reference.xml │ │ ├── resources_layout_reference_tablet.xml │ │ ├── resources_smallest_width.xml │ │ ├── resources_smallest_width_inner.xml │ │ ├── resources_smallest_width_row.xml │ │ ├── resources_width.xml │ │ ├── resources_width_and_height.xml │ │ ├── rotating_list.xml │ │ ├── rotating_view.xml │ │ ├── rotation_animation.xml │ │ ├── save_restore_state.xml │ │ ├── screen_orientation.xml │ │ ├── scroll_view_1.xml │ │ ├── scroll_view_2.xml │ │ ├── scrollbar1.xml │ │ ├── scrollbar2.xml │ │ ├── scrollbar3.xml │ │ ├── search_invoke.xml │ │ ├── search_query_results.xml │ │ ├── search_view.xml │ │ ├── searchview_actionbar.xml │ │ ├── searchview_filter.xml │ │ ├── secure_dialog_activity.xml │ │ ├── secure_surface_view_activity.xml │ │ ├── secure_view.xml │ │ ├── secure_view_overlay.xml │ │ ├── secure_window_activity.xml │ │ ├── seekbar_1.xml │ │ ├── select_dialog.xml │ │ ├── send_result.xml │ │ ├── service_start_arguments_controller.xml │ │ ├── shadow_card_drag.xml │ │ ├── shadow_card_stack.xml │ │ ├── shape_drawable_1.xml │ │ ├── share_content.xml │ │ ├── simple_list_item_checkable_1.xml │ │ ├── sms_demo.xml │ │ ├── soft_input_modes.xml │ │ ├── spinner_1.xml │ │ ├── split_touch_view.xml │ │ ├── status_bar_balloon.xml │ │ ├── status_bar_notifications.xml │ │ ├── styled_text.xml │ │ ├── surface_view_overlay.xml │ │ ├── switches.xml │ │ ├── system_ui_modes.xml │ │ ├── table_layout_1.xml │ │ ├── table_layout_10.xml │ │ ├── table_layout_11.xml │ │ ├── table_layout_12.xml │ │ ├── table_layout_2.xml │ │ ├── table_layout_3.xml │ │ ├── table_layout_4.xml │ │ ├── table_layout_5.xml │ │ ├── table_layout_6.xml │ │ ├── table_layout_7.xml │ │ ├── table_layout_8.xml │ │ ├── table_layout_9.xml │ │ ├── tabs1.xml │ │ ├── tabs_right_gravity.xml │ │ ├── tabs_scroll.xml │ │ ├── tasklist_main.xml │ │ ├── tasklist_row.xml │ │ ├── text_switcher_1.xml │ │ ├── text_to_speech.xml │ │ ├── text_undo.xml │ │ ├── text_view_demo.xml │ │ ├── textclock.xml │ │ ├── transition.xml │ │ ├── transition_scene1.xml │ │ ├── transition_scene2.xml │ │ ├── transition_scene3.xml │ │ ├── translucent_background.xml │ │ ├── translucent_bars.xml │ │ ├── trigger_sensors.xml │ │ ├── video_player.xml │ │ ├── videoview.xml │ │ ├── visibility_1.xml │ │ ├── voice_recognition.xml │ │ ├── wallpaper_2.xml │ │ ├── webview_1.xml │ │ └── window_focus_observer.xml │ ├── menu │ │ ├── action_bar_settings_action_provider.xml │ │ ├── action_bar_share_action_provider.xml │ │ ├── actions.xml │ │ ├── camera_menu.xml │ │ ├── category_order.xml │ │ ├── checkable.xml │ │ ├── content_actions.xml │ │ ├── disabled.xml │ │ ├── display_options_actions.xml │ │ ├── groups.xml │ │ ├── list_select_menu.xml │ │ ├── order.xml │ │ ├── popup.xml │ │ ├── presentation_with_media_router_menu.xml │ │ ├── print_custom_content.xml │ │ ├── searchview_in_menu.xml │ │ ├── shortcuts.xml │ │ ├── submenu.xml │ │ ├── title_icon.xml │ │ ├── title_only.xml │ │ └── visible.xml │ ├── raw │ │ ├── android_logo.png │ │ ├── androids.pkm │ │ ├── motogp_stats.html │ │ ├── robot.png │ │ ├── skycubemap0.jpg │ │ ├── skycubemap1.jpg │ │ ├── skycubemap2.jpg │ │ ├── skycubemap3.jpg │ │ ├── skycubemap4.jpg │ │ ├── skycubemap5.jpg │ │ ├── sound_ringer_normal.ogg │ │ ├── sound_ringer_silent.ogg │ │ ├── sound_ringer_vibrate.ogg │ │ ├── sound_screen_off.ogg │ │ ├── sound_screen_on.ogg │ │ ├── sound_view_clicked.ogg │ │ ├── sound_view_focused_or_selected.ogg │ │ ├── sound_view_hover_enter.ogg │ │ ├── sound_window_state_changed.ogg │ │ ├── test_cbr.mp3 │ │ └── videoviewdemo.mp4 │ ├── transition │ │ ├── activity_transition_mgr.xml │ │ ├── changebounds.xml │ │ ├── changebounds_fadein_together.xml │ │ ├── changebounds_fadeout_sequential.xml │ │ ├── explode.xml │ │ ├── explode_move_together.xml │ │ ├── move_image.xml │ │ └── transitions_mgr.xml │ ├── values-hdpi │ │ └── strings.xml │ ├── values-land │ │ └── integers.xml │ ├── values-ldpi │ │ └── strings.xml │ ├── values-mdpi │ │ └── strings.xml │ ├── values-sw600dp │ │ └── layout.xml │ ├── values-v11 │ │ ├── bools.xml │ │ └── styles.xml │ ├── values-v13 │ │ └── bools.xml │ ├── values-v14 │ │ ├── bools.xml │ │ └── styles.xml │ ├── values-v16 │ │ └── bools.xml │ ├── values-v17 │ │ └── bools.xml │ ├── values-v18 │ │ └── bools.xml │ ├── values-v19 │ │ ├── bools.xml │ │ └── styles.xml │ ├── values-v20 │ │ ├── bools.xml │ │ └── styles.xml │ ├── values-xhdpi │ │ └── strings.xml │ ├── values-xlarge │ │ └── layout.xml │ ├── values-zh-rCN │ │ └── strings.xml │ ├── values │ │ ├── arrays.xml │ │ ├── attrs.xml │ │ ├── bools.xml │ │ ├── colors.xml │ │ ├── ids.xml │ │ ├── integers.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── xml │ │ ├── advanced_preferences.xml │ │ ├── appwidget_provider.xml │ │ ├── default_values.xml │ │ ├── device_admin_encryption.xml │ │ ├── device_admin_expiration.xml │ │ ├── device_admin_general.xml │ │ ├── device_admin_headers.xml │ │ ├── device_admin_lock_wipe.xml │ │ ├── device_admin_quality.xml │ │ ├── device_admin_sample.xml │ │ ├── filter_nfc.xml │ │ ├── fragmented_preferences.xml │ │ ├── fragmented_preferences_inner.xml │ │ ├── preference_dependencies.xml │ │ ├── preference_headers.xml │ │ ├── preference_switch.xml │ │ ├── preferences.xml │ │ ├── searchable.xml │ │ └── taskbackconfig.xml │ └── resources │ └── com │ └── example │ └── android │ └── apis │ ├── _package.html │ ├── accessibility │ └── _index.html │ ├── animation │ └── _index.html │ ├── app │ ├── _index.html │ └── _package.html │ ├── content │ └── _index.html │ ├── graphics │ └── _index.html │ ├── text │ └── _index.html │ └── view │ ├── _index.html │ └── _package.html ├── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── module_android_api_demos.xml ├── pic ├── Screenshot_2016-12-17-14-02-32-682_com.example.an.png ├── Screenshot_2016-12-17-14-10-49-075_com.example.an.png ├── Screenshot_2016-12-17-14-19-57-433_com.example.an.png ├── Screenshot_2016-12-17-14-21-16-764_com.example.an.png ├── Screenshot_2016-12-17-14-25-20-505_com.example.an.png ├── Screenshot_2016-12-17-14-29-50-183_com.example.an.png ├── Screenshot_2016-12-17-14-30-59-243_com.example.an.png ├── Screenshot_2016-12-17-14-32-20-875_com.example.an.png ├── Screenshot_2016-12-17-14-35-29-320_com.example.an.png ├── Screenshot_2016-12-17-14-36-26-413_com.example.an.png ├── Screenshot_2016-12-17-14-36-45-074_com.example.an.png └── Screenshot_2016-12-17-14-36-49-383_com.example.an.png ├── project.properties └── settings.gradle /android_api_demos.properties: -------------------------------------------------------------------------------- 1 | path.variable.maven_repository=C\:\\Users\\18071\\.m2\\repository 2 | jdk.home.android_api_23_platform=D\:/software/Androidsdk 3 | jdk.home.1.8=C\:/software/AndroidStudio/jre 4 | javac2.instrumentation.includeJavaRuntime=false -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Android template 3 | # Built application files 4 | *.apk 5 | *.ap_ 6 | 7 | # Files for the ART/Dalvik VM 8 | *.dex 9 | 10 | # Java class files 11 | *.class 12 | 13 | # Generated files 14 | bin/ 15 | gen/ 16 | out/ 17 | 18 | # Gradle files 19 | .gradle/ 20 | build/ 21 | 22 | # Local configuration file (sdk path, etc) 23 | local.properties 24 | 25 | # Proguard folder generated by Eclipse 26 | proguard/ 27 | 28 | # Log Files 29 | *.log 30 | 31 | # Android Studio Navigation editor temp files 32 | .navigation/ 33 | 34 | # Android Studio captures folder 35 | captures/ 36 | 37 | # Intellij 38 | *.iml 39 | .idea/workspace.xml 40 | 41 | # Keystore files 42 | *.jks 43 | 44 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | android { 3 | compileSdkVersion 23 4 | buildToolsVersion "23.0.3" 5 | 6 | defaultConfig { 7 | applicationId "com.example.android.apis" 8 | minSdkVersion 16 9 | targetSdkVersion 23 10 | testApplicationId "com.example.android.apis.tests" 11 | testInstrumentationRunner "android.test.InstrumentationTestRunner" 12 | } 13 | 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile 'com.android.support:support-v4:23.4.0' 24 | compile 'com.android.support:appcompat-v7:23.4.0' 25 | // 日志打印工具类 26 | compile 'com.github.orhanobut:logger:1.12' 27 | 28 | } -------------------------------------------------------------------------------- /app/src/main/aidl/com/example/android/apis/app/IRemoteServiceCallback.aidl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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.app; 18 | 19 | /** 20 | * Example of a callback interface used by IRemoteService to send 21 | * synchronous notifications back to its clients. Note that this is a 22 | * one-way interface so the server does not block waiting for the client. 23 | */ 24 | oneway interface IRemoteServiceCallback { 25 | /** 26 | * Called when the service has a new value for you. 27 | */ 28 | void valueChanged(int value); 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/assets/fonts/samplefont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiubiteme/android_api_demos/49adc818da9cc329b348021703786fd9fd4ea030/app/src/main/assets/fonts/samplefont.ttf -------------------------------------------------------------------------------- /app/src/main/assets/read_asset.txt: -------------------------------------------------------------------------------- 1 | 这个文本存储在一个原始资产。 2 | 3 | 被读取并放入的TextView这里。 4 | This text is stored in a raw Asset. 5 | 6 | It was read and placed into the TextView here. 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/app/DoNothing.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 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.app; 18 | 19 | import android.content.BroadcastReceiver; 20 | import android.content.Context; 21 | import android.content.Intent; 22 | 23 | public class DoNothing extends BroadcastReceiver { 24 | @Override 25 | public void onReceive(Context context, Intent intent) { 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/app/IsolatedService2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 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.app; 18 | 19 | /** 20 | * Stub to be able to have another instance of IsolatedService running. 21 | */ 22 | public class IsolatedService2 extends IsolatedService { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/app/SearchInvoke.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiubiteme/android_api_demos/49adc818da9cc329b348021703786fd9fd4ea030/app/src/main/java/com/example/android/apis/app/SearchInvoke.java -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/content/ProcessTextLauncher.java: -------------------------------------------------------------------------------- 1 | package com.example.android.apis.content; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.view.Menu; 6 | 7 | //Need the following import to get access to the app resources, since this 8 | //class is in a sub-package. 9 | import com.example.android.apis.R; 10 | 11 | public class ProcessTextLauncher extends Activity { 12 | 13 | @Override 14 | protected void onCreate(Bundle savedInstanceState) { 15 | super.onCreate(savedInstanceState); 16 | setContentView(R.layout.process_text_send); 17 | } 18 | 19 | @Override 20 | public boolean onCreateOptionsMenu(Menu menu) { 21 | return false; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/graphics/GradientDrawable1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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.graphics; 18 | 19 | // Need the following import to get access to the app resources, since this 20 | // class is in a sub-package. 21 | import com.example.android.apis.R; 22 | 23 | import android.os.Bundle; 24 | 25 | public class GradientDrawable1 extends GraphicsActivity { 26 | @Override 27 | protected void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | setContentView(R.layout.shape_drawable_1); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/os/HeadlessSmsSendService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 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.os; 18 | 19 | import android.app.Service; 20 | import android.content.Intent; 21 | import android.os.IBinder; 22 | 23 | /** 24 | * Dummy service to make sure this app can be default SMS app 25 | */ 26 | public class HeadlessSmsSendService extends Service { 27 | 28 | @Override 29 | public IBinder onBind(Intent intent) { 30 | return null; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/preference/PreferenceDependencies.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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.preference; 18 | 19 | import com.example.android.apis.R; 20 | 21 | import android.os.Bundle; 22 | import android.preference.PreferenceActivity; 23 | 24 | public class PreferenceDependencies extends PreferenceActivity { 25 | 26 | @Override 27 | protected void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | 30 | addPreferencesFromResource(R.xml.preference_dependencies); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/text/Marquee.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 Google Inc. 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.text; 18 | 19 | import com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | public class Marquee extends Activity { 25 | @Override 26 | protected void onCreate(Bundle savedInstanceState) { 27 | super.onCreate(savedInstanceState); 28 | 29 | setContentView(R.layout.marquee); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/Baseline1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | 25 | /** 26 | * Baseline alignment in LinearLayout. 27 | */ 28 | public class Baseline1 extends Activity { 29 | 30 | @Override 31 | protected void onCreate(Bundle savedInstanceState) { 32 | super.onCreate(savedInstanceState); 33 | setContentView(R.layout.baseline_1); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/Baseline2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | 25 | /** 26 | * Baseline alignment in LinearLayout with a BOTTOM gravity. 27 | */ 28 | public class Baseline2 extends Activity { 29 | 30 | @Override 31 | protected void onCreate(Bundle savedInstanceState) { 32 | super.onCreate(savedInstanceState); 33 | setContentView(R.layout.baseline_2); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/Baseline4.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | 25 | /** 26 | * Baseline alignment in LinearLayout with mixed gravities. 27 | */ 28 | public class Baseline4 extends Activity { 29 | 30 | @Override 31 | protected void onCreate(Bundle savedInstanceState) { 32 | super.onCreate(savedInstanceState); 33 | setContentView(R.layout.baseline_4); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/Baseline6.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | 25 | /** 26 | * Baseline alignment in RelativeLayout. 27 | */ 28 | public class Baseline6 extends Activity { 29 | 30 | @Override 31 | protected void onCreate(Bundle savedInstanceState) { 32 | super.onCreate(savedInstanceState); 33 | setContentView(R.layout.baseline_6); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/Baseline7.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | 25 | /** 26 | * Baseline alignment in RelativeLayout with various font weights. 27 | */ 28 | public class Baseline7 extends Activity { 29 | 30 | @Override 31 | protected void onCreate(Bundle savedInstanceState) { 32 | super.onCreate(savedInstanceState); 33 | setContentView(R.layout.baseline_7); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/Controls2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 | public class Controls2 extends Controls1 {} 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/Controls3.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 | public class Controls3 extends Controls1 {} 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/Controls4.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 | public class Controls4 extends Controls1 {} 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/Controls5.java: -------------------------------------------------------------------------------- 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 | public class Controls5 extends Controls1 {} 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/Controls6.java: -------------------------------------------------------------------------------- 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 | public class Controls6 extends Controls1 {} 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/Controls7.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 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 | public class Controls7 extends Controls1 {} 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/Controls8.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 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 | public class Controls8 extends Controls1 {} 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/Controls9.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 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 | public class Controls9 extends Controls1 {} 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/Focus2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | public class Focus2 extends Activity { 25 | 26 | @Override 27 | protected void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | 30 | setContentView(R.layout.focus_2); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/Focus5.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 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.app.Activity; 20 | import android.os.Bundle; 21 | import android.widget.Button; 22 | import com.example.android.apis.R; 23 | 24 | public class Focus5 extends Activity { 25 | @Override 26 | protected void onCreate(Bundle savedInstanceState) { 27 | super.onCreate(savedInstanceState); 28 | 29 | setContentView(R.layout.focus_5); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/GridLayout1.java: -------------------------------------------------------------------------------- 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.app.Activity; 20 | import android.os.Bundle; 21 | import com.example.android.apis.R; 22 | 23 | /** 24 | * Demonstrates using GridLayout to build the same "Simple Form" as in the 25 | * LinearLayout and RelativeLayout demos. 26 | */ 27 | public class GridLayout1 extends Activity { 28 | protected void onCreate(Bundle savedInstanceState) { 29 | super.onCreate(savedInstanceState); 30 | setContentView(R.layout.grid_layout_1); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/GridLayout2.java: -------------------------------------------------------------------------------- 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 com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | /** 25 | * A form, showing use of the GridLayout API from XML. 26 | */ 27 | public class GridLayout2 extends Activity { 28 | protected void onCreate(Bundle savedInstanceState) { 29 | super.onCreate(savedInstanceState); 30 | setContentView(R.layout.grid_layout_2); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/ImageButton1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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.app.Activity; 20 | import android.os.Bundle; 21 | 22 | 23 | import com.example.android.apis.R; 24 | 25 | 26 | public class ImageButton1 extends Activity { 27 | 28 | @Override 29 | public void onCreate(Bundle savedInstanceState) { 30 | super.onCreate(savedInstanceState); 31 | setContentView(R.layout.image_button_1); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/LayoutAnimation7.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | public class LayoutAnimation7 extends Activity { 25 | @Override 26 | protected void onCreate(Bundle savedInstanceState) { 27 | super.onCreate(savedInstanceState); 28 | 29 | setContentView(R.layout.layout_animation_7); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/ScrollBar1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | 25 | public class ScrollBar1 extends Activity { 26 | @Override 27 | protected void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | 30 | setContentView(R.layout.scrollbar1); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/ScrollBar2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | 25 | public class ScrollBar2 extends Activity { 26 | @Override 27 | protected void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | 30 | setContentView(R.layout.scrollbar2); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/SystemUIModesOverlay.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 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.os.Bundle; 20 | import android.view.Window; 21 | 22 | /** 23 | * Version of demo that uses the action bar in overlay mode. 24 | */ 25 | public class SystemUIModesOverlay extends SystemUIModes { 26 | @Override 27 | public void onCreate(Bundle savedInstanceState) { 28 | getWindow().requestFeature(Window.FEATURE_ACTION_BAR_OVERLAY); 29 | super.onCreate(savedInstanceState); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/TableLayout1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | 25 | public class TableLayout1 extends Activity { 26 | @Override 27 | protected void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | 30 | setContentView(R.layout.table_layout_1); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/TableLayout10.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | public class TableLayout10 extends Activity { 25 | @Override 26 | protected void onCreate(Bundle savedInstanceState) { 27 | super.onCreate(savedInstanceState); 28 | 29 | setContentView(R.layout.table_layout_10); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/TableLayout11.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | /** 25 | *
This example shows how to use horizontal gravity in a table layout.
26 | */ 27 | public class TableLayout11 extends Activity { 28 | @Override 29 | protected void onCreate(Bundle savedInstanceState) { 30 | super.onCreate(savedInstanceState); 31 | 32 | setContentView(R.layout.table_layout_11); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/TableLayout12.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | /** 25 | *This example shows how to use cell spanning in a table layout.
26 | */ 27 | public class TableLayout12 extends Activity { 28 | @Override 29 | protected void onCreate(Bundle savedInstanceState) { 30 | super.onCreate(savedInstanceState); 31 | 32 | setContentView(R.layout.table_layout_12); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/TableLayout2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | 25 | public class TableLayout2 extends Activity { 26 | @Override 27 | protected void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | 30 | setContentView(R.layout.table_layout_2); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/TableLayout3.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | 25 | public class TableLayout3 extends Activity { 26 | @Override 27 | protected void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | 30 | setContentView(R.layout.table_layout_3); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/TableLayout4.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | 25 | public class TableLayout4 extends Activity { 26 | @Override 27 | protected void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | 30 | setContentView(R.layout.table_layout_4); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/TableLayout5.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | 25 | public class TableLayout5 extends Activity { 26 | @Override 27 | protected void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | 30 | setContentView(R.layout.table_layout_5); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/TableLayout6.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 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 com.example.android.apis.R; 20 | 21 | import android.app.Activity; 22 | import android.os.Bundle; 23 | 24 | 25 | public class TableLayout6 extends Activity { 26 | @Override 27 | protected void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | 30 | setContentView(R.layout.table_layout_6); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/android/apis/view/Tabs4.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 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 | 20 | /** 21 | * 相同Tabs2。这种变化是在manifest文件中使用的主题。 22 | * Identical to Tabs2. The change is in the theme used in the manifest file. 23 | */ 24 | public class Tabs4 extends Tabs2 {} 25 | -------------------------------------------------------------------------------- /app/src/main/res/anim/animator.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 |14 | Examples of how to use the android platform APIs. See: 15 | 16 |
Linkify
5 | class, which converts URLs in a block of text into hyperlinks.