Revision 59cc16ae
Added by Leszek Koltunski almost 4 years ago
| src/main/java/org/distorted/screens/RubikScreenPlay.java | ||
|---|---|---|
| 561 | 561 |  | 
| 562 | 562 | public void adjustSolvedIcons() | 
| 563 | 563 |     {
 | 
| 564 | int currObject = RubikObjectList.getCurrObject(); | |
| 565 | int dbLevel = RubikObjectList.getDBLevel(currObject); | |
| 566 | int numLevel= Math.min(dbLevel, LEVELS_SHOWN); | |
| 567 | RubikScores scores = RubikScores.getInstance(); | |
| 568 |  | |
| 569 | for(int i=0; i<numLevel; i++) | |
| 564 | if( mPlayLayout!=null ) | |
| 570 | 565 |       {
 | 
| 571 | int level = i<numLevel-1 ? i+1 : dbLevel; | |
| 572 | Button button = (Button)mPlayLayout.getChildAt(i); | |
| 573 | int icon = scores.isSolved(currObject, level-1) ? R.drawable.ui_solved : R.drawable.ui_notsolved; | |
| 574 | button.setCompoundDrawablesWithIntrinsicBounds(icon,0,0,0); | |
| 566 | int currObject = RubikObjectList.getCurrObject(); | |
| 567 | int dbLevel = RubikObjectList.getDBLevel(currObject); | |
| 568 | int numLevel= Math.min(dbLevel, LEVELS_SHOWN); | |
| 569 | RubikScores scores = RubikScores.getInstance(); | |
| 570 |  | |
| 571 | for(int i=0; i<numLevel; i++) | |
| 572 |         {
 | |
| 573 | int level = i<numLevel-1 ? i+1 : dbLevel; | |
| 574 | Button button = (Button)mPlayLayout.getChildAt(i); | |
| 575 | int icon = scores.isSolved(currObject, level-1) ? R.drawable.ui_solved : R.drawable.ui_notsolved; | |
| 576 | button.setCompoundDrawablesWithIntrinsicBounds(icon,0,0,0); | |
| 577 | } | |
| 575 | 578 | } | 
| 576 | 579 | } | 
| 577 | 580 |  | 
Also available in: Unified diff
Crash fix.