Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2020-10-26 10:03:19 +01:00 committed by Andy Scherzinger
parent 0bb5ad643f
commit bff08bbc17
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
11 changed files with 28 additions and 21 deletions

View file

@ -0,0 +1,6 @@
<svg width="24" height="24" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none" />
<path
d="m12 2c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10zm0 4a6 6 0 0 1 6 6 6 6 0 0 1-6 6 6 6 0 0 1-6-6 6 6 0 0 1 6-6z"
fill="#ffffff" />
</svg>

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View file

@ -46,7 +46,7 @@ class SetStatusDialogFragmentIT : AbstractIT() {
PredefinedStatus("commuting", "🚌", "Commuting", ClearAt("period", "1800")), PredefinedStatus("commuting", "🚌", "Commuting", ClearAt("period", "1800")),
PredefinedStatus("remote-work", "🏡", "Working remotely", ClearAt("end-of", "day")), PredefinedStatus("remote-work", "🏡", "Working remotely", ClearAt("end-of", "day")),
PredefinedStatus("sick-leave", "🤒", "Out sick", ClearAt("end-of", "day")), PredefinedStatus("sick-leave", "🤒", "Out sick", ClearAt("end-of", "day")),
PredefinedStatus("vacationing", "🌴", "Vacationing", null) PredefinedStatus("vacationing", "🌴", "Vacationing", ClearAt("", "")) // switch to null
) )
shortSleep() shortSleep()

View file

@ -161,32 +161,32 @@ public class DialogFragmentIT extends AbstractIT {
OwnCloudVersion.nextcloud_20))); OwnCloudVersion.nextcloud_20)));
FileDisplayActivity activity = showDialog(sut); FileDisplayActivity activity = showDialog(sut);
activity.runOnUiThread(() -> sut.setStatus(new Status(StatusType.dnd, activity.runOnUiThread(() -> sut.setStatus(new Status(StatusType.DND,
"Busy fixing 🐛…", "Busy fixing 🐛…",
"", "",
-1))); -1)));
shortSleep(); shortSleep();
screenshot(sut, "dnd"); screenshot(sut, "dnd");
activity.runOnUiThread(() -> sut.setStatus(new Status(StatusType.online, activity.runOnUiThread(() -> sut.setStatus(new Status(StatusType.ONLINE,
"", "",
"", "",
-1))); -1)));
shortSleep(); shortSleep();
screenshot(sut, "online"); screenshot(sut, "online");
activity.runOnUiThread(() -> sut.setStatus(new Status(StatusType.online, activity.runOnUiThread(() -> sut.setStatus(new Status(StatusType.ONLINE,
"Let's have some fun", "Let's have some fun",
"🎉", "🎉",
-1))); -1)));
shortSleep(); shortSleep();
screenshot(sut, "fun"); screenshot(sut, "fun");
activity.runOnUiThread(() -> sut.setStatus(new Status(StatusType.offline, "", "", -1))); activity.runOnUiThread(() -> sut.setStatus(new Status(StatusType.OFFLINE, "", "", -1)));
shortSleep(); shortSleep();
screenshot(sut, "offline"); screenshot(sut, "offline");
activity.runOnUiThread(() -> sut.setStatus(new Status(StatusType.away, "Vacation", "🌴", -1))); activity.runOnUiThread(() -> sut.setStatus(new Status(StatusType.AWAY, "Vacation", "🌴", -1)));
shortSleep(); shortSleep();
screenshot(sut, "away"); screenshot(sut, "away");
} }

View file

@ -80,98 +80,98 @@ class AvatarIT : AbstractIT() {
runOnUiThread { runOnUiThread {
fragment.addBitmap( fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(paulette, StatusType.online, "😘", targetContext), BitmapUtils.createAvatarWithStatus(paulette, StatusType.ONLINE, "😘", targetContext),
width * 2, width * 2,
1, 1,
targetContext targetContext
) )
fragment.addBitmap( fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(christine, StatusType.online, "☁️", targetContext), BitmapUtils.createAvatarWithStatus(christine, StatusType.ONLINE, "☁️", targetContext),
width * 2, width * 2,
1, 1,
targetContext targetContext
) )
fragment.addBitmap( fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(christine, StatusType.online, "🌴️", targetContext), BitmapUtils.createAvatarWithStatus(christine, StatusType.ONLINE, "🌴️", targetContext),
width * 2, width * 2,
1, 1,
targetContext targetContext
) )
fragment.addBitmap( fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(christine, StatusType.online, "", targetContext), BitmapUtils.createAvatarWithStatus(christine, StatusType.ONLINE, "", targetContext),
width * 2, width * 2,
1, 1,
targetContext targetContext
) )
fragment.addBitmap( fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(paulette, StatusType.dnd, "", targetContext), BitmapUtils.createAvatarWithStatus(paulette, StatusType.DND, "", targetContext),
width * 2, width * 2,
1, 1,
targetContext targetContext
) )
fragment.addBitmap( fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(christine, StatusType.away, "", targetContext), BitmapUtils.createAvatarWithStatus(christine, StatusType.AWAY, "", targetContext),
width * 2, width * 2,
1, 1,
targetContext targetContext
) )
fragment.addBitmap( fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(paulette, StatusType.offline, "", targetContext), BitmapUtils.createAvatarWithStatus(paulette, StatusType.OFFLINE, "", targetContext),
width * 2, width * 2,
1, 1,
targetContext targetContext
) )
fragment.addBitmap( fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.online, "😘", targetContext), BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.ONLINE, "😘", targetContext),
width, width,
2, 2,
targetContext targetContext
) )
fragment.addBitmap( fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.online, "☁️", targetContext), BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.ONLINE, "☁️", targetContext),
width, width,
2, 2,
targetContext targetContext
) )
fragment.addBitmap( fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.online, "🌴️", targetContext), BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.ONLINE, "🌴️", targetContext),
width, width,
2, 2,
targetContext targetContext
) )
fragment.addBitmap( fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.online, "", targetContext), BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.ONLINE, "", targetContext),
width, width,
2, 2,
targetContext targetContext
) )
fragment.addBitmap( fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.dnd, "", targetContext), BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.DND, "", targetContext),
width, width,
2, 2,
targetContext targetContext
) )
fragment.addBitmap( fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.away, "", targetContext), BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.AWAY, "", targetContext),
width, width,
2, 2,
targetContext targetContext
) )
fragment.addBitmap( fragment.addBitmap(
BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.offline, "", targetContext), BitmapUtils.createAvatarWithStatus(textBitmap, StatusType.OFFLINE, "", targetContext),
width, width,
2, 2,
targetContext targetContext

View file

@ -28,6 +28,7 @@ import com.owncloud.android.lib.resources.users.PredefinedStatus
class PredefinedStatusViewHolder(private val binding: PredefinedStatusBinding) : RecyclerView.ViewHolder(binding.root) { class PredefinedStatusViewHolder(private val binding: PredefinedStatusBinding) : RecyclerView.ViewHolder(binding.root) {
fun bind(status: PredefinedStatus) { fun bind(status: PredefinedStatus) {
binding.icon.text = status.icon
binding.name.text = status.message binding.name.text = status.message
binding.clearAt.text = status.clearAt?.time // TODO better binding.clearAt.text = status.clearAt?.time // TODO better
} }

View file

@ -26,7 +26,7 @@
android:layout_height="48dp"> android:layout_height="48dp">
<TextView <TextView
android:id="@+id/imageView" android:id="@+id/icon"
android:layout_width="48dp" android:layout_width="48dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:textSize="25sp" android:textSize="25sp"