v0.6.0: bubble for Android 0.6.0 — the house look on the Rabbit, and a stretchy pull-to-refresh that pops
Desktop: Signal vibes or travewave, chosen in Preferences → Appearance. Rabbit: white on pure black, 22/28/32 sp text, outlined buttons and dim-edged text boxes, and drawn icons instead of emoji (rabbit.html). Pulling the chat list further once the search box shows stretches a bubble that pops at the mark and starts the check, then a spinner until it's done.
This commit is contained in:
@@ -37,7 +37,7 @@ final class AttachBubble extends View {
|
||||
}
|
||||
|
||||
static final int CAMERA = 0, PHOTO = 1, VOICE = 2;
|
||||
private static final String[] GLYPHS = {"📷", "🎨", "🎤"};
|
||||
private static final Glyph.Kind[] GLYPHS = {Glyph.Kind.CAMERA, Glyph.Kind.PHOTO, Glyph.Kind.MIC};
|
||||
private static final String[] LABELS = {"Camera", "Photo", "Voice note"};
|
||||
|
||||
// Physics, in dp and seconds (tuned offline: fanned out by ~180 ms, at rest by ~500 ms).
|
||||
@@ -101,7 +101,7 @@ final class AttachBubble extends View {
|
||||
panel.setColor(Ui.PANEL);
|
||||
scrim.setColor(0x33000000);
|
||||
disk.setColor(Ui.INPUT);
|
||||
glyph.setTextSize(34 * dp);
|
||||
glyph.setColor(Ui.TEXT);
|
||||
glyph.setTextAlign(Paint.Align.CENTER);
|
||||
label.setTextSize(20 * dp);
|
||||
label.setTextAlign(Paint.Align.CENTER);
|
||||
@@ -334,7 +334,6 @@ final class AttachBubble extends View {
|
||||
}
|
||||
|
||||
// The icons, then the clip drawn again on top so they come out from under it.
|
||||
Paint.FontMetrics fm = glyph.getFontMetrics();
|
||||
if (selected >= 0) ringT = Math.min(1, ringT + dt / 0.16f);
|
||||
float pop = 1 - (1 - ringT) * (1 - ringT);
|
||||
for (int i = 0; i < n; i++) {
|
||||
@@ -355,7 +354,7 @@ final class AttachBubble extends View {
|
||||
glyph.setAlpha((int) (255 * s));
|
||||
c.save();
|
||||
c.scale(s, s, x, y);
|
||||
c.drawText(GLYPHS[i], x, y - (fm.ascent + fm.descent) / 2, glyph);
|
||||
Glyph.draw(c, GLYPHS[i], x, y, 44 * dp, glyph);
|
||||
c.restore();
|
||||
}
|
||||
int[] at = new int[2], me = new int[2];
|
||||
|
||||
Reference in New Issue
Block a user