Project

General

Profile

« Previous | Next » 

Revision 4f9f99a2

Added by Leszek Koltunski over 4 years ago

Separate the network package; rename RubikSize to RubikObject.

View differences:

src/main/java/org/distorted/dialog/RubikDialogScoresPagerAdapter.java
26 26
import android.view.View;
27 27
import android.view.ViewGroup;
28 28

  
29
import org.distorted.magic.RubikScoresDownloader;
30
import org.distorted.magic.RubikSize;
29
import org.distorted.network.RubikScoresDownloader;
30
import org.distorted.object.RubikObject;
31 31
import org.distorted.uistate.RubikStatePlay;
32 32

  
33 33
///////////////////////////////////////////////////////////////////////////////////////////////////
......
48 48

  
49 49
    addPage(mViews[c],country[c],name[c],time[c]);
50 50

  
51
    for(int i = 0; i< RubikSize.LENGTH; i++)
51
    for(int i = 0; i< RubikObject.LENGTH; i++)
52 52
      {
53 53
      if( i==c ) continue;
54 54

  
......
65 65
      @Override
66 66
      public void run()
67 67
        {
68
        for(int i=0; i<RubikSize.LENGTH; i++)
68
        for(int i = 0; i< RubikObject.LENGTH; i++)
69 69
          {
70 70
          mViews[i].prepareView(mAct);
71 71
          }
......
121 121
      @Override
122 122
      public void run()
123 123
        {
124
        for(int i=0; i<RubikSize.LENGTH; i++)
124
        for(int i = 0; i< RubikObject.LENGTH; i++)
125 125
          {
126 126
          mViews[i].exception(exce);
127 127
          }
......
134 134
  RubikDialogScoresPagerAdapter(FragmentActivity act, ViewPager viewPager)
135 135
    {
136 136
    mAct = act;
137
    mViews = new RubikDialogScoresView[RubikSize.LENGTH];
137
    mViews = new RubikDialogScoresView[RubikObject.LENGTH];
138 138
    mViewPager = viewPager;
139 139

  
140 140
    viewPager.setAdapter(this);
141
    viewPager.setOffscreenPageLimit( RubikSize.LENGTH-1 );
141
    viewPager.setOffscreenPageLimit( RubikObject.LENGTH-1 );
142 142
    }
143 143

  
144 144
///////////////////////////////////////////////////////////////////////////////////////////////////
......
152 152

  
153 153
    boolean allCreated = true;
154 154

  
155
    for(int i=0; i<RubikSize.LENGTH; i++)
155
    for(int i = 0; i< RubikObject.LENGTH; i++)
156 156
      {
157 157
      if( mViews[i]==null )
158 158
        {
......
183 183
  @Override
184 184
  public int getCount()
185 185
    {
186
    return RubikSize.LENGTH;
186
    return RubikObject.LENGTH;
187 187
    }
188 188

  
189 189
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff