Revision 4f36e418
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/states/RubikStateSolver.java | ||
---|---|---|
106 | 106 |
for(ImageButton button: mColorButton) layoutTop.addView(button); |
107 | 107 |
|
108 | 108 |
// BOT //////////////////////////// |
109 |
if( mSolveButton==null ) setupSolveButton(act,scale);
|
|
109 |
setupSolveButton(act,scale); |
|
110 | 110 |
|
111 | 111 |
LinearLayout layoutLeft = act.findViewById(R.id.mainBarLeft); |
112 | 112 |
layoutLeft.removeAllViews(); |
113 | 113 |
layoutLeft.addView(mSolveButton); |
114 | 114 |
|
115 |
if( mBackButton==null ) setupBackButton(act,scale);
|
|
115 |
setupBackButton(act,scale); |
|
116 | 116 |
|
117 | 117 |
LinearLayout layoutRight = act.findViewById(R.id.mainBarRight); |
118 | 118 |
layoutRight.removeAllViews(); |
... | ... | |
252 | 252 |
|
253 | 253 |
public void savePreferences(SharedPreferences.Editor editor) |
254 | 254 |
{ |
255 |
mColorButton = null; |
|
256 |
mBackButton = null; |
|
257 |
mSolveButton = null; |
|
258 |
|
|
259 | 255 |
editor.putInt("stateSolver_color", mCurrentColor); |
260 | 256 |
} |
261 | 257 |
|
Also available in: Unified diff
Hopefully get rid of the most common crash in the field right now by changing the States to always create all their Views from scratch.