blob: 62c64392679597a7edd2b2a7889c06a50c4f0c6c [file] [log] [blame]
Alexandre Lision40954dc2013-10-09 15:24:03 -04001package org.sflphone.model;
2
3import org.sflphone.R;
4
5import android.content.Context;
6import android.graphics.Bitmap;
7import android.graphics.Bitmap.Config;
8import android.graphics.BitmapFactory;
9import android.graphics.Canvas;
10import android.graphics.Paint;
Alexandre Lision40954dc2013-10-09 15:24:03 -040011import android.graphics.RectF;
12import android.util.Log;
Alexandre Lisiond9c3f7f2013-10-30 15:20:55 -040013import android.view.MotionEvent;
Alexandre Lision40954dc2013-10-09 15:24:03 -040014
15public class BubbleContact extends Bubble {
16
17 public SipCall associated_call;
Alexandre Lisionee2494d2013-10-09 17:14:00 -040018 Bitmap buttonMsg, buttonUnhold, buttonHold, buttonTransfer, buttonHangUp;
Alexandre Lision40954dc2013-10-09 15:24:03 -040019
Alexandre Lision68855472013-10-10 16:20:46 -040020 public interface drawerPosition {
21 int UNDEFINED = -1;
22 int TOP = 0;
23 int RIGHT = 1;
24 int BOTTOM = 2;
25 int LEFT = 3;
26 }
27
Alexandre Lision40954dc2013-10-09 15:24:03 -040028 public BubbleContact(Context context, SipCall call, float x, float y, float size) {
29 super(context, call.getContact(), x, y, size);
30 associated_call = call;
Alexandre Lision68855472013-10-10 16:20:46 -040031 setDrawer(new ActionDrawer(0, 0, drawerPosition.UNDEFINED));
Alexandre Lision40954dc2013-10-09 15:24:03 -040032 buttonMsg = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.ic_action_chat);
33 buttonHold = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.ic_action_pause_over_video);
Alexandre Lisionee2494d2013-10-09 17:14:00 -040034 buttonUnhold = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.ic_action_play_over_video);
Alexandre Lision40954dc2013-10-09 15:24:03 -040035 buttonTransfer = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.ic_action_forward);
36 buttonHangUp = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.ic_action_end_call);
37
38 }
39
40 @Override
41 public void expand(int width, int height) {
42
43 expanded = true;
44 generateBitmap();
45 if (pos.x < width / 3) {
46
Alexandre Lision68855472013-10-10 16:20:46 -040047 // Left
48 act = new ActionDrawer(width * 2 / 3, (int) (getRadius() * 1.5f), drawerPosition.LEFT);
49 act.adjustBounds(pos.x, pos.y);
Alexandre Lisiond9c3f7f2013-10-30 15:20:55 -040050 act.generateBitmap(actions.NOTHING);
Alexandre Lision40954dc2013-10-09 15:24:03 -040051
Alexandre Lision40954dc2013-10-09 15:24:03 -040052 } else if (pos.x > 2 * width / 3) {
Alexandre Lision68855472013-10-10 16:20:46 -040053 // Right
54 act = new ActionDrawer(width * 2 / 3, (int) (getRadius() * 1.5f), drawerPosition.RIGHT);
55 act.adjustBounds(pos.x, pos.y);
Alexandre Lisiond9c3f7f2013-10-30 15:20:55 -040056 act.generateBitmap(actions.NOTHING);
Alexandre Lision40954dc2013-10-09 15:24:03 -040057
58 } else {
59 // Middle of the screen
60 if (pos.y < height / 3) {
61 // Middle Top
62
Alexandre Lision68855472013-10-10 16:20:46 -040063 act = new ActionDrawer((int) (getRadius() * 1.5f), height / 2, drawerPosition.TOP);
64 act.adjustBounds(pos.x, pos.y);
Alexandre Lisiond9c3f7f2013-10-30 15:20:55 -040065 act.generateBitmap(actions.NOTHING);
Alexandre Lision40954dc2013-10-09 15:24:03 -040066
67 } else if (pos.y > 2 * height / 3) {
68 // Middle Bottom
69
Alexandre Lision68855472013-10-10 16:20:46 -040070 act = new ActionDrawer((int) (getRadius() * 1.5f), height / 2, drawerPosition.BOTTOM);
71 act.adjustBounds(pos.x, pos.y);
Alexandre Lisiond9c3f7f2013-10-30 15:20:55 -040072 act.generateBitmap(actions.NOTHING);
Alexandre Lision40954dc2013-10-09 15:24:03 -040073
Alexandre Lision40954dc2013-10-09 15:24:03 -040074 }
75 }
76
77 }
78
Alexandre Lisionee2494d2013-10-09 17:14:00 -040079 protected class ActionDrawer extends Bubble.ActionDrawer {
Alexandre Lision40954dc2013-10-09 15:24:03 -040080
Alexandre Lision68855472013-10-10 16:20:46 -040081 int direction;
Alexandre Lision40954dc2013-10-09 15:24:03 -040082 RectF boundsHoldButton, boundsMsgButton, boundsTransferButton, boundsHangUpButton;
Alexandre Lision5cd659e2013-10-29 13:18:23 -040083 private String TAG = ActionDrawer.class.getSimpleName();
Alexandre Lision40954dc2013-10-09 15:24:03 -040084
Alexandre Lision68855472013-10-10 16:20:46 -040085 public ActionDrawer(int w, int h, int dir) {
Alexandre Lision40954dc2013-10-09 15:24:03 -040086 super(w, h);
Alexandre Lision68855472013-10-10 16:20:46 -040087 direction = dir;
Alexandre Lision40954dc2013-10-09 15:24:03 -040088 }
Alexandre Lisionee2494d2013-10-09 17:14:00 -040089
Alexandre Lision40954dc2013-10-09 15:24:03 -040090 @Override
91 public int getAction(float x, float y) {
92
Alexandre Lision5cd659e2013-10-29 13:18:23 -040093 float relativeX = x - getDrawerBounds().left;
94 float relativeY = y - getDrawerBounds().top;
95
96
97 int result = actions.NOTHING;
98
99 if(!getDrawerBounds().contains(x, y) && !getBounds().contains(x, y)){
100 return actions.OUT_OF_BOUNDS;
101 }
Alexandre Lision40954dc2013-10-09 15:24:03 -0400102
103 if (boundsHoldButton.contains(relativeX, relativeY)) {
104 Log.i("Bubble", "Holding");
Alexandre Lision5cd659e2013-10-29 13:18:23 -0400105 result = actions.HOLD;
Alexandre Lision40954dc2013-10-09 15:24:03 -0400106 }
107
108 if (boundsMsgButton.contains(relativeX, relativeY)) {
109 Log.i("Bubble", "Msg");
Alexandre Lision5cd659e2013-10-29 13:18:23 -0400110 result = actions.MESSAGE;
Alexandre Lision40954dc2013-10-09 15:24:03 -0400111 }
112
113 if (boundsHangUpButton.contains(relativeX, relativeY)) {
114 Log.i("Bubble", "hangUp");
Alexandre Lision5cd659e2013-10-29 13:18:23 -0400115 result = actions.HANGUP;
Alexandre Lision40954dc2013-10-09 15:24:03 -0400116 }
117
118 if (boundsTransferButton.contains(relativeX, relativeY)) {
119 Log.i("Bubble", "Transfer");
Alexandre Lision5cd659e2013-10-29 13:18:23 -0400120 result = actions.TRANSFER;
Alexandre Lision40954dc2013-10-09 15:24:03 -0400121 }
Alexandre Lision5cd659e2013-10-29 13:18:23 -0400122
123
124
125 return result;
Alexandre Lision40954dc2013-10-09 15:24:03 -0400126
127 }
128
Alexandre Lisiond9c3f7f2013-10-30 15:20:55 -0400129 public void generateBitmap(int action) {
Alexandre Lision40954dc2013-10-09 15:24:03 -0400130
131 img = Bitmap.createBitmap(mWidth, mHeight, Config.ARGB_8888);
132 Paint paint = new Paint();
Alexandre Lisione5b66022013-10-30 11:34:15 -0400133 paint.setColor(mContext.getResources().getColor(R.color.sfl_blue_9));
Alexandre Lision40954dc2013-10-09 15:24:03 -0400134 Canvas c = new Canvas(img);
135 c.drawRect(new RectF(0, 0, mWidth, mHeight), paint);
Alexandre Lision68855472013-10-10 16:20:46 -0400136 float rHeight, rWidth;
137 int wHang, hHang;
138 int wHold, hHold;
139 int wMsg, hMsg;
140 int wTrans, hTrans;
Alexandre Lision40954dc2013-10-09 15:24:03 -0400141
142 Paint pButtons = new Paint();
Alexandre Lision68855472013-10-10 16:20:46 -0400143 switch (direction) {
144 case drawerPosition.TOP:
145 rHeight = bounds.height() - getRadius();
Alexandre Lision40954dc2013-10-09 15:24:03 -0400146 boundsHoldButton = new RectF(0, getRadius(), mWidth, getRadius() + rHeight / 4);
147 boundsMsgButton = new RectF(0, getRadius() + rHeight / 4, mWidth, getRadius() + 2 * rHeight / 4);
148 boundsTransferButton = new RectF(0, getRadius() + 2 * rHeight / 4, mWidth, getRadius() + 3 * rHeight / 4);
149 boundsHangUpButton = new RectF(0, getRadius() + 3 * rHeight / 4, mWidth, getRadius() + rHeight);
150
Alexandre Lision68855472013-10-10 16:20:46 -0400151 wHang = buttonHangUp.getWidth();
152 hHang = buttonHangUp.getHeight();
Alexandre Lisionee2494d2013-10-09 17:14:00 -0400153 c.drawBitmap(buttonHangUp, null, new RectF((int) boundsHangUpButton.centerX() - wHang / 2, (int) boundsHangUpButton.centerY() - hHang
154 / 2, (int) boundsHangUpButton.centerX() + wHang / 2, (int) boundsHangUpButton.centerY() + hHang / 2), pButtons);
155
Alexandre Lision68855472013-10-10 16:20:46 -0400156 wHold = buttonHold.getWidth();
157 hHold = buttonHold.getHeight();
158 if (associated_call.isOnHold()) {
159 c.drawBitmap(buttonUnhold, null, new RectF((int) boundsHoldButton.centerX() - wHold / 2, (int) boundsHoldButton.centerY() - hHold
160 / 2, (int) boundsHoldButton.centerX() + wHold / 2, (int) boundsHoldButton.centerY() + hHold / 2), pButtons);
Alexandre Lisionee2494d2013-10-09 17:14:00 -0400161 } else {
Alexandre Lision68855472013-10-10 16:20:46 -0400162 c.drawBitmap(buttonHold, null, new RectF((int) boundsHoldButton.centerX() - wHold / 2, (int) boundsHoldButton.centerY() - hHold
163 / 2, (int) boundsHoldButton.centerX() + wHold / 2, (int) boundsHoldButton.centerY() + hHold / 2), pButtons);
Alexandre Lisionee2494d2013-10-09 17:14:00 -0400164 }
Alexandre Lisionee2494d2013-10-09 17:14:00 -0400165
Alexandre Lision68855472013-10-10 16:20:46 -0400166 wMsg = buttonMsg.getWidth();
167 hMsg = buttonMsg.getHeight();
Alexandre Lisionee2494d2013-10-09 17:14:00 -0400168
169 c.drawBitmap(buttonMsg, null, new RectF((int) boundsMsgButton.centerX() - wMsg / 2, (int) boundsMsgButton.centerY() - hMsg / 2,
170 (int) boundsMsgButton.centerX() + wMsg / 2, (int) boundsMsgButton.centerY() + hMsg / 2), pButtons);
171
Alexandre Lision68855472013-10-10 16:20:46 -0400172 wTrans = buttonTransfer.getWidth();
173 hTrans = buttonTransfer.getHeight();
Alexandre Lision40954dc2013-10-09 15:24:03 -0400174
Alexandre Lisionee2494d2013-10-09 17:14:00 -0400175 c.drawBitmap(buttonTransfer, null, new RectF((int) boundsTransferButton.centerX() - wTrans / 2, (int) boundsTransferButton.centerY()
176 - hTrans / 2, (int) boundsTransferButton.centerX() + wTrans / 2, (int) boundsTransferButton.centerY() + hTrans / 2), pButtons);
Alexandre Lision68855472013-10-10 16:20:46 -0400177 break;
178 case drawerPosition.BOTTOM:
179 rHeight = bounds.height() - getRadius();
180 boundsHoldButton = new RectF(0, 0, mWidth, rHeight / 4);
181 boundsMsgButton = new RectF(0, rHeight / 4, mWidth, 2 * rHeight / 4);
182 boundsTransferButton = new RectF(0, 2 * rHeight / 4, mWidth, 3 * rHeight / 4);
183 boundsHangUpButton = new RectF(0, 3 * rHeight / 4, mWidth, rHeight);
184
185 wHang = buttonHangUp.getWidth();
186 hHang = buttonHangUp.getHeight();
187 c.drawBitmap(buttonHangUp, null, new RectF((int) boundsHangUpButton.centerX() - wHang / 2, (int) boundsHangUpButton.centerY() - hHang
188 / 2, (int) boundsHangUpButton.centerX() + wHang / 2, (int) boundsHangUpButton.centerY() + hHang / 2), pButtons);
189
190 wHold = buttonHold.getWidth();
191 hHold = buttonHold.getHeight();
192 if (associated_call.isOnHold()) {
193 c.drawBitmap(buttonUnhold, null, new RectF((int) boundsHoldButton.centerX() - wHold / 2, (int) boundsHoldButton.centerY() - hHold
194 / 2, (int) boundsHoldButton.centerX() + wHold / 2, (int) boundsHoldButton.centerY() + hHold / 2), pButtons);
195 } else {
196 c.drawBitmap(buttonHold, null, new RectF((int) boundsHoldButton.centerX() - wHold / 2, (int) boundsHoldButton.centerY() - hHold
197 / 2, (int) boundsHoldButton.centerX() + wHold / 2, (int) boundsHoldButton.centerY() + hHold / 2), pButtons);
198 }
199
200 wMsg = buttonMsg.getWidth();
201 hMsg = buttonMsg.getHeight();
202
203 c.drawBitmap(buttonMsg, null, new RectF((int) boundsMsgButton.centerX() - wMsg / 2, (int) boundsMsgButton.centerY() - hMsg / 2,
204 (int) boundsMsgButton.centerX() + wMsg / 2, (int) boundsMsgButton.centerY() + hMsg / 2), pButtons);
205
206 wTrans = buttonTransfer.getWidth();
207 hTrans = buttonTransfer.getHeight();
208
209 c.drawBitmap(buttonTransfer, null, new RectF((int) boundsTransferButton.centerX() - wTrans / 2, (int) boundsTransferButton.centerY()
210 - hTrans / 2, (int) boundsTransferButton.centerX() + wTrans / 2, (int) boundsTransferButton.centerY() + hTrans / 2), pButtons);
211 break;
212 case drawerPosition.RIGHT:
213 rWidth = bounds.width() - getRadius();
214 boundsHoldButton = new RectF(0, 0, rWidth / 4, mHeight);
215 boundsMsgButton = new RectF(rWidth / 4, 0, 2 * rWidth / 4, mHeight);
216 boundsTransferButton = new RectF(2 * rWidth / 4, 0, 3 * rWidth / 4, mHeight);
217 boundsHangUpButton = new RectF(3 * rWidth / 4, 0, rWidth, mHeight);
218
219 wHang = buttonHangUp.getWidth();
220 hHang = buttonHangUp.getHeight();
221 c.drawBitmap(buttonHangUp, null, new RectF((int) boundsHangUpButton.centerX() - wHang / 2, (int) boundsHangUpButton.centerY() - hHang
222 / 2, (int) boundsHangUpButton.centerX() + wHang / 2, (int) boundsHangUpButton.centerY() + hHang / 2), pButtons);
223
224 wHold = buttonHold.getWidth();
225 hHold = buttonHold.getHeight();
226 if (associated_call.isOnHold()) {
227 c.drawBitmap(buttonUnhold, null, new RectF((int) boundsHoldButton.centerX() - wHold / 2, (int) boundsHoldButton.centerY() - hHold
228 / 2, (int) boundsHoldButton.centerX() + wHold / 2, (int) boundsHoldButton.centerY() + hHold / 2), pButtons);
229 } else {
230 c.drawBitmap(buttonHold, null, new RectF((int) boundsHoldButton.centerX() - wHold / 2, (int) boundsHoldButton.centerY() - hHold
231 / 2, (int) boundsHoldButton.centerX() + wHold / 2, (int) boundsHoldButton.centerY() + hHold / 2), pButtons);
232 }
233
234 wMsg = buttonMsg.getWidth();
235 hMsg = buttonMsg.getHeight();
236
237 c.drawBitmap(buttonMsg, null, new RectF((int) boundsMsgButton.centerX() - wMsg / 2, (int) boundsMsgButton.centerY() - hMsg / 2,
238 (int) boundsMsgButton.centerX() + wMsg / 2, (int) boundsMsgButton.centerY() + hMsg / 2), pButtons);
239
240 wTrans = buttonTransfer.getWidth();
241 hTrans = buttonTransfer.getHeight();
242
243 c.drawBitmap(buttonTransfer, null, new RectF((int) boundsTransferButton.centerX() - wTrans / 2, (int) boundsTransferButton.centerY()
244 - hTrans / 2, (int) boundsTransferButton.centerX() + wTrans / 2, (int) boundsTransferButton.centerY() + hTrans / 2), pButtons);
245 break;
246 case drawerPosition.LEFT:
247 rWidth = bounds.width() - getRadius();
248 boundsHoldButton = new RectF(getRadius(), 0, getRadius() + rWidth / 4, mHeight);
249 boundsMsgButton = new RectF(getRadius() + rWidth / 4, 0, getRadius() + 2 * rWidth / 4, mHeight);
250 boundsTransferButton = new RectF(getRadius() + 2 * rWidth / 4, 0, getRadius() + 3 * rWidth / 4, mHeight);
251 boundsHangUpButton = new RectF(getRadius() + 3 * rWidth / 4, 0, getRadius() + rWidth, mHeight);
252
253 wHang = buttonHangUp.getWidth();
254 hHang = buttonHangUp.getHeight();
255 c.drawBitmap(buttonHangUp, null, new RectF((int) boundsHangUpButton.centerX() - wHang / 2, (int) boundsHangUpButton.centerY() - hHang
256 / 2, (int) boundsHangUpButton.centerX() + wHang / 2, (int) boundsHangUpButton.centerY() + hHang / 2), pButtons);
257
258 wHold = buttonHold.getWidth();
259 hHold = buttonHold.getHeight();
260 if (associated_call.isOnHold()) {
261 c.drawBitmap(buttonUnhold, null, new RectF((int) boundsHoldButton.centerX() - wHold / 2, (int) boundsHoldButton.centerY() - hHold
262 / 2, (int) boundsHoldButton.centerX() + wHold / 2, (int) boundsHoldButton.centerY() + hHold / 2), pButtons);
263 } else {
264 c.drawBitmap(buttonHold, null, new RectF((int) boundsHoldButton.centerX() - wHold / 2, (int) boundsHoldButton.centerY() - hHold
265 / 2, (int) boundsHoldButton.centerX() + wHold / 2, (int) boundsHoldButton.centerY() + hHold / 2), pButtons);
266 }
267
268 wMsg = buttonMsg.getWidth();
269 hMsg = buttonMsg.getHeight();
270
271 c.drawBitmap(buttonMsg, null, new RectF((int) boundsMsgButton.centerX() - wMsg / 2, (int) boundsMsgButton.centerY() - hMsg / 2,
272 (int) boundsMsgButton.centerX() + wMsg / 2, (int) boundsMsgButton.centerY() + hMsg / 2), pButtons);
273
274 wTrans = buttonTransfer.getWidth();
275 hTrans = buttonTransfer.getHeight();
276
277 c.drawBitmap(buttonTransfer, null, new RectF((int) boundsTransferButton.centerX() - wTrans / 2, (int) boundsTransferButton.centerY()
278 - hTrans / 2, (int) boundsTransferButton.centerX() + wTrans / 2, (int) boundsTransferButton.centerY() + hTrans / 2), pButtons);
279 break;
Alexandre Lision40954dc2013-10-09 15:24:03 -0400280 }
281
282 }
283
Alexandre Lision68855472013-10-10 16:20:46 -0400284 public void adjustBounds(float x, float y) {
285 switch (direction) {
286 case drawerPosition.TOP:
287 setBounds(x - getRadius(), y, x + getRadius(), y + getHeight());
288 break;
289 case drawerPosition.BOTTOM:
290 setBounds(x - getRadius(), y - getHeight(), x + getRadius(), y);
291 break;
292 case drawerPosition.RIGHT:
293 setBounds(x - getWidth(), y - getRadius(), x, y + +getRadius());
294 break;
295 case drawerPosition.LEFT:
296 setBounds(x, y - getRadius(), x + getWidth(), y + getRadius());
297 break;
298 }
299
300 }
301
302 @Override
303 public void setBounds(float left, float top, float right, float bottom) {
304 int margin = (int) (0.5f * getRadius()) / 2;
305 switch (direction) {
306 case drawerPosition.TOP:
307 case drawerPosition.BOTTOM:
308 super.setBounds(left + margin, top, right - margin, bottom);
309 break;
310 case drawerPosition.RIGHT:
311 case drawerPosition.LEFT:
312 super.setBounds(left, top + margin, right, bottom - margin);
313 break;
314 }
315
316 }
Alexandre Lision40954dc2013-10-09 15:24:03 -0400317 }
318
319 public Bitmap getDrawerBitmap() {
320 return act.getBitmap();
321 }
322
323 public RectF getDrawerBounds() {
Alexandre Lision5cd659e2013-10-29 13:18:23 -0400324 return act.getDrawerBounds();
Alexandre Lision40954dc2013-10-09 15:24:03 -0400325 }
326
327 @Override
328 public void set(float x, float y, float s) {
329 scale = s;
330 pos.x = x;
331 pos.y = y;
332 if (!expanded) {
333 bounds.set(pos.x - getRadius(), pos.y - getRadius(), pos.x + getRadius(), pos.y + getRadius());
334 } else {
335 bounds.set(pos.x - getRadius(), pos.y - getRadius(), pos.x + getRadius(), pos.y + getRadius());
Alexandre Lision68855472013-10-10 16:20:46 -0400336 act.adjustBounds(pos.x, pos.y);
Alexandre Lision40954dc2013-10-09 15:24:03 -0400337 }
338 }
339
340 @Override
341 public int getRadius() {
Alexandre Lisiona9485b82013-10-25 10:00:57 -0400342 if(expanded)
343 return (int) (radius * density);
Alexandre Lision40954dc2013-10-09 15:24:03 -0400344 return (int) (radius * scale * density);
345 }
346
Alexandre Lision40954dc2013-10-09 15:24:03 -0400347 @Override
348 public boolean getHoldStatus() {
349 if (associated_call.isOnHold())
350 return true;
351 else
352 return false;
353 }
354
355 @Override
356 public boolean getRecordStatus() {
357 if (associated_call.isRecording())
358 return true;
359 else
360 return false;
361 }
362
Alexandre Lision40954dc2013-10-09 15:24:03 -0400363 public SipCall getCall() {
364 return associated_call;
365 }
366
Alexandre Lisionee2494d2013-10-09 17:14:00 -0400367 public void setCall(SipCall call) {
368 associated_call = call;
Alexandre Lision68855472013-10-10 16:20:46 -0400369 if (expanded) {
Alexandre Lisiond9c3f7f2013-10-30 15:20:55 -0400370 act.generateBitmap(actions.NOTHING);
Alexandre Lisionee2494d2013-10-09 17:14:00 -0400371 }
Alexandre Lision68855472013-10-10 16:20:46 -0400372
Alexandre Lisionee2494d2013-10-09 17:14:00 -0400373 }
374
375 @Override
Alexandre Lision68855472013-10-10 16:20:46 -0400376 public String getName() {
377 return associated_call.getContact().getmDisplayName();
378 }
379
380 @Override
381 public boolean callIDEquals(String call) {
382 return associated_call.getCallId().contentEquals(call);
383 }
384
385 @Override
386 public String getCallID() {
387 return associated_call.getCallId();
Alexandre Lisionee2494d2013-10-09 17:14:00 -0400388 }
Alexandre Lisiond9c3f7f2013-10-30 15:20:55 -0400389
390 @Override
391 public boolean onDown(MotionEvent event) {
392 if (intersects(event.getX(), event.getY()) && !expanded) {
393 dragged = true;
394 last_drag = System.nanoTime();
395 setPos(event.getX(), event.getY());
396 target_scale = .8f;
397 return true;
398 }
399 return false;
400 }
Alexandre Lisionee2494d2013-10-09 17:14:00 -0400401
Alexandre Lision40954dc2013-10-09 15:24:03 -0400402}