Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
sherlockbeard committed Apr 4, 2021
1 parent 20c575c commit 5b599c5
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1325,17 +1325,18 @@ private void setErrorImage(final int imageResource) {
if (binding == null || activity == null) {
return;
}

binding.detailThumbnailImageView.setImageDrawable(
AppCompatResources.getDrawable(requireContext(), imageResource));
AppCompatResources.getDrawable(requireContext(),
ThemeHelper.resolveResourceIdFromAttr(requireContext(),
imageResource)));
animate(binding.detailThumbnailImageView, false, 0, AnimationType.ALPHA,
0, () -> animate(binding.detailThumbnailImageView, true, 500));
}

@Override
public void handleError() {
super.handleError();
setErrorImage(R.drawable.not_available_monkey);
setErrorImage(R.attr.not_available_monkey);

if (binding.relatedStreamsLayout != null) { // hide related streams for tablets
binding.relatedStreamsLayout.setVisibility(View.INVISIBLE);
Expand Down
27 changes: 27 additions & 0 deletions app/src/main/res/drawable/not_available_monkey_black.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="2608dp"
android:height="1469dp"
android:tint="#000000"
android:viewportWidth="2608"
android:viewportHeight="1469">
<path
android:pathData="M1495.4,309.4c-12.7,3.1 -29.4,14 -39.4,25.7 -41.7,49 -61.3,150.9 -47.4,246.9 10.5,72.3 39,127 74.9,143.5 27.6,12.8 56.5,4.5 79.5,-22.7 57.5,-68.1 68.2,-234.7 21.4,-331.8 -16.8,-34.8 -37.4,-55.3 -61.9,-61.5 -7,-1.8 -20,-1.8 -27.1,-0.1z"
android:fillColor="#FFFFFF"
android:strokeColor="#00000000"/>
<path
android:pathData="M1112.6,357.6c-45.9,11.1 -80.9,78.7 -89.6,172.9 -1.6,17.4 -1.4,60.1 0.4,78.6 7,71.1 30.1,129 61.8,154.5 13.9,11.3 26,15.9 41.3,15.7 18.6,-0.1 33.5,-7.3 49.3,-23.8 51.8,-53.8 70.8,-187.9 41.7,-293.8 -18.1,-66.3 -52.6,-106.1 -91.6,-105.6 -4.1,-0 -10,0.7 -13.3,1.5z"
android:fillColor="#FFFFFF"
android:strokeColor="#00000000"/>
<path
android:pathData="M1339.05,750c-3.8,4.5 -5.2,9.6 -5.1,19.1 0,7 0.5,9.4 2.5,13.5 4.5,9.1 10.2,9.5 15,1 2.1,-3.6 2.4,-5.3 2.4,-15.1 0,-9.5 -0.3,-11.6 -2.3,-15.2 -3.7,-7 -8.4,-8.2 -12.5,-3.3z"
android:fillColor="#FFFFFF"
android:strokeColor="#00000000"/>
<path
android:pathData="M1296.95,756c-3.2,3.9 -4.7,9.5 -4.8,17.5 0,7.8 0.8,12 3.5,16.8 4,7.1 10.3,6.4 14.2,-1.7 4.6,-9.5 3.5,-25.8 -2.1,-32.6 -3.5,-4 -7.3,-4 -10.8,-0z"
android:fillColor="#FFFFFF"
android:strokeColor="#00000000"/>
<path
android:pathData="M1304.5,840.6c-34,3.6 -54.9,7.4 -80.5,14.8 -90.8,26.1 -187.2,87.1 -296,187.4 -15.3,14.1 -36,34.3 -36,35.1 0,0.4 3.3,4 7.4,8l7.5,7.4 4.3,-3.8c2.4,-2.1 11.5,-10.7 20.3,-19.1 112,-106.4 215,-171.7 310,-196.5 16.2,-4.2 37.1,-8 55.5,-10 14.3,-1.6 52,-1.6 66,-0 91.9,10.4 176.9,53.2 273.5,137.7 17.4,15.2 65.3,62.3 85.6,84.2l11.4,12.2 7.8,-7.1c4.3,-3.9 7.7,-7.7 7.5,-8.4 -0.5,-2.1 -34.4,-37.9 -56.4,-59.5 -109.9,-107.8 -212,-166 -316.4,-180.2 -14,-1.8 -60.8,-3.3 -71.5,-2.2z"
android:fillColor="#FFFFFF"
android:strokeColor="#00000000"/>
</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_video_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="200dp"
android:background="@android:color/transparent"
android:background="?windowBackground"
android:contentDescription="@string/detail_thumbnail_view_description"
android:scaleType="fitCenter"
tools:ignore="RtlHardcoded"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
<attr name="checked_selector" format="reference" />
<attr name="focused_selector" format="reference" />
<attr name="dashed_border" format="reference" />
<attr name="not_available_monkey" format="reference" />

<attr name="separator_color" format="color" />
<attr name="queue_background_color" format="color" />
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
<item name="ic_sort">@drawable/ic_sort_black_24dp</item>
<item name="ic_help">@drawable/ic_help_black_24dp</item>
<item name="ic_arrow_back">@drawable/ic_arrow_back_black_24dp</item>
<item name="not_available_monkey">@drawable/not_available_monkey_black</item>

<item name="separator_color">@color/light_separator_color</item>
<item name="contrast_background_color">@color/light_contrast_background_color</item>
Expand Down Expand Up @@ -209,6 +210,7 @@
<item name="ic_sort">@drawable/ic_sort_white_24dp</item>
<item name="ic_help">@drawable/ic_help_white_24dp</item>
<item name="ic_arrow_back">@drawable/ic_arrow_back_white_24dp</item>
<item name="not_available_monkey">@drawable/not_available_monkey_white</item>

<item name="separator_color">@color/dark_separator_color</item>
<item name="contrast_background_color">@color/dark_contrast_background_color</item>
Expand Down

0 comments on commit 5b599c5

Please sign in to comment.