* #26597 Better support for sizes and densities
diff --git a/src/com/savoirfairelinux/sflphone/model/Bubble.java b/src/com/savoirfairelinux/sflphone/model/Bubble.java
index 7d9bf2c..927f446 100644
--- a/src/com/savoirfairelinux/sflphone/model/Bubble.java
+++ b/src/com/savoirfairelinux/sflphone/model/Bubble.java
@@ -35,7 +35,7 @@
public long last_drag;
public boolean expanded; // determine if we draw the buttons around the bubble
private Bitmap saved_photo;
- private float expanded_radius = 250;
+ private float expanded_radius;
public void setAttractor(PointF attractor) {
this.attractor = attractor;
@@ -56,6 +56,7 @@
associated_call = call;
pos.set(x, y);
radius = internalBMP.getWidth() / 2;
+ expanded_radius = (float) (size * 1.5);
bounds = new RectF(pos.x - radius, pos.y - radius, pos.x + radius, pos.y + radius);
attractor = new PointF(x, y);
@@ -142,9 +143,8 @@
this.density = density;
}
- public void expand(int i) {
+ public void expand() {
- expanded_radius = i;
expanded = true;
internalBMP = Bitmap.createScaledBitmap(saved_photo, (int) (2 * radius), (int) (2 * radius), false);
@@ -260,4 +260,26 @@
}
return 0;
}
+
+ /**
+ * Always return the normal radius of the bubble
+ * @return
+ */
+ public float getRetractedRadius() {
+ return radius;
+ }
+
+ public int getHoldStatus() {
+ if(associated_call.isOnHold())
+ return R.string.action_call_unhold;
+ else
+ return R.string.action_call_hold;
+ }
+
+ public int getRecordStatus() {
+ if(associated_call.isRecording())
+ return R.string.action_call_stop_record;
+ else
+ return R.string.action_call_record;
+ }
}