├── .github └── workflows │ └── copy-branch.yml ├── .gitignore ├── AutofillFramework ├── .google │ └── packaging.yaml ├── Application │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── android │ │ │ └── autofill │ │ │ └── app │ │ │ ├── BaseMainFragment.java │ │ │ ├── MainActivity.java │ │ │ ├── Util.java │ │ │ ├── WelcomeActivity.java │ │ │ ├── antipatterns │ │ │ ├── BadViewStructureCreationSignInActivity.java │ │ │ ├── CallbackLessAutoCompleteSignInActivity.java │ │ │ ├── HintlessSignInActivity.java │ │ │ ├── PasswordOnlyActivity.java │ │ │ └── UsernameOnlyActivity.java │ │ │ ├── commoncases │ │ │ ├── CommonCasesFragment.java │ │ │ ├── CreditCardCompoundViewActivity.java │ │ │ ├── CreditCardDatePickerActivity.java │ │ │ ├── CreditCardSpinnersActivity.java │ │ │ ├── EmailComposeActivity.java │ │ │ ├── RecyclerViewActivity.java │ │ │ ├── StandardAutoCompleteSignInActivity.java │ │ │ ├── StandardSignInActivity.java │ │ │ ├── VirtualSignInActivity.java │ │ │ └── WebViewSignInActivity.java │ │ │ ├── edgecases │ │ │ ├── AbstractMultipleStepsActivity.java │ │ │ ├── CreditCardActivity.java │ │ │ ├── CreditCardAntiPatternActivity.java │ │ │ ├── CustomThemeSignInActivity.java │ │ │ ├── EdgeCasesFragment.java │ │ │ ├── MultiplePartitionsActivity.java │ │ │ ├── MultipleStepsCreditCardActivity.java │ │ │ ├── MultipleStepsSignInActivity.java │ │ │ └── VirtualCompatModeSignInActivity.java │ │ │ └── view │ │ │ ├── autofillable │ │ │ ├── AbstractCustomVirtualView.java │ │ │ ├── CreditCardExpirationDateCompoundView.java │ │ │ ├── CreditCardExpirationDatePickerView.java │ │ │ ├── CustomVirtualView.java │ │ │ ├── CustomVirtualViewCompatMode.java │ │ │ └── ScrollableCustomVirtualView.java │ │ │ └── widget │ │ │ ├── InfoButton.java │ │ │ └── NavigationItem.java │ │ └── res │ │ ├── drawable-hdpi │ │ ├── ic_launcher.png │ │ └── tile.9.png │ │ ├── drawable-mdpi │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ │ ├── drawable-xxhdpi │ │ └── ic_launcher.png │ │ ├── drawable │ │ ├── custom_autofilled_highlight.xml │ │ ├── ic_autocomplete_logo_24dp.xml │ │ ├── ic_custom_virtual_logo_24dp.xml │ │ ├── ic_disabled_black_24dp.xml │ │ ├── ic_edittexts_logo_24dp.xml │ │ ├── ic_email_black_24dp.xml │ │ ├── ic_format_list_bulleted_black_24dp.xml │ │ ├── ic_info_black_24dp.xml │ │ ├── ic_person_black_24dp.xml │ │ ├── ic_send_white_24dp.xml │ │ ├── ic_spinners_logo_24dp.xml │ │ ├── ic_view_module_black_24dp.xml │ │ └── ic_web_black_24dp.xml │ │ ├── layout │ │ ├── activity_main.xml │ │ ├── cc_exp_date.xml │ │ ├── credit_card_activity.xml │ │ ├── credit_card_anti_pattern_activity.xml │ │ ├── credit_card_compound_view_activity.xml │ │ ├── credit_card_date_picker_activity.xml │ │ ├── credit_card_spinners_activity.xml │ │ ├── email_compose_activity.xml │ │ ├── fragment_common_cases.xml │ │ ├── fragment_edge_cases.xml │ │ ├── hintless_login_activity.xml │ │ ├── login_activity.xml │ │ ├── login_webview_activity.xml │ │ ├── login_with_autocomplete_activity.xml │ │ ├── multiple_partitions_activity.xml │ │ ├── multiple_steps_activity.xml │ │ ├── navigation_button.xml │ │ ├── navigation_item.xml │ │ ├── password_only_activity.xml │ │ ├── recycler_view_activity.xml │ │ ├── user_data_field.xml │ │ ├── username_only_activity.xml │ │ ├── virtual_compat_mode_login_activity.xml │ │ ├── virtual_login_activity.xml │ │ └── welcome_activity.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ ├── raw │ │ └── sample_form.html │ │ └── values │ │ ├── attrs.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml ├── README.md ├── afservice │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── android │ │ │ └── autofill │ │ │ └── service │ │ │ ├── data │ │ │ └── source │ │ │ │ └── local │ │ │ │ ├── AutofillDaoTest.java │ │ │ │ └── LocalDataSourceTest.java │ │ │ └── util │ │ │ └── SingleExecutors.java │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── android │ │ │ └── autofill │ │ │ └── service │ │ │ ├── AuthActivity.java │ │ │ ├── AutofillHintProperties.java │ │ │ ├── AutofillHints.java │ │ │ ├── ClientParser.java │ │ │ ├── FakeFieldGenerator.java │ │ │ ├── ManualActivity.java │ │ │ ├── ManualFieldPickerActivity.java │ │ │ ├── MyAutofillService.java │ │ │ ├── RemoteViewsHelper.java │ │ │ ├── W3cHints.java │ │ │ ├── data │ │ │ ├── AutofillDataBuilder.java │ │ │ ├── ClientAutofillDataBuilder.java │ │ │ ├── ClientViewMetadata.java │ │ │ ├── ClientViewMetadataBuilder.java │ │ │ ├── DataCallback.java │ │ │ ├── FakeAutofillDataBuilder.java │ │ │ ├── adapter │ │ │ │ ├── DatasetAdapter.java │ │ │ │ └── ResponseAdapter.java │ │ │ └── source │ │ │ │ ├── AutofillDataSource.java │ │ │ │ ├── DalService.java │ │ │ │ ├── DefaultFieldTypesSource.java │ │ │ │ ├── DigitalAssetLinksDataSource.java │ │ │ │ ├── PackageVerificationDataSource.java │ │ │ │ └── local │ │ │ │ ├── DefaultFieldTypesLocalJsonSource.java │ │ │ │ ├── DigitalAssetLinksRepository.java │ │ │ │ ├── LocalAutofillDataSource.java │ │ │ │ ├── SharedPrefsPackageVerificationRepository.java │ │ │ │ ├── dao │ │ │ │ └── AutofillDao.java │ │ │ │ └── db │ │ │ │ ├── AutofillDatabase.java │ │ │ │ └── Converters.java │ │ │ ├── model │ │ │ ├── AutofillDataset.java │ │ │ ├── AutofillHint.java │ │ │ ├── DalCheck.java │ │ │ ├── DalInfo.java │ │ │ ├── DatasetWithFilledAutofillFields.java │ │ │ ├── DefaultFieldTypeWithHints.java │ │ │ ├── FakeData.java │ │ │ ├── FieldType.java │ │ │ ├── FieldTypeWithHeuristics.java │ │ │ ├── FilledAutofillField.java │ │ │ └── ResourceIdHeuristic.java │ │ │ ├── settings │ │ │ ├── MyPreferences.java │ │ │ └── SettingsActivity.java │ │ │ ├── simple │ │ │ ├── BasicService.java │ │ │ ├── DebugService.java │ │ │ ├── HeuristicsService.java │ │ │ ├── MultiStepsService.java │ │ │ └── SimpleAuthActivity.java │ │ │ └── util │ │ │ ├── AppExecutors.java │ │ │ ├── SecurityHelper.java │ │ │ └── Util.java │ │ └── res │ │ ├── drawable-v24 │ │ ├── ic_add_black_24dp.xml │ │ ├── ic_delete_forever_black_24dp.xml │ │ ├── ic_lock_black_24dp.xml │ │ └── ic_person_black_24dp.xml │ │ ├── drawable │ │ └── list_divider.xml │ │ ├── layout │ │ ├── activity_field_picker.xml │ │ ├── dataset_field.xml │ │ ├── dataset_suggestion.xml │ │ ├── multidataset_service_auth_activity.xml │ │ ├── multidataset_service_list_item.xml │ │ ├── multidataset_service_manual_activity.xml │ │ ├── multidataset_service_settings_activity.xml │ │ ├── multidataset_service_settings_add_data_dialog.xml │ │ ├── multidataset_service_settings_authentication_dialog.xml │ │ └── simple_service_auth_activity.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ ├── raw │ │ └── default_field_types │ │ ├── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ ├── debug_service.xml │ │ └── multidataset_service.xml ├── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── screenshots │ ├── 10_AuthNeeded.png │ ├── 11_AuthActivity.png │ ├── 1_MainPage.png │ ├── 2_SampleLoginEditTexts.png │ ├── 3_SampleLoginEditTextsAutofilled.png │ ├── 4_WelcomeActivity.png │ ├── 5_SampleLoginCustomVirtualView.png │ ├── 6_SampleLoginCustomVirtualViewAutofilled.png │ ├── 7_SampleCheckOutSpinnersAutofillable.png │ ├── 8_SampleCheckOutSpinnersAutofilled.png │ ├── 9_SettingsActivity.png │ └── icon-web.png └── settings.gradle ├── AutofillFrameworkKotlin ├── .google │ └── packaging.yaml ├── Application │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── android │ │ │ └── autofillframework │ │ │ ├── CommonUtil.kt │ │ │ ├── app │ │ │ ├── CreditCardActivity.kt │ │ │ ├── CreditCardCompoundViewActivity.kt │ │ │ ├── CreditCardExpirationDateView.kt │ │ │ ├── CustomVirtualView.kt │ │ │ ├── EmailComposeActivity.kt │ │ │ ├── InfoButton.kt │ │ │ ├── MainActivity.kt │ │ │ ├── NavigationItem.kt │ │ │ ├── StandardAutoCompleteSignInActivity.kt │ │ │ ├── StandardSignInActivity.kt │ │ │ ├── VirtualSignInActivity.kt │ │ │ └── WelcomeActivity.kt │ │ │ └── multidatasetservice │ │ │ ├── AuthActivity.kt │ │ │ ├── AutofillFieldMetadata.kt │ │ │ ├── AutofillFieldMetadataCollection.kt │ │ │ ├── AutofillHelper.kt │ │ │ ├── MyAutofillService.kt │ │ │ ├── PackageVerifier.kt │ │ │ ├── StructureParser.kt │ │ │ ├── datasource │ │ │ ├── AutofillRepository.kt │ │ │ └── SharedPrefsAutofillRepository.kt │ │ │ ├── model │ │ │ ├── FilledAutofillField.kt │ │ │ └── FilledAutofillFieldCollection.kt │ │ │ └── settings │ │ │ ├── MyPreferences.kt │ │ │ └── SettingsActivity.kt │ │ └── res │ │ ├── drawable-hdpi │ │ ├── ic_launcher.png │ │ └── tile.9.png │ │ ├── drawable-mdpi │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ │ ├── drawable-xxhdpi │ │ └── ic_launcher.png │ │ ├── drawable │ │ ├── ic_autocomplete_logo_24dp.xml │ │ ├── ic_custom_virtual_logo_24dp.xml │ │ ├── ic_delete_forever_black_24dp.xml │ │ ├── ic_edittexts_logo_24dp.xml │ │ ├── ic_email_black_24dp.xml │ │ ├── ic_info_black_24dp.xml │ │ ├── ic_lock_black_24dp.xml │ │ ├── ic_person_black_24dp.xml │ │ ├── ic_send_white_24dp.xml │ │ ├── ic_spinners_logo_24dp.xml │ │ └── ic_view_module_black_24dp.xml │ │ ├── layout │ │ ├── activity_main.xml │ │ ├── cc_exp_date.xml │ │ ├── credit_card_activity.xml │ │ ├── credit_card_compound_view_activity.xml │ │ ├── email_compose_activity.xml │ │ ├── login_activity.xml │ │ ├── login_with_autocomplete_activity.xml │ │ ├── multidataset_service_auth_activity.xml │ │ ├── multidataset_service_list_item.xml │ │ ├── multidataset_service_settings_activity.xml │ │ ├── multidataset_service_settings_authentication_dialog.xml │ │ ├── navigation_button.xml │ │ ├── navigation_item.xml │ │ ├── virtual_login_activity.xml │ │ └── welcome_activity.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ ├── values │ │ ├── attrs.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ └── multidataset_service.xml ├── README.md ├── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── screenshots │ ├── 10_AuthNeeded.png │ ├── 11_AuthActivity.png │ ├── 1_MainPage.png │ ├── 2_SampleLoginEditTexts.png │ ├── 3_SampleLoginEditTextsAutofilled.png │ ├── 4_WelcomeActivity.png │ ├── 5_SampleLoginCustomVirtualView.png │ ├── 6_SampleLoginCustomVirtualViewAutofilled.png │ ├── 7_SampleCheckOutSpinnersAutofillable.png │ ├── 8_SampleCheckOutSpinnersAutofilled.png │ ├── 9_SettingsActivity.png │ └── icon-web.png └── settings.gradle ├── BasicGestureDetect ├── .google │ └── packaging.yaml ├── Application │ ├── build.gradle │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── android │ │ │ │ ├── basicgesturedetect │ │ │ │ ├── BasicGestureDetectFragment.java │ │ │ │ ├── GestureListener.java │ │ │ │ └── MainActivity.java │ │ │ │ └── common │ │ │ │ ├── activities │ │ │ │ └── SampleActivityBase.java │ │ │ │ └── logger │ │ │ │ ├── Log.java │ │ │ │ ├── LogFragment.java │ │ │ │ ├── LogNode.java │ │ │ │ ├── LogView.java │ │ │ │ ├── LogWrapper.java │ │ │ │ └── MessageOnlyLogFilter.java │ │ │ └── res │ │ │ ├── drawable-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── tile.9.png │ │ │ ├── drawable-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── layout-sw600dp-land │ │ │ └── activity_main.xml │ │ │ ├── layout-sw600dp │ │ │ └── activity_main.xml │ │ │ ├── layout │ │ │ └── activity_main.xml │ │ │ ├── menu │ │ │ └── main.xml │ │ │ ├── values-sw600dp │ │ │ ├── template-dimens.xml │ │ │ └── template-styles.xml │ │ │ ├── values-v11 │ │ │ └── template-styles.xml │ │ │ ├── values-v21 │ │ │ ├── base-colors.xml │ │ │ └── base-template-styles.xml │ │ │ └── values │ │ │ ├── base-strings.xml │ │ │ ├── strings.xml │ │ │ ├── template-dimens.xml │ │ │ └── template-styles.xml │ └── tests │ │ ├── AndroidManifest.xml │ │ └── src │ │ └── com │ │ └── example │ │ └── android │ │ └── basicgesturedetect │ │ └── tests │ │ └── SampleTests.java ├── README.md ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── screenshots │ ├── 1-main.png │ └── icon-web.png └── settings.gradle ├── BasicMultitouch ├── .google │ └── packaging.yaml ├── Application │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── android │ │ │ ├── basicmultitouch │ │ │ ├── MainActivity.java │ │ │ ├── Pools.java │ │ │ └── TouchDisplayView.java │ │ │ └── common │ │ │ └── logger │ │ │ ├── Log.java │ │ │ ├── LogFragment.java │ │ │ ├── LogNode.java │ │ │ ├── LogView.java │ │ │ ├── LogWrapper.java │ │ │ └── MessageOnlyLogFilter.java │ │ └── res │ │ ├── drawable-hdpi │ │ ├── ic_launcher.png │ │ └── tile.9.png │ │ ├── drawable-mdpi │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ │ ├── drawable-xxhdpi │ │ └── ic_launcher.png │ │ ├── layout │ │ └── layout_mainactivity.xml │ │ ├── values-sw600dp │ │ ├── template-dimens.xml │ │ └── template-styles.xml │ │ ├── values-v11 │ │ ├── styles.xml │ │ └── template-styles.xml │ │ ├── values-v14 │ │ └── styles.xml │ │ ├── values-v21 │ │ ├── base-colors.xml │ │ └── base-template-styles.xml │ │ └── values │ │ ├── base-strings.xml │ │ ├── strings.xml │ │ ├── styles.xml │ │ ├── template-dimens.xml │ │ └── template-styles.xml ├── README.md ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── screenshots │ ├── icon-web.png │ ├── intro.png │ └── touches.png └── settings.gradle ├── CONTRIBUTING.md ├── CommitContentSampleApp ├── .google │ └── packaging.yaml ├── README.md ├── app │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── android │ │ │ └── commitcontent │ │ │ └── app │ │ │ └── MainActivity.java │ │ └── res │ │ ├── layout │ │ └── commit_content.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── screenshots │ ├── icon-web.png │ └── screenshot1.png └── settings.gradle ├── CommitContentSampleIME ├── .google │ └── packaging.yaml ├── README.md ├── app │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── android │ │ │ └── commitcontent │ │ │ └── ime │ │ │ └── ImageKeyboard.java │ │ └── res │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── raw │ │ ├── animated_gif.gif │ │ ├── animated_webp.webp │ │ └── dessert_android.png │ │ ├── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ ├── file_paths.xml │ │ └── method.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── screenshots │ ├── icon-web.png │ └── screenshot1.png └── settings.gradle ├── LICENSE ├── README.md └── StylusLowLatency ├── .gitignore ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ ├── AndroidManifest.xml │ └── java │ │ └── com │ │ └── example │ │ └── lowlatencysample │ │ ├── CanvasDrawingComposeTest.kt │ │ ├── CanvasDrawingEspressoTest.kt │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ ├── RobotoMono-Medium.ttf │ │ └── index.html │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── lowlatencysample │ │ │ ├── DrawingManager.kt │ │ │ ├── brush │ │ │ ├── BitmapGLBrushRenderer.kt │ │ │ ├── Brush.kt │ │ │ ├── CanvasBitmapBrush.kt │ │ │ ├── CanvasSimpleBrush.kt │ │ │ └── LineGLBrushRenderer.kt │ │ │ ├── data │ │ │ ├── CollisionHelper.kt │ │ │ └── SampleInkViewModel.kt │ │ │ ├── mlkit │ │ │ └── RecognitionHelper.kt │ │ │ └── ui │ │ │ ├── CanvasLowLatencyRenderer.kt │ │ │ ├── CanvasRegularView.kt │ │ │ ├── GLLowLatencyRenderer.kt │ │ │ ├── GLLowLatencySurfaceView.kt │ │ │ ├── SampleInkViewActivity.kt │ │ │ ├── SurfaceScissor.kt │ │ │ ├── TestActivity.kt │ │ │ └── WriteToCustomView.kt │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ ├── ic_launcher_background.xml │ │ ├── round_brush.png │ │ └── spray_brush.png │ │ ├── menu │ │ └── copy_paste.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_adaptive_back.png │ │ └── ic_launcher_adaptive_fore.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_adaptive_back.png │ │ └── ic_launcher_adaptive_fore.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_adaptive_back.png │ │ └── ic_launcher_adaptive_fore.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_adaptive_back.png │ │ └── ic_launcher_adaptive_fore.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_adaptive_back.png │ │ └── ic_launcher_adaptive_fore.png │ │ ├── values-night │ │ └── themes.xml │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── themes.xml │ └── test │ └── java │ └── com │ └── example │ └── lowlatencysample │ ├── Collection_toFloatArray.kt │ ├── CollisionTest.kt │ ├── ColorTest.kt │ └── LetterTest.kt ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.github/workflows/copy-branch.yml: -------------------------------------------------------------------------------- 1 | # Duplicates default main branch to the old master branch 2 | 3 | name: Duplicates main to old master branch 4 | 5 | # Controls when the action will run. Triggers the workflow on push or pull request 6 | # events but only for the main branch 7 | on: 8 | push: 9 | branches: [ main ] 10 | 11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "copy-branch" 14 | copy-branch: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it, 21 | # but specifies master branch (old default). 22 | - uses: actions/checkout@v2 23 | with: 24 | fetch-depth: 0 25 | ref: master 26 | 27 | - run: | 28 | git config user.name github-actions 29 | git config user.email github-actions@github.com 30 | git merge origin/main 31 | git push 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # built application files 2 | *.apk 3 | *.ap_ 4 | *.aab 5 | 6 | # Mac files 7 | .DS_Store 8 | 9 | # files for the dex VM 10 | *.dex 11 | 12 | # Java class files 13 | *.class 14 | 15 | # generated files 16 | bin/ 17 | gen/ 18 | 19 | # Ignore gradle files 20 | .gradle/ 21 | build/ 22 | 23 | # Local configuration file (sdk path, etc) 24 | local.properties 25 | 26 | # Proguard folder generated by Eclipse 27 | proguard/ 28 | proguard-project.txt 29 | 30 | # Eclipse files 31 | .project 32 | .classpath 33 | .settings/ 34 | 35 | # Android Studio/IDEA 36 | *.iml 37 | .idea 38 | -------------------------------------------------------------------------------- /AutofillFramework/.google/packaging.yaml: -------------------------------------------------------------------------------- 1 | 2 | # GOOGLE SAMPLE PACKAGING DATA 3 | # 4 | # This file is used by Google as part of our samples packaging process. 5 | # End users may safely ignore this file. It has no relevance to other systems. 6 | --- 7 | status: PUBLISHED 8 | technologies: [Android] 9 | categories: [Input] 10 | languages: [Java] 11 | solutions: [Mobile] 12 | github: android/input 13 | level: ADVANCED 14 | icon: screenshots/icon-web.png 15 | apiRefs: 16 | - android:android.view.View 17 | - android:android.service.autofill.AutoFillService 18 | - android:android.view.autofill.AutoFillManager 19 | license: apache2 20 | -------------------------------------------------------------------------------- /AutofillFramework/Application/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | // The sample build uses multiple directories to 4 | // keep boilerplate and common code separate from 5 | // the main sample code. 6 | List dirs = [ 7 | 'main'] // main sample code; look here for the interesting stuff. 8 | 9 | android { 10 | compileSdkVersion 28 11 | 12 | defaultConfig { 13 | minSdkVersion 26 14 | targetSdkVersion 28 15 | } 16 | 17 | compileOptions { 18 | sourceCompatibility JavaVersion.VERSION_1_8 19 | targetCompatibility JavaVersion.VERSION_1_8 20 | } 21 | 22 | sourceSets { 23 | main { 24 | dirs.each { dir -> 25 | java.srcDirs "src/${dir}/java" 26 | res.srcDirs "src/${dir}/res" 27 | } 28 | } 29 | androidTest.setRoot('tests') 30 | androidTest.java.srcDirs = ['tests/src'] 31 | } 32 | 33 | compileOptions { 34 | sourceCompatibility JavaVersion.VERSION_1_8 35 | targetCompatibility JavaVersion.VERSION_1_8 36 | } 37 | } 38 | 39 | dependencies { 40 | implementation "com.android.support:support-v4:28.0.0-alpha1" 41 | implementation "com.android.support:support-v13:28.0.0-alpha1" 42 | implementation "com.android.support:cardview-v7:28.0.0-alpha1" 43 | implementation "com.android.support:appcompat-v7:28.0.0-alpha1" 44 | implementation 'com.android.support:design:28.0.0-alpha1' 45 | implementation 'com.android.support.constraint:constraint-layout:1.0.2' 46 | implementation group: 'com.google.guava', name: 'guava', version: '22.0-android' 47 | } 48 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/java/com/example/android/autofill/app/BaseMainFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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.autofill.app; 18 | 19 | import android.support.annotation.StringRes; 20 | import android.support.v4.app.Fragment; 21 | 22 | public abstract class BaseMainFragment extends Fragment { 23 | public abstract @StringRes int getPageTitleResId(); 24 | } 25 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/java/com/example/android/autofill/app/antipatterns/HintlessSignInActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 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 | package com.example.android.autofill.app.antipatterns; 17 | 18 | import com.example.android.autofill.app.commoncases.StandardSignInActivity; 19 | import com.example.android.autofill.app.R; 20 | 21 | public class HintlessSignInActivity extends StandardSignInActivity { 22 | 23 | @Override 24 | protected int getContentView() { 25 | return R.layout.hintless_login_activity; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/java/com/example/android/autofill/app/commoncases/CommonCasesFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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.autofill.app.commoncases; 18 | 19 | import android.os.Bundle; 20 | import android.support.annotation.Nullable; 21 | import android.view.LayoutInflater; 22 | import android.view.View; 23 | import android.view.ViewGroup; 24 | 25 | import com.example.android.autofill.app.BaseMainFragment; 26 | import com.example.android.autofill.app.R; 27 | 28 | public class CommonCasesFragment extends BaseMainFragment { 29 | @Nullable 30 | @Override 31 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { 32 | return inflater.inflate(R.layout.fragment_common_cases, container, false); 33 | } 34 | 35 | @Override 36 | public int getPageTitleResId() { 37 | return R.string.common_cases_page_title; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/java/com/example/android/autofill/app/edgecases/CustomThemeSignInActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 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 | package com.example.android.autofill.app.edgecases; 17 | 18 | import android.os.Bundle; 19 | import android.widget.TextView; 20 | 21 | import com.example.android.autofill.app.commoncases.StandardSignInActivity; 22 | import com.example.android.autofill.app.view.widget.InfoButton; 23 | import com.example.android.autofill.app.R; 24 | 25 | /** 26 | * Same as {@link StandardSignInActivity}, but using a custom theme (defined in the manifest). 27 | */ 28 | public class CustomThemeSignInActivity extends StandardSignInActivity { 29 | 30 | @Override 31 | protected void onCreate(Bundle savedInstanceState) { 32 | super.onCreate(savedInstanceState); 33 | 34 | TextView title = findViewById(R.id.standard_login_header); 35 | title.setText(R.string.navigation_button_custom_theme_login_label); 36 | 37 | InfoButton info = findViewById(R.id.imageButton); 38 | info.setInfoText(getString(R.string.custom_theme_login_info)); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/java/com/example/android/autofill/app/edgecases/EdgeCasesFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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.autofill.app.edgecases; 18 | 19 | import android.os.Bundle; 20 | import android.support.annotation.Nullable; 21 | import android.view.LayoutInflater; 22 | import android.view.View; 23 | import android.view.ViewGroup; 24 | 25 | import com.example.android.autofill.app.BaseMainFragment; 26 | import com.example.android.autofill.app.R; 27 | 28 | public class EdgeCasesFragment extends BaseMainFragment { 29 | 30 | @Nullable 31 | @Override 32 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { 33 | return inflater.inflate(R.layout.fragment_edge_cases, container, false); 34 | } 35 | 36 | @Override 37 | public int getPageTitleResId() { 38 | return R.string.edge_cases_page_title; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/java/com/example/android/autofill/app/edgecases/MultipleStepsSignInActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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 | package com.example.android.autofill.app.edgecases; 17 | 18 | import android.view.View; 19 | 20 | import com.example.android.autofill.app.R; 21 | import com.google.common.collect.ImmutableMap; 22 | 23 | import java.util.LinkedHashMap; 24 | import java.util.Map; 25 | 26 | public class MultipleStepsSignInActivity extends AbstractMultipleStepsActivity { 27 | 28 | @Override 29 | protected Map getStepsMap() { 30 | LinkedHashMap steps = new LinkedHashMap<>(2); 31 | steps.put(R.string.username_label, View.AUTOFILL_HINT_USERNAME); 32 | steps.put(R.string.password_label, View.AUTOFILL_HINT_PASSWORD); 33 | return ImmutableMap.copyOf(steps); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/Application/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/drawable-hdpi/tile.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/Application/src/main/res/drawable-hdpi/tile.9.png -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/Application/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/Application/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/Application/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/drawable/custom_autofilled_highlight.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/drawable/ic_autocomplete_logo_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/drawable/ic_custom_virtual_logo_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/drawable/ic_disabled_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/drawable/ic_edittexts_logo_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/drawable/ic_email_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/drawable/ic_format_list_bulleted_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/drawable/ic_info_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/drawable/ic_person_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/drawable/ic_send_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/drawable/ic_spinners_logo_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/drawable/ic_view_module_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/drawable/ic_web_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 22 | 27 | 28 | 32 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/layout/login_webview_activity.xml: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/layout/welcome_activity.xml: -------------------------------------------------------------------------------- 1 | 16 | 22 | 23 | 29 | 30 | 37 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/Application/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/Application/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/Application/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/Application/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/Application/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 16dp 20 | 16dp 21 | 8dp 22 | 4dp 23 | 16dp 24 | 12dp 25 | 32dp 26 | 48dp 27 | 250sp 28 | 150dp 29 | 450dp 30 | 31 | -------------------------------------------------------------------------------- /AutofillFramework/Application/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 21 | 22 | 25 | 26 | 29 | 30 | 33 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | # Disable warnings from the following packages 8 | -dontwarn okio.** 9 | -dontwarn retrofit2.Platform$Java8 10 | -dontwarn com.google.common.** 11 | -dontwarn com.google.errorprone.annotations.** 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -keep class com.google.common.base.Preconditions { *; } 27 | -keep class android.arch.** { *; } 28 | -keep class com.example.android.autofill.service.** { *; } 29 | 30 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/androidTest/java/com/example/android/autofill/service/util/SingleExecutors.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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.autofill.service.util; 18 | 19 | import java.util.concurrent.Executor; 20 | 21 | /** 22 | * Allow instant execution of tasks. 23 | */ 24 | public final class SingleExecutors extends AppExecutors { 25 | private static Executor sInstance = Runnable::run; 26 | 27 | public SingleExecutors() { 28 | super(sInstance, sInstance, sInstance); 29 | } 30 | } -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/FakeFieldGenerator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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 | package com.example.android.autofill.service; 17 | 18 | import com.example.android.autofill.service.model.FilledAutofillField; 19 | 20 | interface FakeFieldGenerator { 21 | FilledAutofillField generate(int seed, String datasetId); 22 | } 23 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/data/AutofillDataBuilder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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.autofill.service.data; 18 | 19 | import com.example.android.autofill.service.model.DatasetWithFilledAutofillFields; 20 | 21 | import java.util.List; 22 | 23 | public interface AutofillDataBuilder { 24 | List buildDatasetsByPartition(int datasetNumber); 25 | } 26 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/data/DataCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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.autofill.service.data; 18 | 19 | public interface DataCallback { 20 | void onLoaded(T object); 21 | 22 | void onDataNotAvailable(String msg, Object... params); 23 | } 24 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/data/source/DalService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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.autofill.service.data.source; 18 | 19 | import com.example.android.autofill.service.model.DalCheck; 20 | 21 | import retrofit2.Call; 22 | import retrofit2.http.GET; 23 | import retrofit2.http.Query; 24 | 25 | public interface DalService { 26 | @GET("/v1/assetlinks:check") 27 | Call check(@Query("source.web.site") String webDomain, 28 | @Query("relation") String permission, 29 | @Query("target.android_app.package_name") String packageName, 30 | @Query("target.android_app.certificate.sha256_fingerprint") String fingerprint); 31 | } -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/data/source/DefaultFieldTypesSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 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.autofill.service.data.source; 18 | 19 | import com.example.android.autofill.service.model.DefaultFieldTypeWithHints; 20 | 21 | import java.util.List; 22 | 23 | public interface DefaultFieldTypesSource { 24 | List getDefaultFieldTypes(); 25 | } 26 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/data/source/DigitalAssetLinksDataSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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 | package com.example.android.autofill.service.data.source; 17 | 18 | import com.example.android.autofill.service.data.DataCallback; 19 | import com.example.android.autofill.service.model.DalCheck; 20 | import com.example.android.autofill.service.model.DalInfo; 21 | 22 | import static com.example.android.autofill.service.util.Util.DalCheckRequirement; 23 | 24 | /** 25 | * Data source for 26 | * Digital Asset Links. 27 | */ 28 | public interface DigitalAssetLinksDataSource { 29 | 30 | /** 31 | * Checks if the association between a web domain and a package is valid. 32 | */ 33 | void checkValid(DalCheckRequirement dalCheckRequirement, DalInfo dalInfo, 34 | DataCallback dalCheckCallback); 35 | 36 | /** 37 | * Clears all cached data. 38 | */ 39 | void clear(); 40 | } 41 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/data/source/PackageVerificationDataSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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 | package com.example.android.autofill.service.data.source; 17 | 18 | public interface PackageVerificationDataSource { 19 | 20 | /** 21 | * Verifies that the signatures in the passed {@code Context} match what is currently in 22 | * storage. If there are no current signatures in storage for this packageName, it will store 23 | * the signatures from the passed {@code Context}. 24 | * 25 | * @return {@code true} if signatures for this packageName are not currently in storage 26 | * or if the signatures in the passed {@code Context} match what is currently in storage; 27 | * {@code false} if the signatures in the passed {@code Context} do not match what is 28 | * currently in storage or if an {@code Exception} was thrown while generating the signatures. 29 | */ 30 | boolean putPackageSignatures(String packageName); 31 | 32 | /** 33 | * Clears all signature data currently in storage. 34 | */ 35 | void clear(); 36 | } 37 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/model/AutofillHint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 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.autofill.service.model; 18 | 19 | import android.arch.persistence.room.ColumnInfo; 20 | import android.arch.persistence.room.Entity; 21 | import android.arch.persistence.room.ForeignKey; 22 | import android.support.annotation.NonNull; 23 | 24 | @Entity(primaryKeys = {"autofillHint"}, foreignKeys = @ForeignKey( 25 | entity = FieldType.class, parentColumns = "typeName", childColumns = "fieldTypeName", 26 | onDelete = ForeignKey.CASCADE)) 27 | public class AutofillHint { 28 | 29 | @NonNull 30 | @ColumnInfo(name = "autofillHint") 31 | public String mAutofillHint; 32 | 33 | @NonNull 34 | @ColumnInfo(name = "fieldTypeName") 35 | public String mFieldTypeName; 36 | 37 | public AutofillHint(@NonNull String autofillHint, @NonNull String fieldTypeName) { 38 | this.mAutofillHint = autofillHint; 39 | this.mFieldTypeName = fieldTypeName; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/model/DalCheck.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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.autofill.service.model; 18 | 19 | public class DalCheck { 20 | public boolean linked; 21 | public String maxAge; 22 | public String debugString; 23 | } 24 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/model/FakeData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 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.autofill.service.model; 18 | 19 | import com.example.android.autofill.service.data.source.local.db.Converters; 20 | 21 | public class FakeData { 22 | public Converters.StringList strictExampleSet; 23 | public String textTemplate; 24 | public String dateTemplate; 25 | 26 | public FakeData(Converters.StringList strictExampleSet, String textTemplate, String dateTemplate) { 27 | this.strictExampleSet = strictExampleSet; 28 | this.textTemplate = textTemplate; 29 | this.dateTemplate = dateTemplate; 30 | } 31 | } -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/model/FieldTypeWithHeuristics.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 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.autofill.service.model; 18 | 19 | import android.arch.persistence.room.Embedded; 20 | import android.arch.persistence.room.Relation; 21 | 22 | import java.util.List; 23 | 24 | public class FieldTypeWithHeuristics { 25 | @Embedded 26 | public FieldType fieldType; 27 | 28 | @Relation(parentColumn = "typeName", entityColumn = "fieldTypeName", entity = AutofillHint.class) 29 | public List autofillHints; 30 | 31 | @Relation(parentColumn = "typeName", entityColumn = "fieldTypeName", entity = ResourceIdHeuristic.class) 32 | public List resourceIdHeuristics; 33 | 34 | public FieldType getFieldType() { 35 | return fieldType; 36 | } 37 | 38 | public List getAutofillHints() { 39 | return autofillHints; 40 | } 41 | 42 | public List getResourceIdHeuristics() { 43 | return resourceIdHeuristics; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/simple/HeuristicsService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 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 | package com.example.android.autofill.service.simple; 17 | 18 | /** 19 | * @deprecated this class was renamed to {@link DebugService}, but it's still in the project because 20 | * it's linked from the Autofill guide docs site. 21 | */ 22 | @Deprecated 23 | public final class HeuristicsService { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/res/drawable-v24/ic_add_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/res/drawable-v24/ic_delete_forever_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/res/drawable-v24/ic_lock_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/res/drawable-v24/ic_person_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/res/drawable/list_divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/res/layout/dataset_field.xml: -------------------------------------------------------------------------------- 1 | 16 | 23 | 24 | 34 | 35 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/res/layout/multidataset_service_settings_add_data_dialog.xml: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/res/layout/multidataset_service_settings_authentication_dialog.xml: -------------------------------------------------------------------------------- 1 | 16 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/afservice/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/afservice/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/afservice/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/afservice/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/afservice/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | #3F51B5 18 | #303F9F 19 | #FF4081 20 | #ffeeeeee 21 | 22 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 16dp 18 | 16dp 19 | 16dp 20 | 8dp 21 | 32dp 22 | 48dp 23 | 250sp 24 | 2dp 25 | -------------------------------------------------------------------------------- /AutofillFramework/afservice/src/main/res/xml/multidataset_service.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 21 | -------------------------------------------------------------------------------- /AutofillFramework/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.3.0' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /AutofillFramework/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /AutofillFramework/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /AutofillFramework/screenshots/10_AuthNeeded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/screenshots/10_AuthNeeded.png -------------------------------------------------------------------------------- /AutofillFramework/screenshots/11_AuthActivity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/screenshots/11_AuthActivity.png -------------------------------------------------------------------------------- /AutofillFramework/screenshots/1_MainPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/screenshots/1_MainPage.png -------------------------------------------------------------------------------- /AutofillFramework/screenshots/2_SampleLoginEditTexts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/screenshots/2_SampleLoginEditTexts.png -------------------------------------------------------------------------------- /AutofillFramework/screenshots/3_SampleLoginEditTextsAutofilled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/screenshots/3_SampleLoginEditTextsAutofilled.png -------------------------------------------------------------------------------- /AutofillFramework/screenshots/4_WelcomeActivity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/screenshots/4_WelcomeActivity.png -------------------------------------------------------------------------------- /AutofillFramework/screenshots/5_SampleLoginCustomVirtualView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/screenshots/5_SampleLoginCustomVirtualView.png -------------------------------------------------------------------------------- /AutofillFramework/screenshots/6_SampleLoginCustomVirtualViewAutofilled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/screenshots/6_SampleLoginCustomVirtualViewAutofilled.png -------------------------------------------------------------------------------- /AutofillFramework/screenshots/7_SampleCheckOutSpinnersAutofillable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/screenshots/7_SampleCheckOutSpinnersAutofillable.png -------------------------------------------------------------------------------- /AutofillFramework/screenshots/8_SampleCheckOutSpinnersAutofilled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/screenshots/8_SampleCheckOutSpinnersAutofilled.png -------------------------------------------------------------------------------- /AutofillFramework/screenshots/9_SettingsActivity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/screenshots/9_SettingsActivity.png -------------------------------------------------------------------------------- /AutofillFramework/screenshots/icon-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFramework/screenshots/icon-web.png -------------------------------------------------------------------------------- /AutofillFramework/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':afservice' 2 | include 'Application' 3 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/.google/packaging.yaml: -------------------------------------------------------------------------------- 1 | 2 | # GOOGLE SAMPLE PACKAGING DATA 3 | # 4 | # This file is used by Google as part of our samples packaging process. 5 | # End users may safely ignore this file. It has no relevance to other systems. 6 | --- 7 | status: PUBLISHED 8 | technologies: [Android] 9 | categories: [Input] 10 | languages: [Kotlin] 11 | solutions: [Mobile] 12 | github: android/input 13 | level: ADVANCED 14 | icon: screenshots/icon-web.png 15 | apiRefs: 16 | - android:android.view.View 17 | - android:android.service.autofill.AutoFillService 18 | - android:android.view.autofill.AutoFillManager 19 | license: apache2 20 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'kotlin-android-extensions' 4 | 5 | dependencies { 6 | compile "com.android.support:support-v4:26.0.1" 7 | compile "com.android.support:support-v13:26.0.1" 8 | compile 'com.android.support:appcompat-v7:26.0.1' 9 | compile 'com.android.support:cardview-v7:26.0.1' 10 | compile 'com.android.support:design:26.0.1' 11 | compile 'com.android.support.constraint:constraint-layout:1.0.2' 12 | compile 'com.google.code.gson:gson:2.8.1' 13 | compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 14 | } 15 | 16 | // The sample build uses multiple directories to 17 | // keep boilerplate and common code separate from 18 | // the main sample code. 19 | List dirs = [ 20 | 'main'] // main sample code; look here for the interesting stuff. 21 | 22 | android { 23 | compileSdkVersion 26 24 | buildToolsVersion "26.0.1" 25 | 26 | defaultConfig { 27 | minSdkVersion 26 28 | targetSdkVersion 26 29 | } 30 | 31 | compileOptions { 32 | sourceCompatibility JavaVersion.VERSION_1_7 33 | targetCompatibility JavaVersion.VERSION_1_7 34 | } 35 | 36 | sourceSets { 37 | main { 38 | dirs.each { dir -> 39 | java.srcDirs "src/${dir}/java" 40 | res.srcDirs "src/${dir}/res" 41 | } 42 | } 43 | androidTest.setRoot('tests') 44 | androidTest.java.srcDirs = ['tests/src'] 45 | 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/java/com/example/android/autofillframework/app/EmailComposeActivity.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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 | package com.example.android.autofillframework.app 17 | 18 | import android.content.Context 19 | import android.content.Intent 20 | import android.os.Bundle 21 | import android.support.v7.app.AppCompatActivity 22 | import com.example.android.autofillframework.R 23 | import kotlinx.android.synthetic.main.email_compose_activity.sendButton 24 | 25 | class EmailComposeActivity : AppCompatActivity() { 26 | 27 | override fun onCreate(savedInstanceState: Bundle?) { 28 | super.onCreate(savedInstanceState) 29 | setContentView(R.layout.email_compose_activity) 30 | sendButton.setOnClickListener { 31 | startActivity(WelcomeActivity.getStartActivityIntent(this@EmailComposeActivity)) 32 | finish() 33 | } 34 | } 35 | 36 | companion object { 37 | 38 | fun getStartActivityIntent(context: Context): Intent { 39 | val intent = Intent(context, EmailComposeActivity::class.java) 40 | return intent 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/Application/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/drawable-hdpi/tile.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/Application/src/main/res/drawable-hdpi/tile.9.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/Application/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/Application/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/Application/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/drawable/ic_autocomplete_logo_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/drawable/ic_custom_virtual_logo_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/drawable/ic_delete_forever_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/drawable/ic_edittexts_logo_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/drawable/ic_email_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/drawable/ic_info_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/drawable/ic_lock_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/drawable/ic_person_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/drawable/ic_send_white_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/drawable/ic_spinners_logo_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/drawable/ic_view_module_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/layout/multidataset_service_settings_authentication_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/layout/welcome_activity.xml: -------------------------------------------------------------------------------- 1 | 16 | 22 | 23 | 29 | 30 | 37 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/Application/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/Application/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/Application/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/Application/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/Application/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 16dp 21 | 16dp 22 | 8dp 23 | 4dp 24 | 16dp 25 | 12dp 26 | 32dp 27 | 48dp 28 | 250sp 29 | 150dp 30 | 31 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/Application/src/main/res/xml/multidataset_service.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 22 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | ext.kotlin_version = '1.3.11' 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.3.0' 9 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 10 | } 11 | } 12 | 13 | allprojects { 14 | repositories { 15 | google() 16 | jcenter() 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https://services.gradle.org/distributions/gradle-5.1.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/screenshots/10_AuthNeeded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/screenshots/10_AuthNeeded.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/screenshots/11_AuthActivity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/screenshots/11_AuthActivity.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/screenshots/1_MainPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/screenshots/1_MainPage.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/screenshots/2_SampleLoginEditTexts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/screenshots/2_SampleLoginEditTexts.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/screenshots/3_SampleLoginEditTextsAutofilled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/screenshots/3_SampleLoginEditTextsAutofilled.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/screenshots/4_WelcomeActivity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/screenshots/4_WelcomeActivity.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/screenshots/5_SampleLoginCustomVirtualView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/screenshots/5_SampleLoginCustomVirtualView.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/screenshots/6_SampleLoginCustomVirtualViewAutofilled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/screenshots/6_SampleLoginCustomVirtualViewAutofilled.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/screenshots/7_SampleCheckOutSpinnersAutofillable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/screenshots/7_SampleCheckOutSpinnersAutofillable.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/screenshots/8_SampleCheckOutSpinnersAutofilled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/screenshots/8_SampleCheckOutSpinnersAutofilled.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/screenshots/9_SettingsActivity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/screenshots/9_SettingsActivity.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/screenshots/icon-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/AutofillFrameworkKotlin/screenshots/icon-web.png -------------------------------------------------------------------------------- /AutofillFrameworkKotlin/settings.gradle: -------------------------------------------------------------------------------- 1 | include 'Application' 2 | -------------------------------------------------------------------------------- /BasicGestureDetect/.google/packaging.yaml: -------------------------------------------------------------------------------- 1 | 2 | # GOOGLE SAMPLE PACKAGING DATA 3 | # 4 | # This file is used by Google as part of our samples packaging process. 5 | # End users may safely ignore this file. It has no relevance to other systems. 6 | --- 7 | status: PUBLISHED 8 | technologies: [Android] 9 | categories: [Input] 10 | languages: [Java] 11 | solutions: [Mobile] 12 | github: android/input 13 | level: INTERMEDIATE 14 | icon: screenshots/icon-web.png 15 | apiRefs: 16 | - android:android.view.GestureDetector 17 | - android:android.view.MotionEvent 18 | license: apache2 19 | -------------------------------------------------------------------------------- /BasicGestureDetect/Application/build.gradle: -------------------------------------------------------------------------------- 1 | 2 | buildscript { 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.4.2' 10 | } 11 | } 12 | 13 | apply plugin: 'com.android.application' 14 | 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | 20 | dependencies { 21 | 22 | 23 | implementation "com.android.support:support-v4:28.0.0" 24 | implementation "com.android.support:support-v13:28.0.0" 25 | implementation "com.android.support:cardview-v7:28.0.0" 26 | implementation "com.android.support:appcompat-v7:28.0.0" 27 | 28 | 29 | 30 | 31 | 32 | 33 | } 34 | 35 | // The sample build uses multiple directories to 36 | // keep boilerplate and common code separate from 37 | // the main sample code. 38 | List dirs = [ 39 | 'main', // main sample code; look here for the interesting stuff. 40 | 'common', // components that are reused by multiple samples 41 | 'template'] // boilerplate code that is generated by the sample template process 42 | 43 | android { 44 | compileSdkVersion 28 45 | 46 | defaultConfig { 47 | minSdkVersion 18 48 | targetSdkVersion 28 49 | } 50 | 51 | compileOptions { 52 | sourceCompatibility JavaVersion.VERSION_1_7 53 | targetCompatibility JavaVersion.VERSION_1_7 54 | } 55 | 56 | sourceSets { 57 | main { 58 | dirs.each { dir -> 59 | java.srcDirs "src/${dir}/java" 60 | res.srcDirs "src/${dir}/res" 61 | } 62 | } 63 | androidTest.setRoot('tests') 64 | androidTest.java.srcDirs = ['tests/src'] 65 | 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /BasicGestureDetect/Application/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 31 | 32 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /BasicGestureDetect/Application/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/BasicGestureDetect/Application/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /BasicGestureDetect/Application/src/main/res/drawable-hdpi/tile.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/BasicGestureDetect/Application/src/main/res/drawable-hdpi/tile.9.png -------------------------------------------------------------------------------- /BasicGestureDetect/Application/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/BasicGestureDetect/Application/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /BasicGestureDetect/Application/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/BasicGestureDetect/Application/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /BasicGestureDetect/Application/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/BasicGestureDetect/Application/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /BasicGestureDetect/Application/src/main/res/layout-sw600dp-land/activity_main.xml: -------------------------------------------------------------------------------- 1 | 16 | 22 | 30 | 37 | 38 | -------------------------------------------------------------------------------- /BasicGestureDetect/Application/src/main/res/layout-sw600dp/activity_main.xml: -------------------------------------------------------------------------------- 1 | 16 | 22 | 23 | 31 | 37 | 38 | -------------------------------------------------------------------------------- /BasicGestureDetect/Application/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 19 | 22 | 23 | -------------------------------------------------------------------------------- /BasicGestureDetect/Application/src/main/res/values-sw600dp/template-dimens.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | @dimen/margin_huge 22 | @dimen/margin_medium 23 | 24 | 25 | -------------------------------------------------------------------------------- /BasicGestureDetect/Application/src/main/res/values-sw600dp/template-styles.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 27 | 28 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /BasicGestureDetect/Application/src/main/res/values-v11/template-styles.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /BasicGestureDetect/Application/src/main/res/values/base-strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | BasicGestureDetect 20 | 21 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /BasicGestureDetect/Application/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | Clear Text 20 | 21 | -------------------------------------------------------------------------------- /BasicGestureDetect/Application/src/main/res/values/template-dimens.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 4dp 22 | 8dp 23 | 16dp 24 | 32dp 25 | 64dp 26 | 27 | 28 | 29 | @dimen/margin_medium 30 | @dimen/margin_medium 31 | 32 | 33 | -------------------------------------------------------------------------------- /BasicGestureDetect/build.gradle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /BasicGestureDetect/gradle.properties: -------------------------------------------------------------------------------- 1 | 2 | # Project-wide Gradle settings. 3 | 4 | # IDE (e.g. Android Studio) users: 5 | # Settings specified in this file will override any Gradle settings 6 | # configured through the IDE. 7 | 8 | # For more details on how to configure your build environment visit 9 | # http://www.gradle.org/docs/current/userguide/build_environment.html 10 | 11 | # Specifies the JVM arguments used for the daemon process. 12 | # The setting is particularly useful for tweaking memory settings. 13 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 14 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 15 | 16 | # When configured, Gradle will run in incubating parallel mode. 17 | # This option should only be used with decoupled projects. More details, visit 18 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 19 | # org.gradle.parallel=true 20 | 21 | -------------------------------------------------------------------------------- /BasicGestureDetect/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/BasicGestureDetect/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /BasicGestureDetect/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /BasicGestureDetect/screenshots/1-main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/BasicGestureDetect/screenshots/1-main.png -------------------------------------------------------------------------------- /BasicGestureDetect/screenshots/icon-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/BasicGestureDetect/screenshots/icon-web.png -------------------------------------------------------------------------------- /BasicGestureDetect/settings.gradle: -------------------------------------------------------------------------------- 1 | include 'Application' 2 | -------------------------------------------------------------------------------- /BasicMultitouch/.google/packaging.yaml: -------------------------------------------------------------------------------- 1 | 2 | # GOOGLE SAMPLE PACKAGING DATA 3 | # 4 | # This file is used by Google as part of our samples packaging process. 5 | # End users may safely ignore this file. It has no relevance to other systems. 6 | --- 7 | status: PUBLISHED 8 | technologies: [Android] 9 | categories: [Input] 10 | languages: [Java] 11 | solutions: [Mobile] 12 | github: android/input 13 | level: INTERMEDIATE 14 | icon: screenshots/icon-web.png 15 | apiRefs: 16 | - android:android.view.MotionEvent 17 | license: apache2 18 | -------------------------------------------------------------------------------- /BasicMultitouch/Application/build.gradle: -------------------------------------------------------------------------------- 1 | 2 | buildscript { 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.4.2' 10 | } 11 | } 12 | 13 | apply plugin: 'com.android.application' 14 | 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | 20 | dependencies { 21 | 22 | 23 | implementation "com.android.support:support-v4:28.0.0" 24 | implementation "com.android.support:support-v13:28.0.0" 25 | implementation "com.android.support:cardview-v7:28.0.0" 26 | implementation "com.android.support:appcompat-v7:28.0.0" 27 | 28 | 29 | 30 | 31 | 32 | 33 | } 34 | 35 | // The sample build uses multiple directories to 36 | // keep boilerplate and common code separate from 37 | // the main sample code. 38 | List dirs = [ 39 | 'main', // main sample code; look here for the interesting stuff. 40 | 'common', // components that are reused by multiple samples 41 | 'template'] // boilerplate code that is generated by the sample template process 42 | 43 | android { 44 | compileSdkVersion 28 45 | 46 | defaultConfig { 47 | minSdkVersion 14 48 | targetSdkVersion 28 49 | } 50 | 51 | compileOptions { 52 | sourceCompatibility JavaVersion.VERSION_1_7 53 | targetCompatibility JavaVersion.VERSION_1_7 54 | } 55 | 56 | sourceSets { 57 | main { 58 | dirs.each { dir -> 59 | java.srcDirs "src/${dir}/java" 60 | res.srcDirs "src/${dir}/res" 61 | } 62 | } 63 | androidTest.setRoot('tests') 64 | androidTest.java.srcDirs = ['tests/src'] 65 | 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /BasicMultitouch/Application/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 22 | 23 | 24 | 25 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /BasicMultitouch/Application/src/main/java/com/example/android/basicmultitouch/MainActivity.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.basicmultitouch; 18 | 19 | import android.app.Activity; 20 | import android.os.Bundle; 21 | 22 | /** 23 | * This is an example of keeping track of individual touches across multiple 24 | * {@link android.view.MotionEvent}s. 25 | *

26 | * This is illustrated by a View ({@link TouchDisplayView}) that responds to 27 | * touch events and draws coloured circles for each pointer, stores the last 28 | * positions of this pointer and draws them. This example shows the relationship 29 | * between MotionEvent indices, pointer identifiers and actions. 30 | * 31 | * @see android.view.MotionEvent 32 | */ 33 | public class MainActivity extends Activity { 34 | TouchDisplayView mView; 35 | 36 | @Override 37 | protected void onCreate(Bundle savedInstanceState) { 38 | super.onCreate(savedInstanceState); 39 | 40 | setContentView(R.layout.layout_mainactivity); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /BasicMultitouch/Application/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/BasicMultitouch/Application/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /BasicMultitouch/Application/src/main/res/drawable-hdpi/tile.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/BasicMultitouch/Application/src/main/res/drawable-hdpi/tile.9.png -------------------------------------------------------------------------------- /BasicMultitouch/Application/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/BasicMultitouch/Application/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /BasicMultitouch/Application/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/BasicMultitouch/Application/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /BasicMultitouch/Application/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/BasicMultitouch/Application/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /BasicMultitouch/Application/src/main/res/layout/layout_mainactivity.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 12 | 13 | 16 | 17 | -------------------------------------------------------------------------------- /BasicMultitouch/Application/src/main/res/values-sw600dp/template-dimens.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | @dimen/margin_huge 22 | @dimen/margin_medium 23 | 24 | 25 | -------------------------------------------------------------------------------- /BasicMultitouch/Application/src/main/res/values-sw600dp/template-styles.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /BasicMultitouch/Application/src/main/res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 23 | 26 | 27 | -------------------------------------------------------------------------------- /BasicMultitouch/Application/src/main/res/values-v11/template-styles.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 27 | 28 | -------------------------------------------------------------------------------- /BasicMultitouch/Application/src/main/res/values-v21/base-colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /BasicMultitouch/Application/src/main/res/values-v21/base-template-styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /BasicMultitouch/Application/src/main/res/values/base-strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | BasicMultitouch 20 | 21 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /BasicMultitouch/Application/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /BasicMultitouch/Application/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 22 | 29 | 30 | -------------------------------------------------------------------------------- /BasicMultitouch/Application/src/main/res/values/template-dimens.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 4dp 22 | 8dp 23 | 16dp 24 | 32dp 25 | 64dp 26 | 27 | 28 | 29 | @dimen/margin_medium 30 | @dimen/margin_medium 31 | 32 | 33 | -------------------------------------------------------------------------------- /BasicMultitouch/Application/src/main/res/values/template-styles.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 34 | 35 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /BasicMultitouch/build.gradle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /BasicMultitouch/gradle.properties: -------------------------------------------------------------------------------- 1 | 2 | # Project-wide Gradle settings. 3 | 4 | # IDE (e.g. Android Studio) users: 5 | # Settings specified in this file will override any Gradle settings 6 | # configured through the IDE. 7 | 8 | # For more details on how to configure your build environment visit 9 | # http://www.gradle.org/docs/current/userguide/build_environment.html 10 | 11 | # Specifies the JVM arguments used for the daemon process. 12 | # The setting is particularly useful for tweaking memory settings. 13 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 14 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 15 | 16 | # When configured, Gradle will run in incubating parallel mode. 17 | # This option should only be used with decoupled projects. More details, visit 18 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 19 | # org.gradle.parallel=true 20 | 21 | -------------------------------------------------------------------------------- /BasicMultitouch/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/BasicMultitouch/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /BasicMultitouch/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /BasicMultitouch/screenshots/icon-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/BasicMultitouch/screenshots/icon-web.png -------------------------------------------------------------------------------- /BasicMultitouch/screenshots/intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/BasicMultitouch/screenshots/intro.png -------------------------------------------------------------------------------- /BasicMultitouch/screenshots/touches.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/BasicMultitouch/screenshots/touches.png -------------------------------------------------------------------------------- /BasicMultitouch/settings.gradle: -------------------------------------------------------------------------------- 1 | include 'Application' 2 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to Contribute 2 | 3 | We'd love to accept your patches and contributions to this project. There are 4 | just a few small guidelines you need to follow. 5 | 6 | ## Contributor License Agreement 7 | 8 | Contributions to this project must be accompanied by a Contributor License 9 | Agreement. You (or your employer) retain the copyright to your contribution; 10 | this simply gives us permission to use and redistribute your contributions as 11 | part of the project. Head over to to see 12 | your current agreements on file or to sign a new one. 13 | 14 | You generally only need to submit a CLA once, so if you've already submitted one 15 | (even if it was for a different project), you probably don't need to do it 16 | again. 17 | 18 | ## Code reviews 19 | 20 | All submissions, including submissions by project members, require review. We 21 | use GitHub pull requests for this purpose. Consult 22 | [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more 23 | information on using pull requests. 24 | 25 | ## Community Guidelines 26 | 27 | This project follows 28 | [Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). 29 | -------------------------------------------------------------------------------- /CommitContentSampleApp/.google/packaging.yaml: -------------------------------------------------------------------------------- 1 | 2 | # GOOGLE SAMPLE PACKAGING DATA 3 | # 4 | # This file is used by Google as part of our samples packaging process. 5 | # End users may safely ignore this file. It has no relevance to other systems. 6 | --- 7 | status: PUBLISHED 8 | technologies: [Android] 9 | categories: [Input] 10 | languages: [Java] 11 | solutions: [Mobile] 12 | github: android/input 13 | level: INTERMEDIATE 14 | icon: screenshots/icon-web.png 15 | apiRefs: 16 | - android:android.widget.EditText 17 | - android:import android.support.v13.view.inputmethod.EditorInfoCompat 18 | - android:import android.support.v13.view.inputmethod.InputConnectionCompat 19 | - android:import android.support.v13.view.inputmethod.InputContentInfoCompat 20 | license: apache2 21 | -------------------------------------------------------------------------------- /CommitContentSampleApp/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 28 5 | defaultConfig { 6 | applicationId "com.example.android.commitcontent.app" 7 | minSdkVersion 16 8 | targetSdkVersion 28 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | compile fileTree(include: ['*.jar'], dir: 'libs') 23 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 24 | exclude group: 'com.android.support', module: 'support-annotations' 25 | }) 26 | compile 'com.android.support:appcompat-v7:28.0.0' 27 | compile 'com.android.support:support-v13:28.0.0' 28 | testCompile 'junit:junit:4.12' 29 | } 30 | -------------------------------------------------------------------------------- /CommitContentSampleApp/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/google/home/yukawa/Android/Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /CommitContentSampleApp/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /CommitContentSampleApp/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleApp/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /CommitContentSampleApp/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleApp/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /CommitContentSampleApp/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleApp/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /CommitContentSampleApp/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleApp/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /CommitContentSampleApp/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleApp/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /CommitContentSampleApp/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleApp/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /CommitContentSampleApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /CommitContentSampleApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleApp/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /CommitContentSampleApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /CommitContentSampleApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /CommitContentSampleApp/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /CommitContentSampleApp/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | CommitContentSampleApp 3 | 4 | -------------------------------------------------------------------------------- /CommitContentSampleApp/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /CommitContentSampleApp/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | google() 6 | jcenter() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.3.0' 10 | 11 | // NOTE: Do not place your application dependencies here; they belong 12 | // in the individual module build.gradle files 13 | } 14 | } 15 | 16 | allprojects { 17 | repositories { 18 | google() 19 | jcenter() 20 | } 21 | } 22 | 23 | task clean(type: Delete) { 24 | delete rootProject.buildDir 25 | } 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /CommitContentSampleApp/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /CommitContentSampleApp/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleApp/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /CommitContentSampleApp/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https://services.gradle.org/distributions/gradle-5.1.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /CommitContentSampleApp/screenshots/icon-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleApp/screenshots/icon-web.png -------------------------------------------------------------------------------- /CommitContentSampleApp/screenshots/screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleApp/screenshots/screenshot1.png -------------------------------------------------------------------------------- /CommitContentSampleApp/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' -------------------------------------------------------------------------------- /CommitContentSampleIME/.google/packaging.yaml: -------------------------------------------------------------------------------- 1 | 2 | # GOOGLE SAMPLE PACKAGING DATA 3 | # 4 | # This file is used by Google as part of our samples packaging process. 5 | # End users may safely ignore this file. It has no relevance to other systems. 6 | --- 7 | status: PUBLISHED 8 | technologies: [Android] 9 | categories: [Input] 10 | languages: [Java] 11 | solutions: [Mobile] 12 | github: android/input 13 | level: INTERMEDIATE 14 | icon: screenshots/icon-web.png 15 | apiRefs: 16 | - android:android.widget.EditText 17 | - android:import android.support.v13.view.inputmethod.EditorInfoCompat 18 | - android:import android.support.v13.view.inputmethod.InputConnectionCompat 19 | - android:import android.support.v13.view.inputmethod.InputContentInfoCompat 20 | license: apache2 21 | -------------------------------------------------------------------------------- /CommitContentSampleIME/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 28 5 | defaultConfig { 6 | applicationId "com.example.android.commitcontent.ime" 7 | minSdkVersion 16 8 | targetSdkVersion 28 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | compile fileTree(include: ['*.jar'], dir: 'libs') 23 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 24 | exclude group: 'com.android.support', module: 'support-annotations' 25 | }) 26 | compile 'com.android.support:appcompat-v7:28.0.0' 27 | compile 'com.android.support:support-v13:28.0.0' 28 | testCompile 'junit:junit:4.12' 29 | } 30 | -------------------------------------------------------------------------------- /CommitContentSampleIME/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/google/home/yukawa/Android/Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /CommitContentSampleIME/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 26 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /CommitContentSampleIME/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleIME/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /CommitContentSampleIME/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleIME/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /CommitContentSampleIME/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleIME/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /CommitContentSampleIME/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleIME/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /CommitContentSampleIME/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleIME/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /CommitContentSampleIME/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleIME/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /CommitContentSampleIME/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleIME/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /CommitContentSampleIME/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleIME/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /CommitContentSampleIME/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleIME/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /CommitContentSampleIME/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleIME/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /CommitContentSampleIME/app/src/main/res/raw/animated_gif.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleIME/app/src/main/res/raw/animated_gif.gif -------------------------------------------------------------------------------- /CommitContentSampleIME/app/src/main/res/raw/animated_webp.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleIME/app/src/main/res/raw/animated_webp.webp -------------------------------------------------------------------------------- /CommitContentSampleIME/app/src/main/res/raw/dessert_android.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleIME/app/src/main/res/raw/dessert_android.png -------------------------------------------------------------------------------- /CommitContentSampleIME/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | #3F51B5 21 | #303F9F 22 | #FF4081 23 | 24 | -------------------------------------------------------------------------------- /CommitContentSampleIME/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | CommitContentSampleIme 21 | 22 | -------------------------------------------------------------------------------- /CommitContentSampleIME/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 23 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /CommitContentSampleIME/app/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /CommitContentSampleIME/app/src/main/res/xml/method.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | -------------------------------------------------------------------------------- /CommitContentSampleIME/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | google() 6 | jcenter() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.3.0' 10 | 11 | // NOTE: Do not place your application dependencies here; they belong 12 | // in the individual module build.gradle files 13 | } 14 | } 15 | 16 | allprojects { 17 | repositories { 18 | google() 19 | jcenter() 20 | } 21 | } 22 | 23 | task clean(type: Delete) { 24 | delete rootProject.buildDir 25 | } 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /CommitContentSampleIME/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /CommitContentSampleIME/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleIME/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /CommitContentSampleIME/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https://services.gradle.org/distributions/gradle-5.1.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /CommitContentSampleIME/screenshots/icon-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleIME/screenshots/icon-web.png -------------------------------------------------------------------------------- /CommitContentSampleIME/screenshots/screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/CommitContentSampleIME/screenshots/screenshot1.png -------------------------------------------------------------------------------- /CommitContentSampleIME/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Android Input Samples Repository 2 | ================================ 3 | 4 | This repository contains a set of individual Android Studio projects to help you get 5 | started writing/understanding input in Android. 6 | -------------------------------------------------------------------------------- /StylusLowLatency/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /app/libs 12 | /build 13 | /captures 14 | .externalNativeBuild 15 | .cxx 16 | local.properties 17 | -------------------------------------------------------------------------------- /StylusLowLatency/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /StylusLowLatency/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /StylusLowLatency/app/src/androidTest/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /StylusLowLatency/app/src/androidTest/java/com/example/lowlatencysample/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.example.lowlatencysample 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.example.lowlatencysample", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/assets/RobotoMono-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/StylusLowLatency/app/src/main/assets/RobotoMono-Medium.ttf -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/java/com/example/lowlatencysample/DrawingManager.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Google LLC 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 | * https://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.lowlatencysample 18 | 19 | import androidx.graphics.opengl.GLRenderer 20 | 21 | interface DrawingManager { 22 | fun saveLines(lines: FloatArray) 23 | fun getLines(): Collection 24 | var isPredictionEnabled: Boolean 25 | var isSurfaceScissorEnabled: Boolean 26 | var isDebugColorEnabled: Boolean 27 | var orientation: Int 28 | var displayRotation: Int 29 | val glRenderer: GLRenderer 30 | } -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/java/com/example/lowlatencysample/ui/GLLowLatencySurfaceView.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 Google LLC 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 | * https://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 | package com.example.lowlatencysample.ui 17 | 18 | import android.content.Context 19 | import android.os.Build 20 | import android.view.SurfaceView 21 | import androidx.annotation.RequiresApi 22 | import com.example.lowlatencysample.brush.Brush 23 | 24 | @RequiresApi(Build.VERSION_CODES.Q) 25 | class GLLowLatencySurfaceView(context: Context, private val lowLatencyRenderer: LowLatencyRenderer) : 26 | SurfaceView(context) { 27 | 28 | init { 29 | setOnTouchListener(lowLatencyRenderer.onTouchListener) 30 | } 31 | 32 | override fun onAttachedToWindow() { 33 | super.onAttachedToWindow() 34 | lowLatencyRenderer.attachSurfaceView(this) 35 | } 36 | 37 | override fun onDetachedFromWindow() { 38 | lowLatencyRenderer.release() 39 | super.onDetachedFromWindow() 40 | } 41 | } -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/java/com/example/lowlatencysample/ui/TestActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.lowlatencysample.ui 2 | 3 | import android.app.Activity 4 | import android.graphics.Color 5 | import android.graphics.drawable.ColorDrawable 6 | import android.os.Bundle 7 | import android.view.ViewGroup 8 | import android.view.ViewGroup.LayoutParams.MATCH_PARENT 9 | 10 | class TestActivity : Activity() { 11 | 12 | var canvas: CanvasRegularView? = null 13 | 14 | override fun onCreate(savedInstanceState: Bundle?) { 15 | super.onCreate(savedInstanceState) 16 | window.setBackgroundDrawable(ColorDrawable(Color.WHITE)) 17 | addCanvas() 18 | } 19 | 20 | private fun addCanvas() { 21 | canvas = CanvasRegularView(this).apply { 22 | layoutParams = ViewGroup.LayoutParams(MATCH_PARENT, MATCH_PARENT) 23 | id = canvasId 24 | } 25 | 26 | setContentView(canvas) 27 | } 28 | 29 | companion object { 30 | const val canvasId = 100098 31 | } 32 | } -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/drawable/round_brush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/StylusLowLatency/app/src/main/res/drawable/round_brush.png -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/drawable/spray_brush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/StylusLowLatency/app/src/main/res/drawable/spray_brush.png -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/menu/copy_paste.xml: -------------------------------------------------------------------------------- 1 | 2 |

3 | 8 | 11 | 14 | 22 | -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/StylusLowLatency/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/StylusLowLatency/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_back.png -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_fore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/StylusLowLatency/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_fore.png -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/StylusLowLatency/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/StylusLowLatency/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_back.png -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_fore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/StylusLowLatency/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_fore.png -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/StylusLowLatency/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/StylusLowLatency/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_back.png -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_fore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/StylusLowLatency/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_fore.png -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/StylusLowLatency/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/StylusLowLatency/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_back.png -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_fore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/StylusLowLatency/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_fore.png -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/StylusLowLatency/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/StylusLowLatency/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_back.png -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_fore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/StylusLowLatency/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_fore.png -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | LowLatency Sample 3 | -------------------------------------------------------------------------------- /StylusLowLatency/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /StylusLowLatency/app/src/test/java/com/example/lowlatencysample/LetterTest.kt: -------------------------------------------------------------------------------- 1 | package com.example.lowlatencysample 2 | 3 | import com.example.lowlatencysample.ui.findLetterIndex 4 | import junit.framework.TestCase.assertEquals 5 | import org.junit.Test 6 | 7 | class LetterTest { 8 | 9 | 10 | @Test 11 | fun findLetterIndexTest() { 12 | var index = findLetterIndex(60f, 63f) 13 | assertEquals(1, index) 14 | 15 | index = findLetterIndex(60f, 89f) 16 | assertEquals(1, index) 17 | 18 | index = findLetterIndex(60f, 90f) 19 | assertEquals(2, index) 20 | 21 | index = findLetterIndex(60f, 91f) 22 | assertEquals(2, index) 23 | } 24 | } -------------------------------------------------------------------------------- /StylusLowLatency/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Google LLC 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 | * https://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 | buildscript { 17 | ext { 18 | kotlin_version = '1.8.0' 19 | compose_version = '2023.01.00' 20 | compose_compiler_version = '1.4.0' 21 | } 22 | } 23 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 24 | plugins { 25 | id 'com.android.application' version '7.4.0' apply false 26 | id 'com.android.library' version '7.4.0' apply false 27 | id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false 28 | } 29 | 30 | -------------------------------------------------------------------------------- /StylusLowLatency/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app's APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Kotlin code style for this project: "official" or "obsolete": 19 | kotlin.code.style=official 20 | # Enables namespacing of each library's R class so that its R class includes only the 21 | # resources declared in the library itself and none from the library's dependencies, 22 | # thereby reducing the size of the R class for that library 23 | android.nonTransitiveRClass=true -------------------------------------------------------------------------------- /StylusLowLatency/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/android/input-samples/dc5292851b6806c221f04fcd635360e1016f2885/StylusLowLatency/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /StylusLowLatency/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 31 15:24:24 PDT 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /StylusLowLatency/settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Google LLC 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 | * https://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 | pluginManagement { 17 | repositories { 18 | gradlePluginPortal() 19 | google() 20 | mavenCentral() 21 | } 22 | } 23 | dependencyResolutionManagement { 24 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 25 | repositories { 26 | google() 27 | mavenCentral() 28 | } 29 | } 30 | rootProject.name = "LowLatency Sample" 31 | include ':app' 32 | --------------------------------------------------------------------------------