-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Jetcaster] Handle error and loading states (#1363)
* Adding loading/error states to Home * Adding loading/error states to PodcastImage <img width="768" alt="image" src="https://github.com/android/compose-samples/assets/463186/fddef339-3ff2-4035-a090-5ff3d0ba8056">
- Loading branch information
Showing
9 changed files
with
194 additions
and
72 deletions.
There are no files selected for viewing
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
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
61 changes: 61 additions & 0 deletions
61
Jetcaster/designsystem/src/main/res/drawable/img_empty.xml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:aapt="http://schemas.android.com/aapt" | ||
android:width="180dp" | ||
android:height="180dp" | ||
android:viewportWidth="180" | ||
android:viewportHeight="180"> | ||
<path | ||
android:pathData="M0,0h180v180h-180z"> | ||
<aapt:attr name="android:fillColor"> | ||
<gradient | ||
android:startX="90" | ||
android:startY="0" | ||
android:endX="90" | ||
android:endY="180" | ||
android:type="linear"> | ||
<item android:offset="0" android:color="@color/surface_bright"/> | ||
<item android:offset="1" android:color="@color/background"/> | ||
</gradient> | ||
</aapt:attr> | ||
</path> | ||
<group> | ||
<clip-path | ||
android:pathData="M56.67,123.52l66.85,-0l0,-66.85l-66.85,-0z"/> | ||
<path | ||
android:pathData="M80.54,108.49C77.92,108.49 75.77,107.33 75.77,105.9V59.26C75.77,57.83 77.92,56.67 80.54,56.67C83.17,56.67 85.32,57.83 85.32,59.26V105.9C85.32,107.33 83.17,108.49 80.54,108.49Z" | ||
android:fillColor="#1A120A"/> | ||
<path | ||
android:pathData="M61.44,92.95C58.82,92.95 56.67,91.78 56.67,90.35V74.81C56.67,73.38 58.82,72.22 61.44,72.22C64.07,72.22 66.22,73.38 66.22,74.81V90.35C66.22,91.78 64.07,92.95 61.44,92.95Z" | ||
android:fillColor="#1A120A"/> | ||
<path | ||
android:pathData="M99.64,98.13C97.02,98.13 94.87,96.96 94.87,95.54V69.62C94.87,68.2 97.02,67.03 99.64,67.03C102.27,67.03 104.42,68.2 104.42,69.62V95.54C104.42,96.96 102.27,98.13 99.64,98.13Z" | ||
android:fillColor="#1A120A"/> | ||
<path | ||
android:pathData="M118.74,90.35C116.11,90.35 113.97,89.19 113.97,87.76V77.4C113.97,75.97 116.11,74.81 118.74,74.81C121.37,74.81 123.52,75.97 123.52,77.4V87.76C123.52,89.19 121.37,90.35 118.74,90.35Z" | ||
android:fillColor="#1A120A"/> | ||
<path | ||
android:pathData="M80.54,115.46C77.92,115.46 75.77,114.29 75.77,112.86V66.22C75.77,64.8 77.92,63.63 80.54,63.63C83.17,63.63 85.32,64.8 85.32,66.22V112.86C85.32,114.29 83.17,115.46 80.54,115.46Z" | ||
android:fillColor="#1A120A"/> | ||
<path | ||
android:pathData="M61.44,99.91C58.82,99.91 56.67,98.74 56.67,97.32V81.77C56.67,80.34 58.82,79.18 61.44,79.18C64.07,79.18 66.22,80.34 66.22,81.77V97.32C66.22,98.74 64.07,99.91 61.44,99.91Z" | ||
android:fillColor="#1A120A"/> | ||
<path | ||
android:pathData="M99.64,105.09C97.02,105.09 94.87,103.92 94.87,102.5V76.59C94.87,75.16 97.02,74 99.64,74C102.27,74 104.42,75.16 104.42,76.59V102.5C104.42,103.92 102.27,105.09 99.64,105.09Z" | ||
android:fillColor="#1A120A"/> | ||
<path | ||
android:pathData="M118.74,97.32C116.11,97.32 113.97,96.15 113.97,94.73V84.36C113.97,82.93 116.11,81.77 118.74,81.77C121.37,81.77 123.52,82.93 123.52,84.36V94.73C123.52,96.15 121.37,97.32 118.74,97.32Z" | ||
android:fillColor="#1A120A"/> | ||
<path | ||
android:pathData="M80.54,123.52C77.91,123.52 75.76,122.48 75.76,121.21V79.55C75.76,78.28 77.91,77.24 80.54,77.24C83.16,77.24 85.31,78.28 85.31,79.55V121.21C85.31,122.48 83.16,123.52 80.54,123.52Z" | ||
android:fillColor="#1A120A"/> | ||
<path | ||
android:pathData="M61.44,109.64C58.81,109.64 56.67,108.59 56.67,107.32V93.44C56.67,92.16 58.81,91.12 61.44,91.12C64.07,91.12 66.21,92.16 66.21,93.44V107.32C66.21,108.59 64.07,109.64 61.44,109.64Z" | ||
android:fillColor="#1A120A"/> | ||
<path | ||
android:pathData="M99.63,114.26C97.01,114.26 94.86,113.22 94.86,111.95V88.81C94.86,87.54 97.01,86.49 99.63,86.49C102.26,86.49 104.41,87.54 104.41,88.81V111.95C104.41,113.22 102.26,114.26 99.63,114.26Z" | ||
android:fillColor="#1A120A"/> | ||
<path | ||
android:pathData="M118.73,107.32C116.11,107.32 113.96,106.28 113.96,105.01V95.75C113.96,94.48 116.11,93.44 118.73,93.44C121.36,93.44 123.5,94.48 123.5,95.75V105.01C123.5,106.28 121.36,107.32 118.73,107.32Z" | ||
android:fillColor="#1A120A"/> | ||
</group> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="background">#FF1A120A</color> | ||
<color name="surface_bright">#FF42372D</color> | ||
</resources> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="background">#FFFFF8F4</color> | ||
<color name="surface_bright">#FFFFF8F4</color> | ||
</resources> |
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
Oops, something went wrong.