Project

General

Profile

« Previous | Next » 

Revision e0e84674

Added by Leszek Koltunski about 4 years ago

Improve the upper_text.

View differences:

src/main/java/org/distorted/uistate/RubikStatePattern.java
39 39

  
40 40
public class RubikStatePattern extends RubikStateAbstract
41 41
  {
42
  // TODO: read this from upper_text.xml;  this is the height of the TextView there.
43
  private static final int DEFAULT_TEXT_SIZE = 30;
44

  
42 45
  private TextView mText;
43 46
  private Button mBackButton;
44 47
  private int mSize;
......
144 147

  
145 148
        if( diag==null )
146 149
          {
150
          mText.setTextSize(DEFAULT_TEXT_SIZE);
151
          mText.setText(R.string.patterns);
147 152
          showDialog(mana);
148 153
          }
149 154
        else
......
157 162

  
158 163
///////////////////////////////////////////////////////////////////////////////////////////////////
159 164

  
160
  public void setPatternName(String name)
165
  public void setPattern(int sizeIndex, int category, int pattern)
161 166
    {
162
    mText.setText(name);
167
    RubikPattern patt = RubikPattern.getInstance();
168
    String patternName = patt.getPatternName(sizeIndex,category,pattern);
169
    mText.setText(patternName);
163 170
    }
164 171

  
165 172
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff