Revision 4d23405c
Added by Leszek Koltunski over 5 years ago
| src/main/java/org/distorted/main/RubikPostRender.java | ||
|---|---|---|
| 515 | 515 |
if( i==BaseEffect.Type.SCRAMBLE.ordinal() ) |
| 516 | 516 |
{
|
| 517 | 517 |
final RubikActivity act = (RubikActivity)mView.getContext(); |
| 518 |
RubikStateSolving solving = (RubikStateSolving)RubikState.SOLV.getStateClass(); |
|
| 519 |
solving.resetUpperText(); |
|
| 518 | 520 |
|
| 519 | 521 |
act.runOnUiThread(new Runnable() |
| 520 | 522 |
{
|
| src/main/java/org/distorted/states/RubikStateSolving.java | ||
|---|---|---|
| 45 | 45 |
{
|
| 46 | 46 |
private static final int DURATION_MILLIS = 750; |
| 47 | 47 |
|
| 48 |
private int mUpperText; |
|
| 48 | 49 |
private TextView mTime; |
| 49 | 50 |
private Timer mTimer; |
| 50 | 51 |
private long mStartTime; |
| ... | ... | |
| 98 | 99 |
LinearLayout layoutTop = act.findViewById(R.id.upperBar); |
| 99 | 100 |
layoutTop.removeAllViews(); |
| 100 | 101 |
mTime = (TextView)inflater.inflate(R.layout.upper_text, null); |
| 101 |
mTime.setText(R.string.ready);
|
|
| 102 |
mTime.setText(mUpperText);
|
|
| 102 | 103 |
layoutTop.addView(mTime); |
| 103 | 104 |
|
| 104 | 105 |
// BOT //////////////////////////// |
| ... | ... | |
| 263 | 264 |
@Override |
| 264 | 265 |
public void run() |
| 265 | 266 |
{
|
| 266 |
mTime.setText(R.string.solved); |
|
| 267 |
mUpperText = R.string.solved; |
|
| 268 |
mTime.setText(mUpperText); |
|
| 267 | 269 |
mBack.setClickable(false); |
| 268 | 270 |
mPrevButton.setVisibility(View.INVISIBLE); |
| 269 | 271 |
} |
| ... | ... | |
| 292 | 294 |
return 0; |
| 293 | 295 |
} |
| 294 | 296 |
|
| 297 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
| 298 |
|
|
| 299 |
public void resetUpperText() |
|
| 300 |
{
|
|
| 301 |
mUpperText = R.string.ready; |
|
| 302 |
} |
|
| 303 |
|
|
| 295 | 304 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 296 | 305 |
|
| 297 | 306 |
public void onActionFinished(final long effectID) |
Also available in: Unified diff
Bugfix in StateSolving upper text - before when we won, and NewRecord dialog was on the screen, and at tis moment we rotated the screen, the uppoer text would revert back to 'Ready?'