Last active
December 10, 2018 12:40
-
-
Save nickbutcher/3be93e83b86751f90bdc4115aba3d1ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright 2018 Google LLC. | |
SPDX-License-Identifier: Apache-2.0 */ | |
@BindingAdapter("indeterminateDrawableCompat") | |
fun bindIndeterminateProgress(progressBar: ProgressBar, @DrawableRes id: Int) { | |
val drawable = AppCompatResources.getDrawable(progressBar.context, id) | |
progressBar.indeterminateDrawable = drawable | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment