Improve image placeholders

- Show placeholders until the image is loaded because timeout can be very long and missing profile pictures and video thumbnails make app inconvenient to use

- Adapt profile picture and video thumbnail placeholders to light theme

- Replace profile picture and video thumbnail placeholders with vector graphics
This commit is contained in:
krlvm 2022-06-21 20:22:39 +03:00 committed by Stypox
parent 067239b4f7
commit 175459cd4f
19 changed files with 125 additions and 81 deletions

View file

@ -0,0 +1,31 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="200dp"
android:height="200dp"
android:viewportWidth="200"
android:viewportHeight="200">
<path
android:pathData="M0,0h200v200h-200z"
android:strokeAlpha="0.997"
android:strokeWidth="5"
android:fillColor="@color/placeholder_foreground"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0.997"/>
<path
android:pathData="M0,200a100,75 0,1 0,200 0a100,75 0,1 0,-200 0z"
android:strokeAlpha="0.997"
android:strokeWidth="5"
android:fillColor="@color/placeholder_background"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0.997"/>
<path
android:pathData="M100,90m-60,0a60,60 0,1 1,120 0a60,60 0,1 1,-120 0"
android:strokeAlpha="0.997"
android:strokeWidth="5"
android:fillColor="@color/placeholder_background"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0.997"/>
</vector>

View file

@ -0,0 +1,22 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="200dp"
android:height="200dp"
android:viewportWidth="200"
android:viewportHeight="200">
<path
android:pathData="M0,0l200.173,0l0,200.425l-200.173,0z"
android:strokeAlpha="0.997"
android:strokeWidth="4.6539564"
android:fillColor="@color/placeholder_background"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0.997"/>
<path
android:pathData="M125.003,99.189L101.807,111.522L75.753,125.001L75.225,101.364L75.004,75L98.727,86.303L125.003,99.189Z"
android:strokeAlpha="0.997"
android:strokeWidth="5"
android:fillColor="@color/placeholder_foreground"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0.997"/>
</vector>

View file

@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="200dp"
android:height="200dp"
android:viewportWidth="200"
android:viewportHeight="200">
<path
android:pathData="M0,0l200.173,0l0,200.425l-200.173,0z"
android:strokeAlpha="0.997"
android:strokeWidth="4.6539564"
android:fillColor="@color/placeholder_background"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="1"/>
<path
android:pathData="M115.003,99.189L91.807,111.522L65.753,125.001L65.225,101.364L65.004,75L88.727,86.303L115.003,99.189Z"
android:strokeAlpha="1"
android:strokeWidth="5"
android:fillColor="@color/placeholder_foreground"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="1"/>
<path
android:pathData="M140.003,99.188L116.807,111.521L90.753,125L90.225,101.363L90.004,75L113.728,86.303L140.003,99.188Z"
android:strokeAlpha="1"
android:strokeWidth="5"
android:fillColor="@color/placeholder_foreground"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="1"/>
</vector>