Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ dependencies {
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.esri.arcgisruntime:arcgis-android:100.10.0'
implementation 'com.esri.arcgisruntime:arcgis-android-toolkit:100.11.0-3131'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.3'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.3'
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import androidx.security.crypto.MasterKeys
import com.esri.arcgisruntime.loadable.LoadStatus
import com.esri.arcgisruntime.mapping.ArcGISMap
import com.esri.arcgisruntime.opensourceapps.datacollection.R
import com.esri.arcgisruntime.opensourceapps.datacollection.util.Event
import com.esri.arcgisruntime.toolkit.util.Event
import com.esri.arcgisruntime.opensourceapps.datacollection.util.Logger
import com.esri.arcgisruntime.opensourceapps.datacollection.util.raiseEvent
import com.esri.arcgisruntime.toolkit.util.raiseEvent
import com.esri.arcgisruntime.portal.Portal
import com.esri.arcgisruntime.portal.PortalItem
import com.esri.arcgisruntime.portal.PortalUser
Expand Down Expand Up @@ -73,6 +73,11 @@ class DataCollectionViewModel(application: Application, val mapViewModel: MapVie
private val _bottomSheetState: MutableLiveData<Int> = MutableLiveData(BottomSheetBehavior.STATE_HIDDEN)
val bottomSheetState: LiveData<Int> = _bottomSheetState

private val _isShowPopupEditControls = MutableLiveData(false)
// Depicts whether to show the edit layout to modify the selected popup attributes
// being displayed in the bottomsheet
val isShowPopupEditControls: LiveData<Boolean> = _isShowPopupEditControls

private val encryptedSharedPrefs by lazy {
val masterKeyAlias = MasterKeys.getOrCreate(MasterKeys.AES256_GCM_SPEC)
EncryptedSharedPreferences.create(
Expand Down Expand Up @@ -180,6 +185,15 @@ class DataCollectionViewModel(application: Application, val mapViewModel: MapVie
_bottomSheetState.value = bottomSheetState
}

/**
* Sets whether to display the Popup editing control view.
*
* @param showPopupEditControls
*/
fun setShowPopupEditControls(showPopupEditControls: Boolean) {
_isShowPopupEditControls.value = showPopupEditControls
}

/**
* Loads the Portal with the given value of the loginRequired flag and sets it on the Map.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ import com.esri.arcgisruntime.layers.FeatureLayer
import com.esri.arcgisruntime.layers.LayerContent
import com.esri.arcgisruntime.mapping.GeoElement
import com.esri.arcgisruntime.mapping.view.IdentifyLayerResult
import com.esri.arcgisruntime.opensourceapps.datacollection.util.Event
import com.esri.arcgisruntime.opensourceapps.datacollection.util.raiseEvent
import com.esri.arcgisruntime.toolkit.util.Event
import com.esri.arcgisruntime.toolkit.util.raiseEvent
import com.esri.arcgisruntime.toolkit.popup.PopupViewModel

/**
* The view model for IdentifyResultFragment, that is responsible for processing the result of
Expand All @@ -38,6 +39,9 @@ class IdentifyResultViewModel(val popupViewModel: PopupViewModel) : ViewModel()
private val _showIdentifyResultEvent = MutableLiveData<Event<Unit>>()
val showIdentifyResultEvent: LiveData<Event<Unit>> = _showIdentifyResultEvent

private val _dismissIdentifyResultEvent = MutableLiveData<Event<Unit>>()
val dismissIdentifyResultEvent: LiveData<Event<Unit>> = _dismissIdentifyResultEvent

private val _identifyLayerResult = MutableLiveData<IdentifyLayerResult>()
val identifyLayerResult: LiveData<IdentifyLayerResult> = _identifyLayerResult

Expand Down Expand Up @@ -89,6 +93,13 @@ class IdentifyResultViewModel(val popupViewModel: PopupViewModel) : ViewModel()
popupViewModel.clearPopup()
}

/**
* Raises an event to dismiss the identify results
*/
fun dismissIdentifyLayerResult() {
_dismissIdentifyResultEvent.raiseEvent()
}

/**
* Raises an event to show the Popup
*/
Expand Down

This file was deleted.

Loading