(Graphics g)
| 210 | } |
| 211 | |
| 212 | @Override |
| 213 | public void drawOverlay(Graphics g) { |
| 214 | //draw swipe bar |
| 215 | float dx = SWIPE_BAR_HEIGHT * 0.7f; |
| 216 | float startX = dx * 0.7f; |
| 217 | float x = startX; |
| 218 | float y = getHeight() - (totalHeight + getBottomMargin()) * revealPercent - SWIPE_BAR_HEIGHT; |
| 219 | float w = getWidth(); |
| 220 | float dotRadius = SWIPE_BAR_HEIGHT / 6; |
| 221 | float dotTop = y + SWIPE_BAR_HEIGHT / 2; |
| 222 | int dotCount = 3; |
| 223 | g.fillRect(getSwipeBarColor(), 0, y, w, SWIPE_BAR_HEIGHT); |
| 224 | for (int i = 0; i < dotCount; i++) { |
| 225 | g.fillCircle(getSwipeBarDotColor(), x, dotTop, dotRadius); |
| 226 | x += dx; |
| 227 | } |
| 228 | x = w - startX; |
| 229 | for (int i = 0; i < dotCount; i++) { |
| 230 | g.fillCircle(getBorderColor(), x, dotTop, dotRadius); |
| 231 | x -= dx; |
| 232 | } |
| 233 | g.drawLine(BORDER_THICKNESS, getBorderColor(), 0, y, w, y); |
| 234 | |
| 235 | if (revealPercent == 0) { return; } //skip rest if hidden |
| 236 | |
| 237 | y += SWIPE_BAR_HEIGHT; |
| 238 | g.drawLine(BORDER_THICKNESS, getBorderColor(), 0, y, w, y); |
| 239 | |
| 240 | //draw border above prompt |
| 241 | y = prompt.getTop(); |
| 242 | if (btnMiddle != null && !title.isEmpty()) { //render title above prompt if middle button present |
| 243 | y -= MSG_HEIGHT; |
| 244 | g.fillRect(VPrompt.getBackColor(), 0, y, w, MSG_HEIGHT); |
| 245 | g.drawText(title, VPrompt.FONT, VPrompt.getForeColor(), 0, y, w, MSG_HEIGHT, false, Align.center, true); |
| 246 | } |
| 247 | g.drawLine(BORDER_THICKNESS, getBorderColor(), 0, y, w, y); |
| 248 | } |
| 249 | |
| 250 | @Override |
| 251 | public boolean fling(float velocityX, float velocityY) { |
no test coverage detected