Skip to content

Instantly share code, notes, and snippets.

Avatar

Nick Butcher nickbutcher

View GitHub Profile
View vector_trim.xml
<!-- Copyright 2018 Google LLC.
SPDX-License-Identifier: Apache-2.0 -->
<vector...>
<path
android:pathData="..."
android:trimPathStart="0.1"
android:trimPathEnd="0.9" />
</vector>
View vector_alpha.xml
<!-- Copyright 2018 Google LLC.
SPDX-License-Identifier: Apache-2.0 -->
<vector ...
android:alpha="0.7">
<path
android:pathData="..."
android:fillColor="#fff"
android:fillAlpha="0.5" />
View vector_color_res.xml
<!-- Copyright 2018 Google LLC.
SPDX-License-Identifier: Apache-2.0 -->
<vector ...>
<path
android:pathData="..."
android:fillColor="@color/teal"
android:strokeColor="@color/purple"
android:strokeWidth="2" />
View vector_theme_color_fill.xml
<!-- Copyright 2018 Google LLC.
SPDX-License-Identifier: Apache-2.0 -->
<vector ...>
<path
android:pathData="..."
android:fillColor="?attr/colorPrimary" />
</vector>
View vector_tint.xml
<!-- Copyright 2018 Google LLC.
SPDX-License-Identifier: Apache-2.0 -->
<vector ...
android:tint="?attr/colorControlNormal">
<path ... />
</vector>
View vector_csl.xml
<!-- 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>
View vector_gradient_linear.xml
<!-- 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"/>
View vector_gradient_radial.xml
<!-- 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"/>
View vector_gradient_sweep.xml
<!-- 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"/>
View vector_gradient_color_stops.xml
<!-- 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