** link **
- change 1
- change 2
** any additional useful context or info **
// | |
// Non-abi change | |
// | |
1_non_abi_change { | |
title = "Non-api change to :location module" | |
tasks = [":app:assembleEnvQADebug"] | |
apply-non-abi-change-to = "location/src/main/java/com/premise/android/data/location/AndroidLocationProvider.java" | |
} | |
2_non_abi_change { |
curl -H "Accept: application/vnd.github.everest-preview+json" \ | |
-H "Authorization: token <personal access token with repo access>" \ | |
--request POST \ | |
--data '{"event_type": "process-layouts"}' \ | |
https://api.github.com/repos/pixiteapps/pigment-android/dispatches |
@BindingAdapter("uiState") | |
fun setUiStateForLoading(progressView: ProgressBar, uiState: UIState) { | |
progressView.visibility = when (uiState) { | |
Loading -> View.VISIBLE | |
else -> View.GONE | |
} | |
} | |
@BindingAdapter("uiState") | |
fun setUiStateForLoadedContent(view: View, uiState: UIState) { |
class MainActivity : Activity() { | |
private val TAG = MainActivity::class.java.simpleName | |
private val blinkHandler = Handler() | |
private var redLED: Gpio? = null | |
private val blinkRunnable = object : Runnable { | |
override fun run() { | |
redLED?.also { |
// Indicate the the screen should be closed | |
class ImageViewModel() : BaseViewModel() { | |
@BoundMethod | |
fun onExitFullscreenClicked() { | |
lifecycleState.set(FinishedOk) | |
} | |
} | |
// indicate that the screen should be finished and a result is returned |
viewModel.lifecycleStatePub.subscribe { state -> | |
when (state) { | |
is Active -> {} | |
is FinishedOk, Cancelled -> finish() | |
is FinishedWithResult -> { | |
setResult(state.result, state.data) | |
finish() | |
} | |
is StartActivity -> { | |
val intent = Intent(this, state.target).apply { |
// Lifecycle States | |
sealed class ViewModelLifecycleState | |
object Active : ViewModelLifecycleState() | |
object FinishedOk : ViewModelLifecycleState() | |
object Cancelled : ViewModelLifecycleState() | |
data class FinishedWithResult( |
fun bindViewModel(root:View, viewModel: BaseViewModel) { | |
viewModel.snackPub.subscribe { snackData -> | |
showSnackbar(rootView, snackData) | |
} | |
} | |
/** | |
* Maps the passed [SnackData] to the appropriate UI representation of a [Snackbar] | |
*/ | |
private fun showSnackbar(root: View, data: SnackData) { |
val snackPub:PublishSubject<SnackData> = PublishSubject.create() |