Project

General

Profile

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

magiccube / src / main / java / org / distorted / states / RubikStatePlay.java @ 88fb92ba

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
        }
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, final float width)
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)(3*scale + 0.5f);
400
    int padding= (int)(7*scale + 0.5f);
401

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

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

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

    
423
      mMenuLayout.addView(button);
424
      }
425

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

    
429
///////////////////////////////////////////////////////////////////////////////////////////////////
430

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

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

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

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

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

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

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

    
488
///////////////////////////////////////////////////////////////////////////////////////////////////
489

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

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

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

    
509
///////////////////////////////////////////////////////////////////////////////////////////////////
510

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

    
518
///////////////////////////////////////////////////////////////////////////////////////////////////
519

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

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

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

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

    
541
      return success;
542
      }
543

    
544
    return true;
545
    }
546

    
547
///////////////////////////////////////////////////////////////////////////////////////////////////
548

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

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

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

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

    
576
///////////////////////////////////////////////////////////////////////////////////////////////////
577

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

    
583
///////////////////////////////////////////////////////////////////////////////////////////////////
584

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

    
590
///////////////////////////////////////////////////////////////////////////////////////////////////
591

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

    
597
///////////////////////////////////////////////////////////////////////////////////////////////////
598

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

    
604
///////////////////////////////////////////////////////////////////////////////////////////////////
605

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

    
611
///////////////////////////////////////////////////////////////////////////////////////////////////
612

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

    
615
///////////////////////////////////////////////////////////////////////////////////////////////////
616

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