Project

General

Profile

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

magiccube / src / main / java / org / distorted / screens / RubikScreenPlay.java @ 967b79dc

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.screens;
21

    
22
import android.content.Context;
23
import android.content.SharedPreferences;
24
import android.graphics.drawable.BitmapDrawable;
25
import android.os.Bundle;
26
import android.util.TypedValue;
27
import android.view.Gravity;
28
import android.view.LayoutInflater;
29
import android.view.View;
30
import android.widget.Button;
31
import android.widget.GridLayout;
32
import android.widget.ImageButton;
33
import android.widget.LinearLayout;
34
import android.widget.PopupWindow;
35

    
36
import org.distorted.control.RubikControl;
37
import org.distorted.dialogs.RubikDialogAbout;
38
import org.distorted.dialogs.RubikDialogPattern;
39
import org.distorted.dialogs.RubikDialogScores;
40
import org.distorted.dialogs.RubikDialogTutorial;
41
import org.distorted.helpers.TransparentButton;
42
import org.distorted.helpers.TransparentImageButton;
43
import org.distorted.main.R;
44
import org.distorted.main.RubikActivity;
45
import org.distorted.main.RubikPreRender;
46
import org.distorted.objects.ObjectList;
47
import org.distorted.network.RubikScores;
48

    
49
///////////////////////////////////////////////////////////////////////////////////////////////////
50

    
51
public class RubikScreenPlay extends RubikScreenBase
52
  {
53
  public static final int LEVELS_SHOWN = 10;
54
  public static final int DEF_OBJECT= ObjectList.CUBE.ordinal();
55
  public static final int DEF_SIZE  =  3;
56

    
57
  private static final int[] BUTTON_LABELS = { R.string.scores,
58
                                               R.string.patterns,
59
                                               R.string.control,
60
                                               R.string.solver,
61
                                               R.string.tutorials,
62
                                               R.string.about };
63

    
64
  private static final int NUM_BUTTONS = BUTTON_LABELS.length;
65
  private static final float LAST_BUTTON = 1.5f;
66

    
67
  private ImageButton mObjButton, mMenuButton, mSolveButton;
68
  private Button mPlayButton;
69
  private PopupWindow mObjectPopup, mMenuPopup, mPlayPopup;
70
  private int mObject = DEF_OBJECT;
71
  private int mSize   = DEF_SIZE;
72
  private int mObjectSize, mMenuLayoutWidth, mMenuLayoutHeight, mPlayLayoutWidth;
73
  private int mLevelValue;
74
  private float mButtonSize, mMenuItemSize, mMenuTextSize;
75
  private int mColCount, mRowCount;
76
  private LinearLayout mPlayLayout;
77

    
78
///////////////////////////////////////////////////////////////////////////////////////////////////
79

    
80
  void leaveScreen(RubikActivity act)
81
    {
82

    
83
    }
84

    
85
///////////////////////////////////////////////////////////////////////////////////////////////////
86

    
87
  void enterScreen(final RubikActivity act)
88
    {
89
    float width = act.getScreenWidthInPixels();
90

    
91
    mMenuTextSize = width*RubikActivity.MENU_MED_TEXT_SIZE;
92
    mButtonSize   = width*RubikActivity.BUTTON_TEXT_SIZE;
93
    mMenuItemSize = width*RubikActivity.MENU_ITEM_SIZE;
94

    
95
    mRowCount = ObjectList.getRowCount();
96
    mColCount = ObjectList.getColumnCount();
97

    
98
    // TOP ////////////////////////////
99
    LinearLayout layoutTop = act.findViewById(R.id.upperBar);
100
    layoutTop.removeAllViews();
101

    
102
    setupObjectWindow(act,width);
103
    setupObjectButton(act,width);
104
    layoutTop.addView(mObjButton);
105

    
106
    setupMenuWindow(act,width);
107
    setupMenuButton(act,width);
108
    layoutTop.addView(mMenuButton);
109

    
110
    setupPlayWindow(act,width);
111
    setupPlayButton(act,width);
112
    layoutTop.addView(mPlayButton);
113

    
114
    setupSolveButton(act,width);
115
    createBottomPane(act,width,mSolveButton);
116
    }
117

    
118
///////////////////////////////////////////////////////////////////////////////////////////////////
119

    
120
  private void setupObjectButton(final RubikActivity act, final float width)
121
    {
122
    final int margin  = (int)(width*RubikActivity.MARGIN);
123
    final int icon = RubikActivity.getDrawable(R.drawable.ui_small_cube_menu,R.drawable.ui_medium_cube_menu, R.drawable.ui_big_cube_menu, R.drawable.ui_huge_cube_menu);
124
    mObjButton = new TransparentImageButton(act, icon, width,LinearLayout.LayoutParams.MATCH_PARENT);
125

    
126
    mObjButton.setOnClickListener( new View.OnClickListener()
127
      {
128
      @Override
129
      public void onClick(View view)
130
        {
131
        if(act.getPreRender().isUINotBlocked())
132
          {
133
          if( mObjectPopup==null )
134
            {
135
            // I completely don't understand it, but Firebase says occasionally mObjectPopup is null here. Recreate.
136
            float width = act.getScreenWidthInPixels();
137
            setupObjectWindow(act,width);
138
            }
139

    
140
          mObjectPopup.setFocusable(false);
141
          mObjectPopup.update();
142

    
143
          View popupView = mObjectPopup.getContentView();
144
          popupView.setSystemUiVisibility(RubikActivity.FLAGS);
145

    
146
          mObjectPopup.showAsDropDown(view, margin, margin);
147
          mObjectPopup.update(view, mObjectSize*mColCount, mObjectSize*mRowCount);
148

    
149
          mObjectPopup.setFocusable(true);
150
          mObjectPopup.update();
151
          }
152
        }
153
      });
154
    }
155

    
156
///////////////////////////////////////////////////////////////////////////////////////////////////
157

    
158
  private void setupPlayButton(final RubikActivity act, final float width)
159
    {
160
    final int margin  = (int)(width*RubikActivity.MARGIN);
161
    mPlayButton = new TransparentButton(act, R.string.play, mButtonSize, width);
162

    
163
    mPlayButton.setOnClickListener( new View.OnClickListener()
164
      {
165
      @Override
166
      public void onClick(View view)
167
        {
168
        if(act.getPreRender().isUINotBlocked())
169
          {
170
          if( mPlayPopup==null )
171
            {
172
            // I completely don't understand it, but Firebase says occasionally mPlayPopup is null here. Recreate.
173
            float width = act.getScreenWidthInPixels();
174
            setupPlayWindow(act,width);
175
            }
176

    
177
          mPlayPopup.setFocusable(false);
178
          mPlayPopup.update();
179

    
180
          View popupView = mPlayPopup.getContentView();
181
          popupView.setSystemUiVisibility(RubikActivity.FLAGS);
182

    
183
          final int sizeIndex = ObjectList.getSizeIndex(mObject,mSize);
184
          final int dbLevel = ObjectList.getDBLevel(mObject, sizeIndex);
185
          final int levelsShown = Math.min(dbLevel,LEVELS_SHOWN);
186

    
187
          mPlayPopup.showAsDropDown(view, margin, margin);
188
          mPlayPopup.update(view, mPlayLayoutWidth, (int)(levelsShown*(mMenuItemSize+margin)+3*margin+mMenuItemSize*(LAST_BUTTON-1.0f)));
189
          mPlayPopup.setFocusable(true);
190
          mPlayPopup.update();
191
          }
192
        }
193
      });
194
    }
195

    
196
///////////////////////////////////////////////////////////////////////////////////////////////////
197

    
198
  private void setupMenuButton(final RubikActivity act, final float width)
199
    {
200
    final int margin  = (int)(width*RubikActivity.MARGIN);
201
    final int icon = RubikActivity.getDrawable(R.drawable.ui_small_menu,R.drawable.ui_medium_menu, R.drawable.ui_big_menu, R.drawable.ui_huge_menu);
202
    mMenuButton = new TransparentImageButton(act, icon, width,LinearLayout.LayoutParams.MATCH_PARENT);
203

    
204
    mMenuButton.setOnClickListener( new View.OnClickListener()
205
      {
206
      @Override
207
      public void onClick(View view)
208
        {
209
        if(act.getPreRender().isUINotBlocked())
210
          {
211
          if( mMenuPopup==null )
212
            {
213
            // I completely don't understand it, but Firebase says occasionally mMenuPopup is null here. Recreate.
214
            float width = act.getScreenWidthInPixels();
215
            setupMenuWindow(act,width);
216
            }
217

    
218
          mMenuPopup.setFocusable(false);
219
          mMenuPopup.update();
220

    
221
          View popupView = mMenuPopup.getContentView();
222
          popupView.setSystemUiVisibility(RubikActivity.FLAGS);
223

    
224
          mMenuPopup.showAsDropDown(view, (int)(-width/12), margin, Gravity.CENTER);
225
          mMenuPopup.update(view, mMenuLayoutWidth, mMenuLayoutHeight);
226
          mMenuPopup.setFocusable(true);
227
          mMenuPopup.update();
228
          }
229
        }
230
      });
231
    }
232

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

    
235
  private void setupObjectWindow(final RubikActivity act, final float width)
236
    {
237
    LayoutInflater layoutInflater = (LayoutInflater)act.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
238
    final View layout = layoutInflater.inflate(R.layout.popup_objects, null);
239
    GridLayout objectGrid = layout.findViewById(R.id.objectGrid);
240

    
241
    int[] indices = ObjectList.getIndices();
242

    
243
    GridLayout.Spec[] rowSpecs = new GridLayout.Spec[mRowCount];
244
    GridLayout.Spec[] colSpecs = new GridLayout.Spec[mColCount];
245

    
246
    objectGrid.setColumnCount(mColCount);
247
    objectGrid.setRowCount(mRowCount);
248

    
249
    int[] nextInRow = new int[mRowCount];
250

    
251
    for(int row=0; row<mRowCount; row++)
252
      {
253
      rowSpecs[row] = GridLayout.spec(row);
254
      nextInRow[row]= 0;
255
      }
256
    for(int col=0; col<mColCount; col++)
257
      {
258
      colSpecs[col] = GridLayout.spec(col);
259
      }
260

    
261
    mObjectPopup = new PopupWindow(act);
262
    mObjectPopup.setContentView(layout);
263
    mObjectPopup.setFocusable(true);
264
    int icon = RubikActivity.getDrawable(R.drawable.ui_small_cube2,R.drawable.ui_medium_cube2, R.drawable.ui_big_cube2, R.drawable.ui_huge_cube2);
265

    
266
    BitmapDrawable bd = (BitmapDrawable) act.getResources().getDrawable(icon);
267
    int cubeWidth = bd.getIntrinsicWidth();
268
    int margin = (int)(width*RubikActivity.LARGE_MARGIN);
269
    mObjectSize = (int)(cubeWidth + 2*margin + 0.5f);
270

    
271
    for(int object=0; object< ObjectList.NUM_OBJECTS; object++)
272
      {
273
      final ObjectList list = ObjectList.getObject(object);
274
      final int[] sizes = list.getSizes();
275
      int[] icons = list.getIconIDs();
276
      int len = sizes.length;
277
      final int obj = object;
278
      int row = indices[object];
279

    
280
      for(int i=0; i<len; i++)
281
        {
282
        final int index = i;
283

    
284
        ImageButton button = new ImageButton(act);
285
        button.setBackgroundResource(icons[i]);
286
        button.setOnClickListener( new View.OnClickListener()
287
          {
288
          @Override
289
          public void onClick(View v)
290
            {
291
            if( act.getPreRender().isUINotBlocked() && ScreenList.getCurrentScreen()== ScreenList.PLAY )
292
              {
293
              mObject = obj;
294
              mSize   = sizes[index];
295
              act.changeObject(list,sizes[index], true);
296
              adjustLevels(act);
297
              mController.clearMoves(act);
298
              }
299

    
300
            mObjectPopup.dismiss();
301
            }
302
          });
303

    
304
        GridLayout.LayoutParams params = new GridLayout.LayoutParams(rowSpecs[row],colSpecs[nextInRow[row]]);
305
        params.bottomMargin = margin;
306
        params.topMargin    = margin;
307
        params.leftMargin   = margin;
308
        params.rightMargin  = margin;
309

    
310
        nextInRow[row]++;
311

    
312
        objectGrid.addView(button, params);
313
        }
314
      }
315
    }
316

    
317
///////////////////////////////////////////////////////////////////////////////////////////////////
318

    
319
  private void setupMenuWindow(final RubikActivity act, final float width)
320
    {
321
    LayoutInflater layoutInflater = (LayoutInflater)act.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
322
    final View layout = layoutInflater.inflate(R.layout.popup_menu, null);
323
    LinearLayout menuLayout = layout.findViewById(R.id.menuGrid);
324

    
325
    mMenuPopup = new PopupWindow(act);
326
    mMenuPopup.setContentView(layout);
327
    mMenuPopup.setFocusable(true);
328
    int margin  = (int)(width*RubikActivity.MARGIN);
329
    int padding = (int)(width*RubikActivity.PADDING);
330

    
331
    mMenuLayoutWidth = (int)(width/2);
332
    mMenuLayoutHeight= (int)(2*margin + NUM_BUTTONS*(mMenuItemSize+margin));
333

    
334
    LinearLayout.LayoutParams p = new LinearLayout.LayoutParams( mMenuLayoutWidth - 2*padding, (int)mMenuItemSize);
335

    
336
    for(int i=0; i<NUM_BUTTONS; i++)
337
      {
338
      final int but = i;
339
      Button button = new Button(act);
340
      button.setLayoutParams(p);
341
      button.setText(BUTTON_LABELS[i]);
342
      button.setTextSize(TypedValue.COMPLEX_UNIT_PX, mMenuTextSize);
343

    
344
      button.setOnClickListener( new View.OnClickListener()
345
        {
346
        @Override
347
        public void onClick(View v)
348
          {
349
          mMenuPopup.dismiss();
350
          MenuAction(act,but);
351
          }
352
        });
353

    
354
      menuLayout.addView(button);
355
      }
356
    }
357

    
358
///////////////////////////////////////////////////////////////////////////////////////////////////
359

    
360
  private void setupPlayWindow(final RubikActivity act, final float width)
361
    {
362
    LayoutInflater layoutInflater = (LayoutInflater)act.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
363
    final View layout = layoutInflater.inflate(R.layout.popup_play, null);
364
    mPlayLayout = layout.findViewById(R.id.playGrid);
365

    
366
    mPlayLayoutWidth = (int)(width*0.4f);
367

    
368
    mPlayPopup = new PopupWindow(act);
369
    mPlayPopup.setContentView(layout);
370
    mPlayPopup.setFocusable(true);
371

    
372
    adjustLevels(act);
373
    }
374

    
375
///////////////////////////////////////////////////////////////////////////////////////////////////
376

    
377
  private void MenuAction(RubikActivity act, int button)
378
    {
379
    switch(button)
380
      {
381
      case 0: RubikScreenPlay play = (RubikScreenPlay) ScreenList.PLAY.getScreenClass();
382
              int object = play.getObject();
383
              int size   = play.getSize();
384
              int sizeIndex = ObjectList.getSizeIndex(object,size);
385
              Bundle sBundle = new Bundle();
386
              sBundle.putInt("tab", ObjectList.pack(object,sizeIndex) );
387
              sBundle.putBoolean("submitting", false);
388
              RubikDialogScores scores = new RubikDialogScores();
389
              scores.setArguments(sBundle);
390
              scores.show(act.getSupportFragmentManager(), null);
391
              break;
392
      case 1: RubikDialogPattern pDiag = new RubikDialogPattern();
393
              Bundle pBundle = new Bundle();
394
              int pOrd = getPatternOrdinal();
395
              pBundle.putInt("tab", pOrd );
396
              pDiag.setArguments(pBundle);
397
              pDiag.show( act.getSupportFragmentManager(), RubikDialogPattern.getDialogTag() );
398
              break;
399
      case 2: RubikControl control = RubikControl.getInstance();
400
              control.animateAll(act);
401
              break;
402
      case 3: ScreenList.switchScreen(act, ScreenList.SVER);
403
              break;
404
      case 4: RubikDialogTutorial tDiag = new RubikDialogTutorial();
405
              Bundle tBundle = new Bundle();
406
              int tOrd = getTutorialOrdinal();
407
              tBundle.putInt("tab", tOrd );
408
              tDiag.setArguments(tBundle);
409
              tDiag.show( act.getSupportFragmentManager(), RubikDialogTutorial.getDialogTag() );
410
              break;
411
      case 5: RubikDialogAbout aDiag = new RubikDialogAbout();
412
              aDiag.show(act.getSupportFragmentManager(), null);
413
              break;
414
      }
415
    }
416

    
417
///////////////////////////////////////////////////////////////////////////////////////////////////
418

    
419
  void setupSolveButton(final RubikActivity act, final float width)
420
    {
421
    int icon = RubikActivity.getDrawable(R.drawable.ui_small_cube_solve,R.drawable.ui_medium_cube_solve, R.drawable.ui_big_cube_solve, R.drawable.ui_huge_cube_solve);
422
    mSolveButton = new TransparentImageButton(act, icon, width,LinearLayout.LayoutParams.MATCH_PARENT);
423

    
424
    mSolveButton.setOnClickListener( new View.OnClickListener()
425
      {
426
      @Override
427
      public void onClick(View v)
428
        {
429
        act.getPreRender().solveObject();
430
        mController.clearMoves(act);
431
        }
432
      });
433
    }
434

    
435
///////////////////////////////////////////////////////////////////////////////////////////////////
436

    
437
  public void savePreferences(SharedPreferences.Editor editor)
438
    {
439
    editor.putInt("statePlay_object", mObject);
440
    editor.putInt("statePlay_size"  , mSize);
441

    
442
    if( mObjectPopup!=null )
443
      {
444
      mObjectPopup.dismiss();
445
      mObjectPopup = null;
446
      }
447

    
448
    if( mMenuPopup!=null )
449
      {
450
      mMenuPopup.dismiss();
451
      mMenuPopup = null;
452
      }
453

    
454
    if( mPlayPopup!=null )
455
      {
456
      mPlayPopup.dismiss();
457
      mPlayPopup = null;
458
      }
459
    }
460

    
461
///////////////////////////////////////////////////////////////////////////////////////////////////
462

    
463
  public void restorePreferences(SharedPreferences preferences)
464
    {
465
    mObject= preferences.getInt("statePlay_object", DEF_OBJECT);
466
    mSize  = preferences.getInt("statePlay_size"  , DEF_SIZE  );
467

    
468
    int sizeIndex = ObjectList.getSizeIndex(mObject,mSize);
469
    int dbLevel = ObjectList.getDBLevel(mObject, sizeIndex);
470

    
471
    // This means the app has been upgraded to a new version which swapped the
472
    // Object for a new one with larger sizeIndex and now getMaxLevel() returns
473
    // 0. Reset the object to default, otherwise we'll get a crash later on.
474

    
475
    if( dbLevel==0 )
476
      {
477
      mObject = DEF_OBJECT;
478
      mSize   = DEF_SIZE;
479
      }
480
    }
481

    
482
///////////////////////////////////////////////////////////////////////////////////////////////////
483

    
484
  public boolean setObjectAndSize(RubikActivity act, ObjectList obj, int size)
485
    {
486
    if( mObject!=obj.ordinal() || mSize != size )
487
      {
488
      boolean success = false;
489

    
490
      for( int s: obj.getSizes() )
491
        if( s==size )
492
          {
493
          success = true;
494
          break;
495
          }
496

    
497
      if( success )
498
        {
499
        mObject = obj.ordinal();
500
        mSize   = size;
501

    
502
        if( mPlayLayout!=null ) adjustLevels(act);
503
        }
504

    
505
      return success;
506
      }
507

    
508
    return true;
509
    }
510

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

    
513
  private void adjustLevels(final RubikActivity act)
514
    {
515
    int sizeIndex = ObjectList.getSizeIndex(mObject,mSize);
516
    int dbLevel = ObjectList.getDBLevel(mObject, sizeIndex);
517
    int numScrambles = ObjectList.getNumScramble(mObject, sizeIndex);
518
    int numLevel = Math.min(dbLevel, LEVELS_SHOWN);
519
    String[] levels = new String[numLevel];
520

    
521
    for(int i=0; i<numLevel-1; i++)
522
      {
523
      levels[i] = act.getString(R.string.lv_placeholder,i+1);
524
      }
525

    
526
    if( numLevel>0 )
527
      {
528
      levels[numLevel-1] = act.getString(R.string.level_full);
529
      }
530

    
531
    if( mLevelValue>dbLevel || mLevelValue<1 ||
532
       (mLevelValue<dbLevel || mLevelValue>LEVELS_SHOWN ) )
533
      {
534
      mLevelValue=1;
535
      }
536

    
537
    float width  = act.getScreenWidthInPixels();
538
    int margin   = (int)(width*RubikActivity.MARGIN);
539
    int padding  = (int)(width*RubikActivity.PADDING);
540
    int butWidth = mPlayLayoutWidth - 2*padding;
541
    int butHeight= (int)mMenuItemSize;
542
    int lastButH = (int)(mMenuItemSize*LAST_BUTTON) ;
543

    
544
    LinearLayout.LayoutParams pM = new LinearLayout.LayoutParams( butWidth, butHeight );
545
    pM.setMargins(margin, 0, margin, margin);
546
    LinearLayout.LayoutParams pT = new LinearLayout.LayoutParams( butWidth, butHeight );
547
    pT.setMargins(margin, margin, margin, margin);
548
    LinearLayout.LayoutParams pB = new LinearLayout.LayoutParams( butWidth, lastButH  );
549
    pB.setMargins(margin, margin, margin, 2*margin);
550

    
551
    mPlayLayout.removeAllViews();
552

    
553
    RubikScores scores = RubikScores.getInstance();
554

    
555
    for(int i=0; i<numLevel; i++)
556
      {
557
      final int level     = i<numLevel-1 ? i+1 : dbLevel;
558
      final int scrambles = i<numLevel-1 ? i+1 : numScrambles;
559
      Button button = new Button(act);
560
      button.setLayoutParams(i==0 ? pT : (i==numLevel-1 ? pB : pM));
561
      button.setText(levels[i]);
562
      button.setTextSize(TypedValue.COMPLEX_UNIT_PX, mMenuTextSize);
563

    
564
      int icon = scores.isSolved(mObject, sizeIndex, level-1) ? R.drawable.ui_solved : R.drawable.ui_notsolved;
565
      button.setCompoundDrawablesWithIntrinsicBounds(icon,0,0,0);
566

    
567
      button.setOnClickListener( new View.OnClickListener()
568
        {
569
        @Override
570
        public void onClick(View v)
571
          {
572
          RubikPreRender pre = act.getPreRender();
573

    
574
          if(pre.isUINotBlocked())
575
            {
576
            mPlayPopup.dismiss();
577
            mLevelValue = level;
578
            pre.scrambleObject(scrambles);
579
            }
580
          }
581
        });
582

    
583
      mPlayLayout.addView(button);
584
      }
585
    }
586

    
587
///////////////////////////////////////////////////////////////////////////////////////////////////
588

    
589
  public int getLevel()
590
    {
591
    return mLevelValue;
592
    }
593

    
594
///////////////////////////////////////////////////////////////////////////////////////////////////
595

    
596
  public int getObject()
597
    {
598
    return mObject;
599
    }
600

    
601
///////////////////////////////////////////////////////////////////////////////////////////////////
602

    
603
  public int getSize()
604
    {
605
    return mSize;
606
    }
607
  }
(5-5/10)