├── toolkit-test-app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── drawable │ │ │ │ ├── floor_filter_rounded_background.xml │ │ │ │ ├── ic_x_24.xml │ │ │ │ ├── ic_x_circle_24.xml │ │ │ │ ├── ic_save_24.xml │ │ │ │ ├── ic_pencil_24.xml │ │ │ │ ├── ic_trash_24.xml │ │ │ │ ├── ic_home_black_24dp.xml │ │ │ │ ├── ic_dashboard_black_24dp.xml │ │ │ │ ├── ic_build.xml │ │ │ │ └── ic_notifications_black_24dp.xml │ │ │ ├── layout │ │ │ │ ├── activity_arcgissceneview.xml │ │ │ │ ├── number_dialog.xml │ │ │ │ ├── toolkit_main.xml │ │ │ │ ├── activity_arcgisarview.xml │ │ │ │ ├── scalebar_layout_controls.xml │ │ │ │ ├── compass_regular_sceneview.xml │ │ │ │ ├── activity_floorfilter.xml │ │ │ │ ├── activity_popup.xml │ │ │ │ ├── compass_custom1_mapview.xml │ │ │ │ ├── layout_controls.xml │ │ │ │ ├── compass_custom1_sceneview.xml │ │ │ │ ├── activity_bookmark.xml │ │ │ │ ├── compass_custom2_mapview.xml │ │ │ │ ├── compass_custom2_sceneview.xml │ │ │ │ ├── scalebar_custom1.xml │ │ │ │ └── scalebar_custom2.xml │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── styles.xml │ │ │ │ ├── strings.xml │ │ │ │ └── arrays.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── menu │ │ │ │ ├── arcgisarview_menu.xml │ │ │ │ ├── compass_options.xml │ │ │ │ └── scalebar_options.xml │ │ │ └── layout-land │ │ │ │ ├── scalebar_layout_controls.xml │ │ │ │ ├── layout_controls.xml │ │ │ │ ├── compass_regular_sceneview.xml │ │ │ │ ├── compass_custom1_mapview.xml │ │ │ │ ├── compass_custom1_sceneview.xml │ │ │ │ ├── compass_custom2_mapview.xml │ │ │ │ ├── compass_custom2_sceneview.xml │ │ │ │ └── scalebar_custom1.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── esri │ │ │ │ └── arcgisruntime │ │ │ │ └── toolkit │ │ │ │ └── test │ │ │ │ ├── bookmark │ │ │ │ ├── map │ │ │ │ │ └── MapViewModel.kt │ │ │ │ └── BookmarkActivity.kt │ │ │ │ ├── popup │ │ │ │ └── adapters │ │ │ │ │ └── BindingAdapters.kt │ │ │ │ ├── MapOrSceneDialogFragment.java │ │ │ │ ├── compass │ │ │ │ └── CompassAutoHideDialogFragment.java │ │ │ │ └── scalebar │ │ │ │ ├── ScalebarUnitSystemDialogFragment.java │ │ │ │ └── ScalebarAlignmentDialogFragment.java │ │ └── AndroidManifest.xml │ └── androidTest │ │ └── java │ │ └── com │ │ └── esri │ │ └── arcgisruntime │ │ └── toolkit │ │ └── test │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── arcgis-android-toolkit ├── .gitignore └── src │ ├── main │ ├── res │ │ ├── drawable-hdpi │ │ │ └── ic_compass.png │ │ ├── drawable-mdpi │ │ │ └── ic_compass.png │ │ ├── drawable-xhdpi │ │ │ └── ic_compass.png │ │ ├── drawable-xxhdpi │ │ │ └── ic_compass.png │ │ ├── drawable │ │ │ ├── floor_filter_rounded_background.xml │ │ │ ├── ic_site_facility_24.xml │ │ │ ├── ic_chevron_left_32.xml │ │ │ ├── ic_chevron_right_32.xml │ │ │ ├── ic_search_32.xml │ │ │ ├── ic_x_24.xml │ │ │ ├── ic_x_32.xml │ │ │ └── instructions_label_bg.xml │ │ ├── layout │ │ │ ├── layout_arcgisarview.xml │ │ │ ├── layout_popupview.xml │ │ │ ├── item_level_row.xml │ │ │ ├── layout_bookmarkview.xml │ │ │ ├── item_bookmark_row.xml │ │ │ ├── item_site_facility_row.xml │ │ │ └── layout_floorfilterview.xml │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── public.xml │ │ │ ├── integers.xml │ │ │ ├── dimens.xml │ │ │ ├── strings.xml │ │ │ ├── styles.xml │ │ │ └── attrs.xml │ ├── java │ │ └── com │ │ │ └── esri │ │ │ └── arcgisruntime │ │ │ └── toolkit │ │ │ ├── extension │ │ │ ├── ClassExtensions.kt │ │ │ ├── ArcGISExtensions.kt │ │ │ └── NumberExtensions.kt │ │ │ ├── scalebar │ │ │ ├── Multiplier.kt │ │ │ ├── Constants.kt │ │ │ └── style │ │ │ │ └── renderer │ │ │ │ ├── LineRenderer.kt │ │ │ │ └── BarRenderer.kt │ │ │ ├── floorfilter │ │ │ └── Constants.kt │ │ │ └── util │ │ │ └── Event.kt │ └── AndroidManifest.xml │ └── androidTest │ ├── res │ ├── values │ │ ├── colors.xml │ │ ├── styles.xml │ │ └── dimens.xml │ └── layout │ │ ├── activity_arcgisarview_test.xml │ │ ├── unit_test_scalebar_no_attrs.xml │ │ ├── unit_test_compass_no_attrs.xml │ │ ├── unit_test_compass_fully_populated.xml │ │ └── unit_test_scalebar_fully_populated.xml │ ├── java │ └── com │ │ └── esri │ │ └── arcgisruntime │ │ └── toolkit │ │ ├── TestConstants.kt │ │ ├── TestActivity.kt │ │ ├── ar │ │ └── ArcGISArViewTestActivity.kt │ │ ├── TestExtensions.kt │ │ └── extension │ │ └── ArcGISExtensionsTest.kt │ └── AndroidManifest.xml ├── gradle ├── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties └── script │ ├── versions.gradle │ └── artifact.gradle ├── CONTRIBUTING.md ├── .github └── CONTRIBUTING.md ├── Documentation ├── Compass │ ├── Images │ │ ├── CompassTestLandscape.png │ │ ├── CompassTestPortrait.png │ │ └── CompassTestMenuOptions.png │ ├── testing.md │ └── readme.md ├── Scalebar │ ├── Images │ │ ├── ScalebarTestLandscape.png │ │ ├── ScalebarTestPortrait.png │ │ ├── ScalebarTestMenuOptions.png │ │ └── ScalebarTestSelectBasemap.png │ └── testing.md ├── AugmentedReality │ └── Images │ │ └── display-scene-in-tabletop-ar.png ├── readme.md ├── testing.md ├── Bookmarks │ └── README.md └── setup.md ├── proguard-multidex-rules.pro ├── .gitignore ├── settings.gradle ├── gradle.properties └── gradlew.bat /toolkit-test-app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /.settings -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/esri/contributing). 2 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/esri/contributing). -------------------------------------------------------------------------------- /Documentation/Compass/Images/CompassTestLandscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/Documentation/Compass/Images/CompassTestLandscape.png -------------------------------------------------------------------------------- /Documentation/Compass/Images/CompassTestPortrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/Documentation/Compass/Images/CompassTestPortrait.png -------------------------------------------------------------------------------- /Documentation/Compass/Images/CompassTestMenuOptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/Documentation/Compass/Images/CompassTestMenuOptions.png -------------------------------------------------------------------------------- /Documentation/Scalebar/Images/ScalebarTestLandscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/Documentation/Scalebar/Images/ScalebarTestLandscape.png -------------------------------------------------------------------------------- /Documentation/Scalebar/Images/ScalebarTestPortrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/Documentation/Scalebar/Images/ScalebarTestPortrait.png -------------------------------------------------------------------------------- /Documentation/Scalebar/Images/ScalebarTestMenuOptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/Documentation/Scalebar/Images/ScalebarTestMenuOptions.png -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/toolkit-test-app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/toolkit-test-app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/toolkit-test-app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Documentation/Scalebar/Images/ScalebarTestSelectBasemap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/Documentation/Scalebar/Images/ScalebarTestSelectBasemap.png -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/toolkit-test-app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/toolkit-test-app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/toolkit-test-app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/toolkit-test-app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/drawable-hdpi/ic_compass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/arcgis-android-toolkit/src/main/res/drawable-hdpi/ic_compass.png -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/drawable-mdpi/ic_compass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/arcgis-android-toolkit/src/main/res/drawable-mdpi/ic_compass.png -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/drawable-xhdpi/ic_compass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/arcgis-android-toolkit/src/main/res/drawable-xhdpi/ic_compass.png -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/drawable-xxhdpi/ic_compass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/arcgis-android-toolkit/src/main/res/drawable-xxhdpi/ic_compass.png -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/toolkit-test-app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/toolkit-test-app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/toolkit-test-app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/toolkit-test-app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/toolkit-test-app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /Documentation/AugmentedReality/Images/display-scene-in-tabletop-ar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/Documentation/AugmentedReality/Images/display-scene-in-tabletop-ar.png -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/toolkit-test-app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/toolkit-test-app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Esri/arcgis-runtime-toolkit-android/HEAD/toolkit-test-app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/androidTest/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/drawable/floor_filter_rounded_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/androidTest/res/layout/activity_arcgisarview_test.xml: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/drawable/floor_filter_rounded_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /proguard-multidex-rules.pro: -------------------------------------------------------------------------------- 1 | # We need to make sure these classes are available in the main DEX file for API 19 2 | -keep @org.junit.runner.RunWith public class * 3 | -keep class android.support.test.internal** { *; } 4 | -keep class org.junit.** { *; } 5 | -keep public class com.esri.arcgisruntime.toolkit.** { *; } 6 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/layout/activity_arcgissceneview.xml: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/androidTest/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/drawable/ic_x_24.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #Android specifics 2 | 3 | # build artifacts 4 | /build 5 | /captures 6 | .externalNativeBuild 7 | 8 | # Local configuration file (sdk path, etc) 9 | /local.properties 10 | .gradle 11 | 12 | # Proguard folder generated by Eclipse 13 | proguard/ 14 | 15 | # IDE project files 16 | *.iml 17 | .idea/ 18 | .project 19 | .classpath 20 | bin/ 21 | gen/ 22 | /.settings 23 | .vscode/ 24 | 25 | # OS generated files # 26 | ###################### 27 | .DS_Store 28 | .DS_Store? 29 | ._* 30 | .Spotlight-V100 31 | .Trashes 32 | Icon? 33 | ehthumbs.db 34 | Thumbs.db -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/androidTest/res/layout/unit_test_scalebar_no_attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/drawable/ic_x_circle_24.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/layout/layout_arcgisarview.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 9 | 10 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/drawable/ic_save_24.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Esri 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 | include ':arcgis-android-toolkit', ':toolkit-test-app' 18 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/drawable/ic_site_facility_24.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/drawable/ic_pencil_24.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/drawable/ic_trash_24.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2019 Esri 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 | #Tue Aug 27 09:42:42 BST 2019 18 | distributionBase=GRADLE_USER_HOME 19 | distributionPath=wrapper/dists 20 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip 21 | zipStoreBase=GRADLE_USER_HOME 22 | zipStorePath=wrapper/dists 23 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/androidTest/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 20sp 19 | 80dp 20 | 0dp 21 | 22 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | #3F51B5 20 | #303F9F 21 | #FF4081 22 | 23 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 16dp 20 | 16dp 21 | 22 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | #EEFF00 20 | 21 | 22 | #30ffffff 23 | 24 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/androidTest/java/com/esri/arcgisruntime/toolkit/TestConstants.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Esri 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.esri.arcgisruntime.toolkit 18 | 19 | internal const val MISSING_ILLEGAL_ARGUMENT_EXCEPTION = "IllegalArgumentException should have been thrown" 20 | 21 | internal const val MISSING_ILLEGAL_STATE_EXCEPTION = "IllegalStateException should have been thrown" -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/androidTest/java/com/esri/arcgisruntime/toolkit/TestActivity.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Esri 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.esri.arcgisruntime.toolkit 18 | 19 | import androidx.appcompat.app.AppCompatActivity 20 | 21 | /** 22 | * An Activity that can be used to obtain a Context that is an Activity. 23 | * 24 | * @since 100.6.0 25 | */ 26 | class TestActivity : AppCompatActivity() 27 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /toolkit-test-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 /Applications/AndroidSDK/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 | 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 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/drawable/ic_chevron_left_32.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/drawable/ic_chevron_right_32.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/layout/layout_popupview.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 22 | 23 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/drawable/ic_home_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/layout/item_level_row.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Documentation/readme.md: -------------------------------------------------------------------------------- 1 | # Documentation 2 | 3 | This folder contains guides for using toolkit components. These components assist in the development of apps using [ArcGIS Runtime SDK for Android](https://developers.arcgis.com/android/). 4 | 5 | To prepare your app to use Toolkit, see the **[setup instructions](./setup.md)**. 6 | 7 | ## Components 8 | 9 | * **[Augmented reality (ArcGISArView)](AugmentedReality)** - Integrates SceneView with ARCore to enable augmented reality (AR) 10 | * **[Bookmarks](Bookmarks)** - Displays the bookmarks present in a map 11 | * **[Compass](Compass)** - Shows the current orientation of a map or scene by displaying a compass icon that points towards North 12 | * **[Scalebar](Scalebar)** - Displays the representation of an accurate linear measurement on a map 13 | * **[FloorFilterView](FloorFilterView)** - Displays a control to filter floor aware maps by site, facility, and level 14 | 15 | ## Testing 16 | 17 | Most Toolkit components have a test activity in the [Toolkit test app](./testing.md): 18 | 19 | * [Compass](Compass/testing.md) 20 | * [Scalebar](Scalebar/testing.md) 21 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/layout/layout_bookmarkview.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 23 | 24 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/java/com/esri/arcgisruntime/toolkit/extension/ClassExtensions.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Esri 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.esri.arcgisruntime.toolkit.extension 18 | 19 | /** 20 | * Extension property that provides a String representing a class name. To be used for Android Logs. 21 | * 22 | * @since 100.6.0 23 | */ 24 | val Any.logTag: String 25 | get() { 26 | (this::class.simpleName)?.let { 27 | return it 28 | } 29 | return "Unknown class" 30 | } 31 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/drawable/ic_dashboard_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/drawable/ic_search_32.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/androidTest/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 15 | 18 | 19 | 23 | 24 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/values/public.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/drawable/ic_x_24.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/drawable/ic_x_32.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/values/integers.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | -20.0 20 | 20.0 21 | -10.0 22 | 10.0 23 | 24 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/drawable/ic_build.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/androidTest/res/layout/unit_test_compass_no_attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 22 | 23 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/drawable/ic_notifications_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 25 | 26 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/layout/number_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 22 | 23 | 29 | 30 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/drawable/instructions_label_bg.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 19 | 20 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 16sp 20 | 21 | 22 | 8dp 23 | 12dp 24 | 8dp 25 | 8dp 26 | 27 | 28 | 5dp 29 | 2dp 30 | 31 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/androidTest/res/layout/unit_test_compass_fully_populated.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 23 | 24 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/java/com/esri/arcgisruntime/toolkit/scalebar/Multiplier.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Esri 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.esri.arcgisruntime.toolkit.scalebar 18 | 19 | /** 20 | * Container for a "multiplier" and the array of segment options appropriate for that multiplier. The multiplier is 21 | * used when calculating the length of a scalebar or the number of segments in the scalebar. 22 | * 23 | * @property multiplier used when calculating the length of a scalebar or the number of segments in the scalebar 24 | * @property segmentOptions the array of segment options appropriate for the multiplier 25 | * @since 100.5.0 26 | */ 27 | internal class Multiplier(val multiplier: Double, val segmentOptions: IntArray) 28 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/menu/arcgisarview_menu.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 19 | 20 | 25 | 26 | 29 | 30 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/java/com/esri/arcgisruntime/toolkit/extension/ArcGISExtensions.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Esri 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.esri.arcgisruntime.toolkit.extension 18 | 19 | import com.esri.arcgisruntime.UnitSystem 20 | 21 | /** 22 | * Return an instance of [UnitSystem] mapped by an int. Must be 0 for [UnitSystem.IMPERIAL] or 1 for [UnitSystem.METRIC]. 23 | * 24 | * @throws IllegalArgumentException if an int that is neither 0 or 1 is supplied. 25 | * @since 100.5.0 26 | */ 27 | internal fun unitSystemFromInt(value: Int): UnitSystem { 28 | return when (value) { 29 | 0 -> UnitSystem.IMPERIAL 30 | 1 -> UnitSystem.METRIC 31 | else -> throw IllegalArgumentException("No valid Integer supplied to return a UnitSystem.") 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 26 | 27 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/layout/item_bookmark_row.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 31 | 32 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Documentation/testing.md: -------------------------------------------------------------------------------- 1 | # Toolkit test app 2 | 3 | ## Instructions 4 | 5 | This app displays a list of activities that are used to test the toolkit components. To test a component, select the corresponding test activity from the list. 6 | 7 | ## Add a new test activity 8 | 9 | 1. Create a subdirectory of `com.esri.arcgisruntime.toolkit.test` to hold the new activity, for example 10 | `com.esri.arcgisruntime.toolkit.test.foo`. 11 | 2. Put all the source code for the new activity in the new subdirectory. 12 | 3. Add the new activity to the `Android.Manifest.xml` file, for example: 13 | 14 | ```xml 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | ``` 26 | 27 | 4. Add an item containing the fully-qualified class name of the new activity to `activityClassNames` in 28 | **res/values/arrays.xml**, for example: 29 | 30 | ```xml 31 | com.esri.arcgisruntime.toolkit.test.foo.FooTestActivity 32 | ``` 33 | 34 | 5. When you create resource files for the new activity, give them all a prefix that identifies the activity that uses them, for example **foo_layout1.xml**. 35 | 6. Add documentation in the [Documentation directory](./readme.md) for the test. 36 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/layout/toolkit_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 22 | 23 | 28 | 29 | 36 | 37 | -------------------------------------------------------------------------------- /gradle/script/versions.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Esri 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 | ext { 18 | droid = ext { 19 | minSdk = 23 20 | targetSdk = 31 21 | androidGradlePlugin = "7.0.2" 22 | androidMavenGradlePlugin = "2.1" 23 | dokka = "0.9.18" 24 | constraintLayout = "2.1.3" 25 | multiDex = "2.0.1" 26 | testRunner = "1.4.0" 27 | arCore = "1.30.0" 28 | arCoreSceneForm = "1.17.1" 29 | lifecycle = "2.4.1" 30 | appcompat = "1.4.1" 31 | material = "1.5.0" 32 | vectordrawable = "1.1.0" 33 | annotation = "1.2.0" 34 | recyclerview = "1.2.1" 35 | nav_version = "2.4.2" 36 | } 37 | test = ext { 38 | espresso = "3.1.0" 39 | jUnit = "1.1.3" 40 | rules = "1.4.0" 41 | } 42 | kotlin_version = "1.6.10" 43 | kotlin_reflect = "1.6.10" 44 | kotlin_coroutines = "1.6.1" 45 | arcgis = "100.15.0" 46 | } 47 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | ARCore is unsupported: %s 22 | %s permission has been permanently denied 23 | 24 | 25 | Elevation 26 | Heading 27 | 28 | 29 | Search… 30 | Select a site 31 | Select a facility 32 | No results found. 33 | 34 | -------------------------------------------------------------------------------- /gradle/script/artifact.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Esri 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 | ext { 18 | _versionCode = 117 19 | _versionName = "100.15.0" 20 | _fullVersion = getFullVersion() // e.g. 100.9.0-1234 21 | _groupId = "com.esri.arcgisruntime" 22 | _artifactId = 'arcgis-android-toolkit' 23 | } 24 | 25 | // Returns the full version number, including the build number, for example 100.9.0-1234 by looking 26 | // for the build number defined by one of the following options: 27 | // - BUILDNUM property passed through command line 28 | // - BUILDNUM property read from GRADLE_HOME/gradle.properties or local gradle.properties 29 | // - BUILDNUM set as system environment variable 30 | String getFullVersion() { 31 | def buildNumber = "1" 32 | if (project.hasProperty("BUILDNUM")) { 33 | buildNumber = project.findProperty("BUILDNUM") ?: "1" 34 | } else { 35 | buildNumber = System.getenv("BUILDNUM") ?: "1" 36 | } 37 | return _versionName + "-" + buildNumber 38 | } 39 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/layout/activity_arcgisarview.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 21 | 22 | 26 | 27 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/menu/compass_options.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 23 | 24 | 27 | 28 | 31 | 32 | 35 | 36 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/androidTest/java/com/esri/arcgisruntime/toolkit/ar/ArcGISArViewTestActivity.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Esri 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.esri.arcgisruntime.toolkit.ar 18 | 19 | import android.os.Bundle 20 | import androidx.annotation.VisibleForTesting 21 | import androidx.appcompat.app.AppCompatActivity 22 | import com.esri.arcgisruntime.toolkit.ar.ArcGISArView 23 | import com.esri.arcgisruntime.toolkit.test.R 24 | 25 | /** 26 | * Activity used by tests to test [ArcGISArView]. An instance of ArcGISArView is inflated from an XML layout and attached 27 | * to the Activity. 28 | * 29 | * @since 100.6.0 30 | */ 31 | class ArcGISArViewTestActivity : AppCompatActivity() { 32 | 33 | @VisibleForTesting 34 | var arcGISArView: ArcGISArView? = null 35 | 36 | override fun onCreate(savedInstanceState: Bundle?) { 37 | super.onCreate(savedInstanceState) 38 | setContentView(R.layout.activity_arcgisarview_test) 39 | arcGISArView = findViewById(R.id.arcGISArView) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /toolkit-test-app/src/androidTest/java/com/esri/arcgisruntime/toolkit/test/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Esri 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.esri.arcgisruntime.toolkit.test; 18 | 19 | import android.content.Context; 20 | import androidx.test.platform.app.InstrumentationRegistry; 21 | import androidx.test.ext.junit.runners.AndroidJUnit4; 22 | 23 | import org.junit.Test; 24 | import org.junit.runner.RunWith; 25 | 26 | import static org.junit.Assert.*; 27 | 28 | /** 29 | * Instrumented test, which will execute on an Android device. 30 | * 31 | * @see Testing documentation 32 | */ 33 | @RunWith(AndroidJUnit4.class) 34 | public class ExampleInstrumentedTest { 35 | @Test 36 | public void useAppContext() throws Exception { 37 | // Context of the app under test. 38 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 39 | 40 | assertEquals("com.esri.arcgisruntime.toolkit", appContext.getPackageName()); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/androidTest/java/com/esri/arcgisruntime/toolkit/TestExtensions.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Esri 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.esri.arcgisruntime.toolkit 18 | 19 | import android.app.Activity 20 | import androidx.test.rule.ActivityTestRule 21 | 22 | /** 23 | * Extension method to invoke finish on the Activity belonging to the ActivityTestRule. 24 | * 25 | * @since 100.6.0 26 | */ 27 | fun ActivityTestRule.finish() { 28 | this.activity?.finish() 29 | } 30 | 31 | /** 32 | * Extension method to launch the Activity belonging to the ActivityTestRule using the Intent that will be used to start 33 | * the Activity under test. 34 | * 35 | * @since 100.6.0 36 | */ 37 | fun ActivityTestRule.launchActivity() { 38 | this.launchActivity(activity?.intent) 39 | } 40 | 41 | /** 42 | * Extension method to relaunch the Activity belonging to the ActivityTestRule by finishing it and launching it again. 43 | * 44 | * @since 100.6.0 45 | */ 46 | fun ActivityTestRule.relaunchActivity() { 47 | this.finish() 48 | this.launchActivity() 49 | } 50 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/java/com/esri/arcgisruntime/toolkit/test/bookmark/map/MapViewModel.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Esri 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.esri.arcgisruntime.toolkit.test.bookmark.map 18 | 19 | import androidx.lifecycle.LiveData 20 | import androidx.lifecycle.MutableLiveData 21 | import androidx.lifecycle.ViewModel 22 | import com.esri.arcgisruntime.mapping.ArcGISMap 23 | import com.esri.arcgisruntime.mapping.BookmarkList 24 | import com.esri.arcgisruntime.portal.Portal 25 | import com.esri.arcgisruntime.portal.PortalItem 26 | 27 | class MapViewModel : ViewModel() { 28 | 29 | val map: ArcGISMap by lazy { 30 | val portal = Portal("https://arcgisruntime.maps.arcgis.com/") 31 | val portalItem = PortalItem(portal, "16f1b8ba37b44dc3884afc8d5f454dd2") 32 | val map = ArcGISMap(portalItem) 33 | map.addDoneLoadingListener{ 34 | _bookmarks.postValue(map.bookmarks) 35 | } 36 | map 37 | } 38 | 39 | private val _bookmarks: MutableLiveData = MutableLiveData() 40 | val bookmarks: LiveData 41 | get() { 42 | return _bookmarks 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /arcgis-android-toolkit/src/androidTest/res/layout/unit_test_scalebar_fully_populated.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 23 | 24 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /toolkit-test-app/src/main/res/layout-land/scalebar_layout_controls.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 23 | 24 | 31 | 32 |