Skip to content

Commit 1db3c4b

Browse files
authored
Merge pull request #210 from Esri/develop
Release 100.13.0
2 parents f59b23d + bed4f85 commit 1db3c4b

File tree

19 files changed

+226
-215
lines changed

19 files changed

+226
-215
lines changed

Documentation/setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
To use the ArcGIS Runtime Toolkit for Android, first you need an app that uses the ArcGIS Runtime SDK for Android:
66

7-
1. Install the ArcGIS Runtime SDK for Android by following the instructions to [Install the SDK](https://developers.arcgis.com/android/latest/guide/install-and-set-up.htm).
8-
2. Create an app that uses the ArcGIS Runtime SDK. For example you could follow the instructions to [Develop your first map app with Java](https://developers.arcgis.com/android/latest/guide/develop-your-first-map-app.htm) or [Develop your first map app with Kotlin](https://developers.arcgis.com/android/latest/guide/develop-your-first-map-app-with-kotlin.htm).
7+
1. Install the ArcGIS Runtime SDK for Android by following the instructions to [Install the SDK](https://developers.arcgis.com/android/install-and-set-up/).
8+
2. Create an app that uses the ArcGIS Runtime SDK. For example you could follow the instructions to [Display a map](https://developers.arcgis.com/android/maps-2d/tutorials/display-a-map/).
99

1010
## Use the toolkit library
1111

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ You can use the Toolkit in your projects by:
2323
2424
```
2525
dependencies {
26-
implementation 'com.esri.arcgisruntime:arcgis-android-toolkit:100.12.0'
26+
implementation 'com.esri.arcgisruntime:arcgis-android-toolkit:100.13.0'
2727
}
2828
```
2929
@@ -61,6 +61,7 @@ The following table shows which versions of the SDK are compatible with the tool
6161
| 100.10.0 | 100.10.0 |
6262
| 100.11.0 | 100.11.0 |
6363
| 100.12.0 | 100.12.0 |
64+
| 100.13.0 | 100.13.0 |
6465
6566
## Resources
6667

arcgis-android-toolkit/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
plugins {
1818
id 'com.android.library'
1919
id 'kotlin-android'
20-
id 'kotlin-android-extensions'
2120
id 'kotlin-kapt'
2221
id 'org.jetbrains.dokka-android'
2322
// https://github.com/wupdigital/android-maven-publish
@@ -76,20 +75,21 @@ dokka {
7675

7776
dependencies {
7877
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
79-
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
78+
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_reflect"
8079
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines"
8180
implementation "androidx.appcompat:appcompat:$droid.appcompat"
8281
implementation "androidx.constraintlayout:constraintlayout:$droid.constraintLayout"
8382
implementation "androidx.multidex:multidex:$droid.multiDex"
8483
implementation "androidx.navigation:navigation-fragment-ktx:$droid.nav_version"
85-
implementation "androidx.lifecycle:lifecycle-runtime:$droid.lifecycle"
84+
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$droid.lifecycle"
8685
implementation "androidx.recyclerview:recyclerview:$droid.recyclerview"
8786
implementation "com.google.android.material:material:$droid.material"
87+
implementation "com.google.ar:core:$droid.arCore"
8888
api "androidx.lifecycle:lifecycle-common-java8:$droid.lifecycle"
89-
api "com.google.ar.sceneform.ux:sceneform-ux:$droid.arCore"
90-
api "com.google.ar.sceneform:core:$droid.arCore"
89+
api "com.google.ar.sceneform.ux:sceneform-ux:$droid.arCoreSceneForm"
90+
api "com.google.ar.sceneform:core:$droid.arCoreSceneForm"
9191
// fixing failing D8 https://github.com/google-ar/sceneform-android-sdk/issues/575
92-
implementation "com.google.ar.sceneform:animation:$droid.arCore"
92+
implementation "com.google.ar.sceneform:animation:$droid.arCoreSceneForm"
9393
api "com.esri.arcgisruntime:arcgis-android:$arcgis"
9494
androidTestImplementation "androidx.test:rules:$test.rules"
9595
androidTestImplementation "androidx.test.ext:junit:$test.jUnit"

arcgis-android-toolkit/src/main/java/com/esri/arcgisruntime/toolkit/ar/ArCalibrationView.kt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ import android.content.Context
2020
import android.util.AttributeSet
2121
import android.view.View
2222
import android.widget.FrameLayout
23+
import android.widget.TextView
24+
import androidx.recyclerview.widget.RecyclerView
2325
import com.esri.arcgisruntime.toolkit.R
2426
import com.esri.arcgisruntime.toolkit.ar.ArCalibrationView.Companion.SCENEVIEW_CALIBRATING_OPACITY
2527
import com.esri.arcgisruntime.toolkit.control.JoystickSeekBar
26-
import kotlinx.android.synthetic.main.view_ar_calibration.view.elevationControl
27-
import kotlinx.android.synthetic.main.view_ar_calibration.view.elevationLabel
28-
import kotlinx.android.synthetic.main.view_ar_calibration.view.headingControl
2928

3029
/**
3130
* The ArCalibrationView allows the modification of the following properties of the SceneView within
@@ -90,6 +89,8 @@ class ArCalibrationView : FrameLayout {
9089
var elevationControlVisibility: Boolean = true
9190
set(value) {
9291
field = value
92+
val elevationLabel = findViewById<TextView>(R.id.elevationLabel)
93+
val elevationControl = findViewById<JoystickSeekBar>(R.id.elevationControl)
9394
elevationLabel.visibility = if (value) View.VISIBLE else View.INVISIBLE
9495
elevationControl.visibility = if (value) View.VISIBLE else View.INVISIBLE
9596
}
@@ -113,7 +114,9 @@ class ArCalibrationView : FrameLayout {
113114
}
114115

115116
private fun initialize() {
116-
inflate(context, R.layout.view_ar_calibration, this)
117+
inflate(context, R.layout.layout_arcalibrationview, this)
118+
val headingControl = findViewById<JoystickSeekBar>(R.id.headingControl)
119+
val elevationControl = findViewById<JoystickSeekBar>(R.id.elevationControl)
117120

118121
// Begin listening for delta progress updates on the elevation control
119122
elevationControl.addDeltaProgressUpdatedListener(object :

arcgis-android-toolkit/src/main/java/com/esri/arcgisruntime/toolkit/ar/ArLocationDataSource.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class ArLocationDataSource(private val context: Context) : LocationDataSource()
8686
private val selectedLocationProviders = ArrayList<String>()
8787

8888
// The internal android location listener implementation
89-
private var internalLocationListener: InternalLocationListener? = null
89+
private val internalLocationListener = InternalLocationListener()
9090

9191
// The internal listener to update the heading for compass mode
9292
private var internalHeadingListener: InternalHeadingListener? = null
@@ -250,7 +250,6 @@ class ArLocationDataSource(private val context: Context) : LocationDataSource()
250250
*/
251251
override fun onStop() {
252252
locationManager?.removeUpdates(internalLocationListener)
253-
internalLocationListener = null
254253

255254
// Stop update heading if it is started
256255
stopUpdateHeading()
@@ -302,10 +301,6 @@ class ArLocationDataSource(private val context: Context) : LocationDataSource()
302301
*/
303302
@SuppressLint("MissingPermission")
304303
private fun startLocationProviders() {
305-
if (internalLocationListener == null) {
306-
internalLocationListener = InternalLocationListener()
307-
}
308-
309304
for (provider in selectedLocationProviders) {
310305
locationManager?.requestLocationUpdates(
311306
provider,

arcgis-android-toolkit/src/main/java/com/esri/arcgisruntime/toolkit/ar/ArcGISArView.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ import com.google.ar.core.TrackingState
5050
import com.google.ar.sceneform.ArSceneView
5151
import com.google.ar.sceneform.FrameTime
5252
import com.google.ar.sceneform.Scene
53-
import kotlinx.android.synthetic.main.layout_arcgisarview.view._arSceneView
54-
import kotlinx.android.synthetic.main.layout_arcgisarview.view.arcGisSceneView
5553
import kotlinx.coroutines.GlobalScope
5654
import kotlinx.coroutines.Job
5755
import kotlinx.coroutines.launch
@@ -216,7 +214,7 @@ class ArcGISArView : FrameLayout, DefaultLifecycleObserver, Scene.OnUpdateListen
216214
*
217215
* @since 100.6.0
218216
*/
219-
val sceneView: SceneView get() = arcGisSceneView
217+
val sceneView: SceneView get() = findViewById(R.id.arcGisSceneView)
220218

221219
/**
222220
* A SurfaceView that integrates with ARCore and renders a scene.
@@ -225,7 +223,7 @@ class ArcGISArView : FrameLayout, DefaultLifecycleObserver, Scene.OnUpdateListen
225223
*/
226224
var arSceneView: ArSceneView? = null
227225
private set
228-
get() = _arSceneView
226+
get() = findViewById(R.id._arSceneView)
229227

230228
/**
231229
* A Camera that defines the origin of the Camera used as the viewpoint for the [SceneView]. Setting this property

arcgis-android-toolkit/src/main/java/com/esri/arcgisruntime/toolkit/bookmark/BookmarkView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import com.esri.arcgisruntime.mapping.Bookmark
3131
import com.esri.arcgisruntime.mapping.BookmarkList
3232
import com.esri.arcgisruntime.toolkit.BR
3333
import com.esri.arcgisruntime.toolkit.R
34-
import kotlinx.android.synthetic.main.layout_bookmarkview.view.bookmarkRecyclerView
3534

3635
/**
3736
* The BookmarkView will display a list of bookmarks in a [RecyclerView] and allows the user to
@@ -80,6 +79,7 @@ class BookmarkView : FrameLayout {
8079
*/
8180
private fun init(context: Context) {
8281
inflate(context, R.layout.layout_bookmarkview, this)
82+
val bookmarkRecyclerView = findViewById<RecyclerView>(R.id.bookmarkRecyclerView)
8383
bookmarkRecyclerView.layoutManager = LinearLayoutManager(context)
8484
bookmarkRecyclerView.adapter = bookmarksAdapter
8585
}

arcgis-android-toolkit/src/main/java/com/esri/arcgisruntime/toolkit/popup/PopupView.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ import com.esri.arcgisruntime.mapping.popup.PopupField
4646
import com.esri.arcgisruntime.mapping.popup.PopupManager
4747
import com.esri.arcgisruntime.toolkit.BR
4848
import com.esri.arcgisruntime.toolkit.R
49-
import kotlinx.android.synthetic.main.item_popup_row.view.*
50-
import kotlinx.android.synthetic.main.layout_popupview.view.*
5149

5250
private const val TAG = "PopupView"
5351

@@ -95,6 +93,7 @@ class PopupView : FrameLayout {
9593
*/
9694
private fun init(context: Context) {
9795
inflate(context, R.layout.layout_popupview, this)
96+
val popupRecyclerView = findViewById<RecyclerView>(R.id.popupRecyclerView)
9897
popupRecyclerView.layoutManager = LinearLayoutManager(context)
9998
popupRecyclerView.adapter = popupAttributeListAdapter
10099
}
@@ -168,23 +167,23 @@ class PopupView : FrameLayout {
168167
RecyclerView.ViewHolder(binding.root) {
169168

170169
val labelTextView: TextView by lazy {
171-
binding.root.labelTextView
170+
binding.root.findViewById(R.id.labelTextView)
172171
}
173172

174173
val valueTextView: TextView by lazy {
175-
binding.root.valueTextView
174+
binding.root.findViewById(R.id.valueTextView)
176175
}
177176

178177
val valueEditText: EditText by lazy {
179-
binding.root.valueEditText
178+
binding.root.findViewById(R.id.valueEditText)
180179
}
181180

182181
val codedValueDomainSpinner: Spinner by lazy {
183-
binding.root.codedValueDomainSpinner
182+
binding.root.findViewById(R.id.codedValueDomainSpinner)
184183
}
185184

186185
val separatingLineView: View by lazy {
187-
binding.root.separatingLine
186+
binding.root.findViewById(R.id.separatingLine)
188187
}
189188

190189
fun bind(
@@ -219,6 +218,7 @@ class PopupView : FrameLayout {
219218
valueEditText.visibility = View.VISIBLE
220219
separatingLineView.visibility = View.GONE
221220
valueTextView.visibility = View.GONE
221+
codedValueDomainSpinner.visibility = View.GONE
222222
//save original colors
223223
val oldColors: ColorStateList = labelTextView.textColors
224224
// here we assign and hold the values of the editable fields, entered by the user
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<?xml version="1.0" encoding="utf-8"?><!--
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+
<layout xmlns:android="http://schemas.android.com/apk/res/android"
17+
xmlns:app="http://schemas.android.com/apk/res-auto">
18+
19+
<androidx.constraintlayout.widget.ConstraintLayout
20+
android:layout_width="match_parent"
21+
android:layout_height="match_parent"
22+
android:paddingStart="@dimen/ar_calibration_view_padding_horz"
23+
android:paddingTop="@dimen/ar_calibration_view_padding_vert"
24+
android:paddingEnd="@dimen/ar_calibration_view_padding_horz"
25+
android:paddingBottom="@dimen/ar_calibration_view_padding_vert">
26+
27+
<!-- Not currently used -->
28+
<TextView
29+
android:id="@+id/calibrationInstructionsLabel"
30+
android:layout_width="wrap_content"
31+
android:layout_height="wrap_content"
32+
android:background="@drawable/instructions_label_bg"
33+
android:gravity="center"
34+
android:paddingStart="@dimen/ar_calibration_view_instructions_label_padding_horz"
35+
android:paddingEnd="@dimen/ar_calibration_view_instructions_label_padding_horz"
36+
android:textColor="@android:color/black"
37+
android:visibility="gone"
38+
app:layout_constraintEnd_toEndOf="@id/guideline"
39+
app:layout_constraintStart_toStartOf="@id/guideline"
40+
app:layout_constraintTop_toTopOf="parent" />
41+
42+
<TextView
43+
android:id="@+id/elevationLabel"
44+
style="@style/TextView.CalibrationLabel"
45+
android:layout_width="wrap_content"
46+
android:layout_height="wrap_content"
47+
android:layout_marginBottom="@dimen/ar_calibration_view_child_margin"
48+
android:text="@string/ar_calibration_view_elevation_label"
49+
app:layout_constraintBottom_toTopOf="@id/headingLabel"
50+
app:layout_constraintStart_toStartOf="parent" />
51+
52+
<TextView
53+
android:id="@+id/headingLabel"
54+
style="@style/TextView.CalibrationLabel"
55+
android:layout_width="wrap_content"
56+
android:layout_height="wrap_content"
57+
android:text="@string/ar_calibration_view_heading_label"
58+
app:layout_constraintBottom_toBottomOf="parent"
59+
app:layout_constraintStart_toStartOf="parent" />
60+
61+
<androidx.constraintlayout.widget.Guideline
62+
android:id="@+id/guideline"
63+
android:layout_width="wrap_content"
64+
android:layout_height="wrap_content"
65+
android:orientation="vertical"
66+
app:layout_constraintGuide_percent="0.5" />
67+
68+
<com.esri.arcgisruntime.toolkit.control.JoystickSeekBar
69+
android:id="@+id/elevationControl"
70+
android:layout_width="0dp"
71+
android:layout_height="wrap_content"
72+
app:jsb_max="@integer/calibration_elevation_control_max"
73+
app:jsb_min="@integer/calibration_elevation_control_min"
74+
app:layout_constraintBottom_toBottomOf="@id/elevationLabel"
75+
app:layout_constraintEnd_toEndOf="parent"
76+
app:layout_constraintStart_toEndOf="@id/elevationLabel" />
77+
78+
<com.esri.arcgisruntime.toolkit.control.JoystickSeekBar
79+
android:id="@+id/headingControl"
80+
android:layout_width="0dp"
81+
android:layout_height="wrap_content"
82+
app:jsb_max="@integer/calibration_heading_control_max"
83+
app:jsb_min="@integer/calibration_heading_control_min"
84+
app:layout_constraintBottom_toBottomOf="@id/headingLabel"
85+
app:layout_constraintEnd_toEndOf="parent"
86+
app:layout_constraintStart_toEndOf="@id/headingLabel" />
87+
88+
</androidx.constraintlayout.widget.ConstraintLayout>
89+
</layout>

arcgis-android-toolkit/src/main/res/layout/layout_bookmarkview.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414
~ See the License for the specific language governing permissions and
1515
~ limitations under the License.
1616
-->
17-
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
18-
android:id="@+id/bookmarkRecyclerView"
19-
android:layout_width="match_parent"
20-
android:layout_height="match_parent">
21-
</androidx.recyclerview.widget.RecyclerView>
17+
<layout xmlns:android="http://schemas.android.com/apk/res/android">
2218

19+
<androidx.recyclerview.widget.RecyclerView
20+
android:id="@+id/bookmarkRecyclerView"
21+
android:layout_width="match_parent"
22+
android:layout_height="match_parent"></androidx.recyclerview.widget.RecyclerView>
23+
24+
</layout>

0 commit comments

Comments
 (0)