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 */ | |
val themedContext = ContextThemeWrapper(context, R.style.baz) | |
val drawable = AppCompatResources.getDrawable(themedContext, R.drawable.vector) |
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 --> | |
<vector ... | |
android:tint="?attr/colorControlNormal"> | |
<path ... /> | |
</vector> |
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 --> | |
<selector ...> | |
<item android:state_pressed="true" | |
android:color="?attr/colorPrimary" | |
app:alpha="0.8"/> | |
<item android:color="#ec407a"/> | |
</selector> |
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 --> | |
<gradient | |
android:type="linear" | |
android:startX="12" | |
android:startY="0" | |
android:endX="12" | |
android:endY="24" | |
android:startColor="#1b82bd" | |
android:endColor="#a242b4"/> |
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 --> | |
<gradient | |
android:type="radial" | |
android:centerX="0" | |
android:centerY="12" | |
android:gradientRadius="12" | |
android:startColor="#1b82bd" | |
android:endColor="#a242b4"/> |
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 --> | |
<gradient | |
android:type="sweep" | |
android:centerX="0" | |
android:centerY="12" | |
android:startColor="#1b82bd" | |
android:endColor="#a242b4"/> |
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 --> | |
<gradient ...> | |
<item | |
android:offset="0.0" | |
android:color="#1b82bd"/> | |
<item | |
android:offset="0.72" | |
android:color="#6f5fb8"/> | |
<item |
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 --> | |
<vector ...> | |
<path android:pathData="..."> | |
<aapt:attr name="android:fillColor"> | |
<gradient .../> | |
</aapt:attr> | |
</path> | |
</vector> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Copyright 2018 Google Inc. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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 | |
} |