add new avatar placeholder
@ -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
@ -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
After Width: | Height: | Size: 2.0 KiB |
BIN
app/src/main/res/drawable-mdpi/avatar_default.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/drawable-xhdpi/avatar_default.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
app/src/main/res/drawable-xxhdpi/avatar_default.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/avatar_default.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
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>
|
||||
|
||||
|
64
assets/avatar_default.svg
Normal file
@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://www.w3.org/2000/svg" id="svg8" version="1.1" viewBox="0 0 211.66666 211.66667"
|
||||
height="800" width="800">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<rect
|
||||
ry="25"
|
||||
y="0"
|
||||
x="0"
|
||||
height="211.66667"
|
||||
width="211.66667"
|
||||
id="rect4493"
|
||||
style="opacity:1;fill:#d9e1e8;fill-opacity:1;fill-rule:nonzero;stroke:#7c95b6;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
|
||||
<g
|
||||
style="display:inline"
|
||||
transform="translate(0,-85.333317)"
|
||||
id="layer1">
|
||||
<g
|
||||
transform="matrix(1.2,0,0,1.2,-19.120545,-34.579764)"
|
||||
id="g5131">
|
||||
<path
|
||||
id="path5100"
|
||||
d="m 132.28325,194.37945 c 9.73293,3.04024 10.32027,7.55178 19.0878,-0.75596 2.96859,-3.40402 3.33739,-7.87857 4.40651,-10.28376 4.07802,-9.17426 10.47436,-13.09128 12.41343,-22.60016 0.39388,-13.4991 -6.94563,-22.1565 -19.65476,-24.75744 -7.77531,-0.67136 -15.40514,1.27604 -22.67857,9.63839 z"
|
||||
style="display:inline;fill:#9baec8;fill-opacity:0.58823529;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
id="path5122"
|
||||
d="m 127.94502,198.06471 c 2.45762,7.8996 4.79594,14.53489 11.15029,17.95388 -1.92137,1.41168 -3.27579,1.32004 -5.19717,1.5119 -7.12025,-1.59325 -11.49199,-4.61664 -16.34747,-9.73288 z"
|
||||
style="fill:#c1cddb;fill-opacity:1;stroke:#c1cddb;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
|
||||
<path
|
||||
style="display:inline;fill:#9baec8;fill-opacity:0.58823529;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 75.973214,194.37945 c -9.732929,3.04024 -10.320271,7.55178 -19.087797,-0.75596 -2.968597,-3.40402 -3.337392,-7.87857 -4.406513,-10.28376 -4.078022,-9.17426 -10.474359,-13.09128 -12.41343,-22.60016 -0.39388,-13.4991 6.945626,-22.1565 19.654764,-24.75744 7.77531,-0.67136 15.405133,1.27604 22.67857,9.63839 z"
|
||||
id="path5081" />
|
||||
<path
|
||||
style="fill:#c1cddb;fill-opacity:1;stroke:#c1cddb;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
d="m 79.374999,198.06471 c -2.457624,7.8996 -4.79594,14.53489 -11.150297,17.95388 1.921379,1.41168 3.275793,1.32004 5.197172,1.5119 7.120253,-1.59325 11.491994,-4.61664 16.347469,-9.73288 z"
|
||||
id="path5120" />
|
||||
<path
|
||||
style="display:inline;fill:#a3b6cf;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0"
|
||||
d="m 103.84896,136.73793 c 15.13827,0.82979 26.87348,9.00914 31.46629,26.64747 1.61503,8.73401 0.93145,18.07152 -1.51153,27.59211 -2.81485,8.52159 -9.07481,14.90009 -15.875,20.41064 -0.98147,6.60405 -0.94269,6.47393 -2.8349,10.48884 -5.90477,11.31517 -13.06111,13.95805 -18.616873,16.5918 -5.599281,1.63795 -10.434034,1.74685 -15.29848,1.91514 l 0.181157,-11.13638 c 2.334689,-0.31211 4.733838,-0.30191 6.830423,-1.80454 1.838528,-1.29054 2.59012,-2.79846 3.18562,-4.3376 1.170265,-4.15048 1.097036,-7.47196 -7.2e-5,-10.11086 -7.934118,-5.22706 -14.66656,-13.49545 -17.481399,-22.01704 -2.442979,-9.52059 -3.126557,-18.8581 -1.511535,-27.59211 4.59282,-17.63833 16.328014,-25.81768 31.466299,-26.64747 z"
|
||||
id="path5087" />
|
||||
<path
|
||||
style="display:inline;fill:none;stroke:#7c95b6;stroke-width:2.08333325;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 80.418363,185.02591 c 4.018619,-8.40248 10.790056,-6.52483 13.221605,0.12474"
|
||||
id="path5096" />
|
||||
<path
|
||||
id="path5118"
|
||||
d="m 128.11651,185.02591 c -4.01862,-8.40248 -10.79006,-6.52483 -13.22161,0.12474"
|
||||
style="display:inline;fill:none;stroke:#7c95b6;stroke-width:2.08333325;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.5 KiB |