Project

General

Profile

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

magiccube / src / main / java / org / distorted / states / RubikStatePlay.java @ 5b893eee

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, mMenuItemSize, mMenuTextSize;
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
    mMenuTextSize = width*RubikActivity.MENU_MEDIUM_TEXT_SIZE;
110
    mButtonSize   = width*RubikActivity.BUTTON_TEXT_SIZE;
111
    mTitleSize    = width*RubikActivity.TITLE_TEXT_SIZE;
112
    mMenuItemSize = width*RubikActivity.MENU_ITEM_SIZE;
113

    
114
    mCanPrevMove = true;
115

    
116
    if( mMoves==null ) mMoves = new ArrayList<>();
117
    else               mMoves.clear();
118

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

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

    
130
    setupObjectWindow(act, scale);
131

    
132
    // BOT ////////////////////////////
133

    
134
    LinearLayout layoutLeft = act.findViewById(R.id.mainBarLeft);
135
    layoutLeft.removeAllViews();
136

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

    
142
    LinearLayout layoutRight = act.findViewById(R.id.mainBarRight);
143
    layoutRight.removeAllViews();
144

    
145
    setupMenuButton(act,scale);
146
    layoutRight.addView(mMenuButton);
147

    
148
    setupMenuWindow(act, scale, width);
149
    }
150

    
151
///////////////////////////////////////////////////////////////////////////////////////////////////
152

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

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

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

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

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

    
188
///////////////////////////////////////////////////////////////////////////////////////////////////
189

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

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

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

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

    
216
    if( mLevelValue>maxLevel ) mLevelValue=1;
217

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

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

    
235
///////////////////////////////////////////////////////////////////////////////////////////////////
236

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

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

    
257
///////////////////////////////////////////////////////////////////////////////////////////////////
258

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

    
268
    final int barHeight = act.getScreenHeightInPixels()/10;
269

    
270
    mMenuButton.setOnClickListener( new View.OnClickListener()
271
      {
272
      @Override
273
      public void onClick(View view)
274
        {
275
        if( act.getPreRender().canPlay() )
276
          {
277
          mMenuPopup.showAsDropDown(view, 0, -mMenuLayoutHeight-barHeight, 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
        mMoves.clear();
303
        }
304
      });
305
    }
306

    
307
///////////////////////////////////////////////////////////////////////////////////////////////////
308

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

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

    
330
///////////////////////////////////////////////////////////////////////////////////////////////////
331

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

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

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

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

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

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

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

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

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

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

    
389
///////////////////////////////////////////////////////////////////////////////////////////////////
390

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

    
397
    mMenuPopup = new PopupWindow(act);
398
    mMenuPopup.setContentView(layout);
399
    mMenuPopup.setFocusable(true);
400
    int margin = (int)(3*scale + 0.5f);
401
    int padding= (int)(7*scale + 0.5f);
402

    
403
    LinearLayout.LayoutParams p = new LinearLayout.LayoutParams( (int)width/2 - 2*padding, (int)mMenuItemSize);
404
    p.setMargins(margin, margin/2, margin, margin/2);
405

    
406
    for(int i=0; i<NUM_BUTTONS; i++)
407
      {
408
      final int but = i;
409
      Button button = new Button(act);
410
      button.setLayoutParams(p);
411
      button.setText(BUTTON_LABELS[i]);
412
      button.setTextSize(TypedValue.COMPLEX_UNIT_PX, mMenuTextSize);
413

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

    
424
      mMenuLayout.addView(button);
425
      }
426

    
427
    mMenuLayoutHeight= (int)(NUM_BUTTONS*(mMenuItemSize+margin));
428
    }
429

    
430
///////////////////////////////////////////////////////////////////////////////////////////////////
431

    
432
  private void backMove(RubikPreRender pre)
433
    {
434
    if( mCanPrevMove )
435
      {
436
      int numMoves = mMoves.size();
437

    
438
      if( numMoves>0 )
439
        {
440
        Move move = mMoves.remove(numMoves-1);
441
        RubikObject object = pre.getObject();
442

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

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

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

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

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

    
489
///////////////////////////////////////////////////////////////////////////////////////////////////
490

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

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

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

    
510
///////////////////////////////////////////////////////////////////////////////////////////////////
511

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

    
519
///////////////////////////////////////////////////////////////////////////////////////////////////
520

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

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

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

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

    
542
      return success;
543
      }
544

    
545
    return true;
546
    }
547

    
548
///////////////////////////////////////////////////////////////////////////////////////////////////
549

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

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

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

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

    
577
///////////////////////////////////////////////////////////////////////////////////////////////////
578

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

    
584
///////////////////////////////////////////////////////////////////////////////////////////////////
585

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

    
591
///////////////////////////////////////////////////////////////////////////////////////////////////
592

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

    
598
///////////////////////////////////////////////////////////////////////////////////////////////////
599

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

    
605
///////////////////////////////////////////////////////////////////////////////////////////////////
606

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

    
612
///////////////////////////////////////////////////////////////////////////////////////////////////
613

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

    
616
///////////////////////////////////////////////////////////////////////////////////////////////////
617

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