Project

General

Profile

Download (21.4 KB) Statistics
| Branch: | Tag: | Revision:

magiccube / src / main / java / org / distorted / states / RubikStatePlay.java @ 40c8c5fa

1
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2020 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Magic Cube.                                                              //
5
//                                                                                               //
6
// Magic Cube is free software: you can redistribute it and/or modify                            //
7
// it under the terms of the GNU General Public License as published by                          //
8
// the Free Software Foundation, either version 2 of the License, or                             //
9
// (at your option) any later version.                                                           //
10
//                                                                                               //
11
// Magic Cube is distributed in the hope that it will be useful,                                 //
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
14
// GNU General Public License for more details.                                                  //
15
//                                                                                               //
16
// You should have received a copy of the GNU General Public License                             //
17
// along with Magic Cube.  If not, see <http://www.gnu.org/licenses/>.                           //
18
///////////////////////////////////////////////////////////////////////////////////////////////////
19

    
20
package org.distorted.states;
21

    
22
import android.content.Context;
23
import android.content.SharedPreferences;
24
import android.graphics.drawable.BitmapDrawable;
25
import android.os.Build;
26
import android.os.Bundle;
27
import android.util.DisplayMetrics;
28
import android.util.TypedValue;
29
import android.view.Gravity;
30
import android.view.LayoutInflater;
31
import android.view.View;
32
import android.view.ViewGroup;
33
import android.widget.AdapterView;
34
import android.widget.ArrayAdapter;
35
import android.widget.Button;
36
import android.widget.ImageButton;
37
import android.widget.LinearLayout;
38
import android.widget.PopupWindow;
39
import android.widget.TextView;
40

    
41
import androidx.annotation.NonNull;
42
import androidx.appcompat.widget.AppCompatSpinner;
43

    
44
import org.distorted.dialogs.RubikDialogAbout;
45
import org.distorted.dialogs.RubikDialogScores;
46
import org.distorted.main.R;
47
import org.distorted.main.RubikActivity;
48
import org.distorted.main.RubikPreRender;
49
import org.distorted.objects.RubikObject;
50
import org.distorted.objects.RubikObjectList;
51

    
52
import java.util.ArrayList;
53

    
54
///////////////////////////////////////////////////////////////////////////////////////////////////
55

    
56
public class RubikStatePlay extends RubikStateAbstract implements AdapterView.OnItemSelectedListener,
57
                                                                  RubikPreRender.ActionFinishedListener
58
  {
59
  private static final int DURATION_MILLIS = 750;
60
  private static final int DEF_LEVEL =  1;
61
  public  static final int DEF_OBJECT= RubikObjectList.CUBE.ordinal();
62
  public  static final int DEF_SIZE  =  3;
63

    
64
  private static int[] BUTTON_LABELS = { R.string.scores, R.string.patterns, R.string.solver, R.string.about };
65
  private static final int NUM_BUTTONS = BUTTON_LABELS.length;
66

    
67
  private ImageButton mObjButton, mMenuButton, mPrevButton, mSolveButton;
68
  private Button mPlayButton;
69
  private PopupWindow mObjectPopup, mMenuPopup;
70
  private int mObject = DEF_OBJECT;
71
  private int mSize   = DEF_SIZE;
72
  private int mObjectLayoutWidth, mMenuLayoutHeight;
73
  private LinearLayout mObjectLayout, mMenuLayout;
74
  private AppCompatSpinner mLevelSpinner;
75
  private ArrayAdapter<String> mSpinnerAdapter;
76
  private int mLevelValue;
77
  private float mButtonSize, mTitleSize;
78

    
79
  private ArrayList<Move> mMoves;
80
  private boolean mCanPrevMove;
81

    
82
  private static class Move
83
    {
84
    private int mAxis, mRow, mAngle;
85

    
86
    Move(int axis, int row, int angle)
87
      {
88
      mAxis = axis;
89
      mRow  = row;
90
      mAngle= angle;
91
      }
92
    }
93

    
94
///////////////////////////////////////////////////////////////////////////////////////////////////
95

    
96
  void leaveState(RubikActivity act)
97
    {
98

    
99
    }
100

    
101
///////////////////////////////////////////////////////////////////////////////////////////////////
102

    
103
  void enterState(final RubikActivity act)
104
    {
105
    DisplayMetrics metrics = act.getResources().getDisplayMetrics();
106
    final float scale = metrics.density;
107

    
108
    float width = act.getScreenWidthInPixels();
109
    mButtonSize = width*RubikActivity.BUTTON_TEXT_SIZE;
110
    mTitleSize  = width*RubikActivity.TITLE_TEXT_SIZE;
111

    
112
    mCanPrevMove = true;
113

    
114
    if( mMoves==null ) mMoves = new ArrayList<>();
115
    else               mMoves.clear();
116

    
117
    // TOP ////////////////////////////
118
    LinearLayout layoutTop = act.findViewById(R.id.upperBar);
119
    layoutTop.removeAllViews();
120

    
121
    setupObjectButton(act,scale);
122
    layoutTop.addView(mObjButton);
123
    setupLevelSpinner(act,scale);
124
    layoutTop.addView(mLevelSpinner);
125
    setupPlayButton(act,scale);
126
    layoutTop.addView(mPlayButton);
127

    
128
    setupObjectWindow(act, scale);
129

    
130
    // BOT ////////////////////////////
131

    
132
    LinearLayout layoutLeft = act.findViewById(R.id.mainBarLeft);
133
    layoutLeft.removeAllViews();
134

    
135
    setupPrevButton(act,scale,width);
136
    layoutLeft.addView(mPrevButton);
137
    setupSolveButton(act,scale,width);
138
    layoutLeft.addView(mSolveButton);
139

    
140
    LinearLayout layoutRight = act.findViewById(R.id.mainBarRight);
141
    layoutRight.removeAllViews();
142

    
143
    setupMenuButton(act,scale);
144
    layoutRight.addView(mMenuButton);
145

    
146
    setupMenuWindow(act, scale);
147
    }
148

    
149
///////////////////////////////////////////////////////////////////////////////////////////////////
150

    
151
  private void setupObjectButton(final RubikActivity act, final float scale)
152
    {
153
    int padding = (int)(3*scale + 0.5f);
154
    LinearLayout.LayoutParams objectParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT, 1.2f);
155
    mObjButton = new ImageButton(act);
156
    mObjButton.setLayoutParams(objectParams);
157
    mObjButton.setPadding(padding,0,padding,0);
158
    mObjButton.setImageResource(R.drawable.cube_menu);
159

    
160
    mObjButton.setOnClickListener( new View.OnClickListener()
161
      {
162
      @Override
163
      public void onClick(View view)
164
        {
165
        if( act.getPreRender().canPlay() )
166
          {
167
          int total = RubikObjectList.getTotal();
168
          boolean vertical = act.isVertical();
169
          mObjectLayout.setOrientation(vertical ? LinearLayout.VERTICAL:LinearLayout.HORIZONTAL);
170

    
171
          int width  = view.getWidth();
172
          int layhei = mObjectLayoutWidth * (vertical? total:1);
173
          int laywid = mObjectLayoutWidth * (vertical? 1:total);
174

    
175
          mObjectPopup.showAsDropDown(view, (width-laywid)/2, 0, Gravity.LEFT);
176

    
177
          if( android.os.Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP_MR1 )
178
            {
179
            mObjectPopup.update(view, laywid, layhei);
180
            }
181
          }
182
        }
183
      });
184
    }
185

    
186
///////////////////////////////////////////////////////////////////////////////////////////////////
187

    
188
  private void setupLevelSpinner(final RubikActivity act, final float scale)
189
    {
190
    int padding = (int)(scale* 10 + 0.5f);
191
    int margin  = (int)(scale*  3 + 0.5f);
192
    LinearLayout.LayoutParams spinnerLayoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT, 1.0f);
193
    spinnerLayoutParams.topMargin    = margin;
194
    spinnerLayoutParams.bottomMargin = margin;
195
    spinnerLayoutParams.leftMargin   = margin;
196
    spinnerLayoutParams.rightMargin  = margin;
197

    
198
    mLevelSpinner = new AppCompatSpinner(act);
199
    mLevelSpinner.setLayoutParams(spinnerLayoutParams);
200
    mLevelSpinner.setPadding(padding,0,padding,0);
201
    mLevelSpinner.setBackgroundResource(R.drawable.spinner);
202
    mLevelSpinner.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
203

    
204
    mLevelSpinner.setOnItemSelectedListener(this);
205
    int sizeIndex = RubikObjectList.getSizeIndex(mObject,mSize);
206
    int maxLevel = RubikObjectList.getMaxLevel(mObject, sizeIndex);
207
    String[] levels = new String[maxLevel];
208

    
209
    for(int i=0; i<maxLevel; i++)
210
      {
211
      levels[i] = act.getString(R.string.lv_placeholder,i+1);
212
      }
213

    
214
    if( mLevelValue>maxLevel ) mLevelValue=1;
215

    
216
    mSpinnerAdapter = new ArrayAdapter<String>(act, android.R.layout.simple_spinner_item, levels)
217
      {
218
      @NonNull
219
      public View getView(int position, View convertView, @NonNull ViewGroup parent)
220
        {
221
        View v = super.getView(position, convertView, parent);
222
        TextView tv = ((TextView) v);
223
        tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, mButtonSize);
224
        return v;
225
        }
226
      };
227

    
228
    mSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
229
    mLevelSpinner.setAdapter(mSpinnerAdapter);
230
    mLevelSpinner.setSelection(mLevelValue-1);
231
    }
232

    
233
///////////////////////////////////////////////////////////////////////////////////////////////////
234

    
235
  private void setupPlayButton(final RubikActivity act, final float scale)
236
    {
237
    int padding = (int)(3*scale + 0.5f);
238
    LinearLayout.LayoutParams backParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT, 1.2f);
239
    mPlayButton = new Button(act);
240
    mPlayButton.setLayoutParams(backParams);
241
    mPlayButton.setPadding(padding,0,padding,0);
242
    mPlayButton.setTextSize(TypedValue.COMPLEX_UNIT_PX, mButtonSize);
243
    mPlayButton.setText(R.string.play);
244

    
245
    mPlayButton.setOnClickListener( new View.OnClickListener()
246
      {
247
      @Override
248
      public void onClick(View v)
249
        {
250
        act.getPreRender().scrambleObject(mLevelValue);
251
        }
252
      });
253
    }
254

    
255
///////////////////////////////////////////////////////////////////////////////////////////////////
256

    
257
  private void setupMenuButton(final RubikActivity act, final float scale)
258
    {
259
    int padding = (int)(3*scale + 0.5f);
260
    LinearLayout.LayoutParams objectParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);
261
    mMenuButton = new ImageButton(act);
262
    mMenuButton.setLayoutParams(objectParams);
263
    mMenuButton.setPadding(padding,0,padding,0);
264
    mMenuButton.setImageResource(R.drawable.menu);
265

    
266
    mMenuButton.setOnClickListener( new View.OnClickListener()
267
      {
268
      @Override
269
      public void onClick(View view)
270
        {
271
        if( act.getPreRender().canPlay() )
272
          {
273
          int total = RubikObjectList.getTotal();
274
          boolean vertical = act.isVertical();
275
          mMenuLayout.setOrientation(vertical ? LinearLayout.VERTICAL:LinearLayout.HORIZONTAL);
276

    
277
          mMenuPopup.showAsDropDown(view, 0, -3*mMenuLayoutHeight, Gravity.LEFT);
278
          mMenuPopup.update();
279
          }
280
        }
281
      });
282
    }
283

    
284
///////////////////////////////////////////////////////////////////////////////////////////////////
285

    
286
  private void setupSolveButton(final RubikActivity act, final float scale, final float width)
287
    {
288
    int padding = (int)(3*scale + 0.5f);
289
    int widthBut = (int)(width/6);
290
    LinearLayout.LayoutParams backParams = new LinearLayout.LayoutParams(widthBut, LinearLayout.LayoutParams.MATCH_PARENT);
291
    mSolveButton = new ImageButton(act);
292
    mSolveButton.setLayoutParams(backParams);
293
    mSolveButton.setPadding(padding,0,padding,0);
294
    mSolveButton.setImageResource(R.drawable.cube_solve);
295

    
296
    mSolveButton.setOnClickListener( new View.OnClickListener()
297
      {
298
      @Override
299
      public void onClick(View v)
300
        {
301
        act.getPreRender().solveObject();
302
        }
303
      });
304
    }
305

    
306
///////////////////////////////////////////////////////////////////////////////////////////////////
307

    
308
  private void setupPrevButton(final RubikActivity act, final float scale, final float width)
309
    {
310
    int padding = (int)(3*scale + 0.5f);
311
    int widthBut = (int)(width/6);
312
    LinearLayout.LayoutParams backParams = new LinearLayout.LayoutParams(widthBut, LinearLayout.LayoutParams.MATCH_PARENT);
313
    mPrevButton = new ImageButton(act);
314
    mPrevButton.setLayoutParams(backParams);
315
    mPrevButton.setPadding(padding,0,padding,0);
316
    mPrevButton.setImageResource(R.drawable.cube_back);
317

    
318
    mPrevButton.setOnClickListener( new View.OnClickListener()
319
      {
320
      @Override
321
      public void onClick(View v)
322
        {
323
        RubikPreRender pre = act.getPreRender();
324
        backMove(pre);
325
        }
326
      });
327
    }
328

    
329
///////////////////////////////////////////////////////////////////////////////////////////////////
330

    
331
  private void setupObjectWindow(final RubikActivity act, final float scale)
332
    {
333
    LayoutInflater layoutInflater = (LayoutInflater)act.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
334
    final View layout = layoutInflater.inflate(R.layout.popup_objects, null);
335
    mObjectLayout = layout.findViewById(R.id.popup);
336

    
337
    mObjectPopup = new PopupWindow(act);
338
    mObjectPopup.setContentView(layout);
339
    mObjectPopup.setFocusable(true);
340
    int margin = (int)(5*scale + 0.5f);
341

    
342
    BitmapDrawable bd = (BitmapDrawable) act.getResources().getDrawable(R.drawable.cube2);
343
    int cubeWidth  = bd.getIntrinsicWidth();
344
    mObjectLayoutWidth = (int)(cubeWidth + 2*margin + 0.5f);
345

    
346
    for(int object=0; object<RubikObjectList.NUM_OBJECTS; object++)
347
      {
348
      final RubikObjectList list = RubikObjectList.getObject(object);
349
      final int[] sizes = list.getSizes();
350
      int[] icons = list.getIconIDs();
351
      int len = sizes.length;
352
      final int obj = object;
353

    
354
      for(int i=0; i<len; i++)
355
        {
356
        final int size = i;
357

    
358
        LinearLayout.LayoutParams p = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,LinearLayout.LayoutParams.WRAP_CONTENT);
359
        p.setMargins(margin, margin, margin, margin);
360

    
361
        ImageButton button = new ImageButton(act);
362
        button.setLayoutParams(p);
363

    
364
        button.setBackgroundResource(icons[i]);
365
        button.setOnClickListener( new View.OnClickListener()
366
          {
367
          @Override
368
          public void onClick(View v)
369
            {
370
            if( act.getPreRender().canPlay() && RubikState.getCurrentState()==RubikState.PLAY )
371
              {
372
              mObject = obj;
373
              mSize   = sizes[size];
374
              act.changeObject(list,sizes[size], true);
375
              adjustSpinner(act);
376
              mMoves.clear();
377
              }
378

    
379
            mObjectPopup.dismiss();
380
            }
381
          });
382

    
383
        mObjectLayout.addView(button);
384
        }
385
      }
386
    }
387

    
388
///////////////////////////////////////////////////////////////////////////////////////////////////
389

    
390
  private void setupMenuWindow(final RubikActivity act, final float scale)
391
    {
392
    LayoutInflater layoutInflater = (LayoutInflater)act.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
393
    final View layout = layoutInflater.inflate(R.layout.popup_objects, null);
394
    mMenuLayout = layout.findViewById(R.id.popup);
395

    
396
    mMenuPopup = new PopupWindow(act);
397
    mMenuPopup.setContentView(layout);
398
    mMenuPopup.setFocusable(true);
399
    int margin = (int)(5*scale + 0.5f);
400

    
401
    LinearLayout.LayoutParams p = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.WRAP_CONTENT);
402
    p.setMargins(margin, margin, margin, margin);
403

    
404
    for(int i=0; i<NUM_BUTTONS; i++)
405
      {
406
      final int but = i;
407
      Button button = new Button(act);
408
      button.setLayoutParams(p);
409
      button.setText(BUTTON_LABELS[i]);
410

    
411
      button.setOnClickListener( new View.OnClickListener()
412
        {
413
        @Override
414
        public void onClick(View v)
415
          {
416
          mMenuPopup.dismiss();
417
          Action(act,but);
418
          }
419
        });
420

    
421
      mMenuLayout.addView(button);
422
      }
423

    
424
    mMenuLayoutHeight= (int)(margin + NUM_BUTTONS*(mButtonSize+margin));
425
    }
426

    
427
///////////////////////////////////////////////////////////////////////////////////////////////////
428

    
429
  private void backMove(RubikPreRender pre)
430
    {
431
    if( mCanPrevMove )
432
      {
433
      int numMoves = mMoves.size();
434

    
435
      if( numMoves>0 )
436
        {
437
        Move move = mMoves.remove(numMoves-1);
438
        RubikObject object = pre.getObject();
439

    
440
        int axis  = move.mAxis;
441
        int row   = (1<<move.mRow);
442
        int angle = move.mAngle;
443
        int numRot= Math.abs(angle*object.getBasicAngle()/360);
444

    
445
        if( angle!=0 )
446
          {
447
          mCanPrevMove = false;
448
          pre.addRotation(this, axis, row, -angle, numRot*DURATION_MILLIS);
449
          }
450
        else
451
          {
452
          android.util.Log.e("solution", "error: trying to back move of angle 0");
453
          }
454
        }
455
      else
456
        {
457
        android.util.Log.e("solv", "error: no moves to back!");
458
        }
459
      }
460
    }
461
///////////////////////////////////////////////////////////////////////////////////////////////////
462

    
463
  private void Action(RubikActivity act, int button)
464
    {
465
    switch(button)
466
      {
467
      case 0: RubikStatePlay play = (RubikStatePlay) RubikState.PLAY.getStateClass();
468
              int object = play.getObject();
469
              int size   = play.getSize();
470
              int sizeIndex = RubikObjectList.getSizeIndex(object,size);
471

    
472
              Bundle bundle = new Bundle();
473
              bundle.putInt("tab", RubikObjectList.pack(object,sizeIndex) );
474
              bundle.putBoolean("submitting", false);
475

    
476
              RubikDialogScores scores = new RubikDialogScores();
477
              scores.setArguments(bundle);
478
              scores.show(act.getSupportFragmentManager(), null);
479
              break;
480
      case 1: RubikState.switchState(act,RubikState.PATT);
481
              break;
482
      case 2: RubikState.switchState(act,RubikState.SVER);
483
              break;
484
      case 3: RubikDialogAbout diag = new RubikDialogAbout();
485
              diag.show(act.getSupportFragmentManager(), null);
486
              break;
487
      }
488
    }
489

    
490
///////////////////////////////////////////////////////////////////////////////////////////////////
491

    
492
  public void savePreferences(SharedPreferences.Editor editor)
493
    {
494
    editor.putInt("statePlay_level" , mLevelValue);
495
    editor.putInt("statePlay_object", mObject);
496
    editor.putInt("statePlay_size"  , mSize);
497

    
498
    if( mObjectPopup!=null )
499
      {
500
      mObjectPopup.dismiss();
501
      mObjectPopup = null;
502
      }
503

    
504
    if( mMenuPopup!=null )
505
      {
506
      mMenuPopup.dismiss();
507
      mMenuPopup = null;
508
      }
509
    }
510

    
511
///////////////////////////////////////////////////////////////////////////////////////////////////
512

    
513
  public void restorePreferences(SharedPreferences preferences)
514
    {
515
    mLevelValue = preferences.getInt("statePlay_level" , DEF_LEVEL );
516
    mObject     = preferences.getInt("statePlay_object", DEF_OBJECT);
517
    mSize       = preferences.getInt("statePlay_size"  , DEF_SIZE  );
518
    }
519

    
520
///////////////////////////////////////////////////////////////////////////////////////////////////
521

    
522
  public boolean setObjectAndSize(RubikActivity act, RubikObjectList obj, int size)
523
    {
524
    if( mObject!=obj.ordinal() || mSize != size )
525
      {
526
      boolean success = false;
527

    
528
      for( int s: obj.getSizes() )
529
        if( s==size )
530
          {
531
          success = true;
532
          break;
533
          }
534

    
535
      if( success )
536
        {
537
        mObject = obj.ordinal();
538
        mSize   = size;
539

    
540
        if( mLevelSpinner!=null ) adjustSpinner(act);
541
        }
542

    
543
      return success;
544
      }
545

    
546
    return true;
547
    }
548

    
549
///////////////////////////////////////////////////////////////////////////////////////////////////
550

    
551
  private void adjustSpinner(RubikActivity act)
552
    {
553
    int sizeIndex = RubikObjectList.getSizeIndex(mObject,mSize);
554
    int maxLevel  = RubikObjectList.getMaxLevel(mObject, sizeIndex);
555
    String[] levels = new String[maxLevel];
556

    
557
    for(int i=0; i<maxLevel; i++)
558
      {
559
      levels[i] = act.getString(R.string.lv_placeholder,i+1);
560
      }
561

    
562
    mSpinnerAdapter = new ArrayAdapter<String>(act, android.R.layout.simple_spinner_item, levels)
563
      {
564
      @NonNull
565
      public View getView(int position, View convertView, @NonNull ViewGroup parent)
566
        {
567
        View v = super.getView(position, convertView, parent);
568
        TextView tv = ((TextView) v);
569
        tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, mButtonSize);
570
        return v;
571
        }
572
      };
573

    
574
    mSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
575
    mLevelSpinner.setAdapter(mSpinnerAdapter);
576
    }
577

    
578
///////////////////////////////////////////////////////////////////////////////////////////////////
579

    
580
  int getLevel()
581
    {
582
    return mLevelValue;
583
    }
584

    
585
///////////////////////////////////////////////////////////////////////////////////////////////////
586

    
587
  public void addMove(int axis, int row, int angle)
588
    {
589
    mMoves.add(new Move(axis,row,angle));
590
    }
591

    
592
///////////////////////////////////////////////////////////////////////////////////////////////////
593

    
594
  public int getObject()
595
    {
596
    return mObject;
597
    }
598

    
599
///////////////////////////////////////////////////////////////////////////////////////////////////
600

    
601
  public int getSize()
602
    {
603
    return mSize;
604
    }
605

    
606
///////////////////////////////////////////////////////////////////////////////////////////////////
607

    
608
  public void onItemSelected(AdapterView<?> parent, View view, int pos, long id)
609
    {
610
    mLevelValue = pos+1;
611
    }
612

    
613
///////////////////////////////////////////////////////////////////////////////////////////////////
614

    
615
  public void onNothingSelected(AdapterView<?> parent) { }
616

    
617
///////////////////////////////////////////////////////////////////////////////////////////////////
618

    
619
  public void onActionFinished(final long effectID)
620
    {
621
    mCanPrevMove = true;
622
    }
623
  }
(5-5/9)