add new avatar placeholder
This commit is contained in:
parent
2851e4d38b
commit
3708421362
11 changed files with 111 additions and 6 deletions
|
@ -232,8 +232,10 @@ abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
|
|||
|
||||
previews[i].setVisibility(View.VISIBLE);
|
||||
|
||||
if (previewUrl == null || previewUrl.isEmpty()) {
|
||||
Picasso.with(context).load(mediaPreviewUnloadedId).into(previews[i]);
|
||||
if (TextUtils.isEmpty(previewUrl)) {
|
||||
Picasso.with(context)
|
||||
.load(mediaPreviewUnloadedId)
|
||||
.into(previews[i]);
|
||||
} else {
|
||||
Picasso.with(context)
|
||||
.load(previewUrl)
|
||||
|
|
|
@ -62,7 +62,7 @@ public class StatusViewHolder extends StatusBaseViewHolder {
|
|||
avatarReblog.setVisibility(View.VISIBLE);
|
||||
Picasso.with(context)
|
||||
.load(rebloggedUrl)
|
||||
.fit()
|
||||
.placeholder(R.drawable.avatar_default)
|
||||
.transform(new RoundedTransformation(25))
|
||||
.into(avatarReblog);
|
||||
} else {
|
||||
|
|
36
app/src/main/res/drawable-anydpi-v21/avatar_default.xml
Normal file
36
app/src/main/res/drawable-anydpi-v21/avatar_default.xml
Normal file
|
@ -0,0 +1,36 @@
|
|||
<vector android:height="48dp" android:viewportHeight="211.66667"
|
||||
android:viewportWidth="211.66666" android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillAlpha="1" android:fillColor="#d9e1e8"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M25,0L186.667,0A25,25 0,0 1,211.667 25L211.667,186.667A25,25 0,0 1,186.667 211.667L25,211.667A25,25 0,0 1,0 186.667L0,25A25,25 0,0 1,25 0z"
|
||||
android:strokeAlpha="1" android:strokeColor="#7c95b6"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="0"/>
|
||||
<path android:fillAlpha="0.58823529" android:fillColor="#9baec8"
|
||||
android:pathData="m139.619,113.342c11.68,3.648 12.384,9.062 22.905,-0.907 3.562,-4.085 4.005,-9.454 5.288,-12.341 4.894,-11.009 12.569,-15.71 14.896,-27.12 0.473,-16.199 -8.335,-26.588 -23.586,-29.709 -9.33,-0.806 -18.486,1.531 -27.214,11.566z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="butt" android:strokeLineJoin="miter" android:strokeWidth="0.26458332"/>
|
||||
<path android:fillAlpha="1" android:fillColor="#c1cddb"
|
||||
android:pathData="m134.413,117.765c2.949,9.48 5.755,17.442 13.38,21.545 -2.306,1.694 -3.931,1.584 -6.237,1.814 -8.544,-1.912 -13.79,-5.54 -19.617,-11.679z"
|
||||
android:strokeAlpha="1" android:strokeColor="#c1cddb"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="3.5"/>
|
||||
<path android:fillAlpha="0.58823529" android:fillColor="#9baec8"
|
||||
android:pathData="m72.047,113.342c-11.68,3.648 -12.384,9.062 -22.905,-0.907 -3.562,-4.085 -4.005,-9.454 -5.288,-12.341 -4.894,-11.009 -12.569,-15.71 -14.896,-27.12 -0.473,-16.199 8.335,-26.588 23.586,-29.709 9.33,-0.806 18.486,1.531 27.214,11.566z"
|
||||
android:strokeAlpha="1" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="butt" android:strokeLineJoin="miter" android:strokeWidth="0.26458332"/>
|
||||
<path android:fillAlpha="1" android:fillColor="#c1cddb"
|
||||
android:pathData="m76.129,117.765c-2.949,9.48 -5.755,17.442 -13.38,21.545 2.306,1.694 3.931,1.584 6.237,1.814 8.544,-1.912 13.79,-5.54 19.617,-11.679z"
|
||||
android:strokeAlpha="1" android:strokeColor="#c1cddb"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="3.5"/>
|
||||
<path android:fillAlpha="1" android:fillColor="#a3b6cf"
|
||||
android:pathData="m105.498,44.172c18.166,0.996 32.248,10.811 37.76,31.977 1.938,10.481 1.118,21.686 -1.814,33.111 -3.378,10.226 -10.89,17.88 -19.05,24.493 -1.178,7.925 -1.131,7.769 -3.402,12.587 -7.086,13.578 -15.673,16.75 -22.34,19.91 -6.719,1.966 -12.521,2.096 -18.358,2.298l0.217,-13.364c2.802,-0.375 5.681,-0.362 8.197,-2.165 2.206,-1.549 3.108,-3.358 3.823,-5.205 1.404,-4.981 1.316,-8.966 -0,-12.133 -9.521,-6.272 -17.6,-16.195 -20.978,-26.42 -2.932,-11.425 -3.752,-22.63 -1.814,-33.111 5.511,-21.166 19.594,-30.981 37.76,-31.977z"
|
||||
android:strokeAlpha="0" android:strokeColor="#00000000"
|
||||
android:strokeLineCap="butt" android:strokeLineJoin="miter" android:strokeWidth="0.26458332"/>
|
||||
<path android:fillColor="#00000000"
|
||||
android:pathData="m77.382,102.118c4.822,-10.083 12.948,-7.83 15.866,0.15"
|
||||
android:strokeAlpha="1" android:strokeColor="#7c95b6"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="2.08333325"/>
|
||||
<path android:fillColor="#00000000"
|
||||
android:pathData="m134.619,102.118c-4.822,-10.083 -12.948,-7.83 -15.866,0.15"
|
||||
android:strokeAlpha="1" android:strokeColor="#7c95b6"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="miter" android:strokeWidth="2.08333325"/>
|
||||
</vector>
|
BIN
app/src/main/res/drawable-hdpi/avatar_default.png
Normal file
BIN
app/src/main/res/drawable-hdpi/avatar_default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2 KiB |
BIN
app/src/main/res/drawable-mdpi/avatar_default.png
Normal file
BIN
app/src/main/res/drawable-mdpi/avatar_default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/drawable-xhdpi/avatar_default.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/avatar_default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3 KiB |
BIN
app/src/main/res/drawable-xxhdpi/avatar_default.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/avatar_default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/avatar_default.png
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/avatar_default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB |
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -12,7 +13,7 @@
|
|||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/avatar_default" />
|
||||
tools:src="@drawable/avatar_default" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -29,7 +30,8 @@
|
|||
android:maxLines="1"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="?attr/status_text_large"
|
||||
android:textStyle="normal|bold" />
|
||||
android:textStyle="normal|bold"
|
||||
tools:text="\@ConnyDuck" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/username"
|
||||
|
@ -38,7 +40,8 @@
|
|||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="?attr/status_text_medium" />
|
||||
android:textSize="?attr/status_text_medium"
|
||||
tools:text="Conny Duck" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue