Revision 4b4e6837
Added by Leszek Koltunski over 4 years ago
src/main/java/org/distorted/states/RubikStatePattern.java | ||
---|---|---|
112 | 112 |
if( mNextButton==null ) setupNextButton(act,scale); |
113 | 113 |
if( mMovesText ==null ) setupTextView(act,scale); |
114 | 114 |
|
115 |
setTrioState(false); |
|
116 |
|
|
115 | 117 |
LinearLayout layoutLeft = act.findViewById(R.id.mainBarLeft); |
116 | 118 |
layoutLeft.removeAllViews(); |
117 | 119 |
layoutLeft.addView(mPrevButton); |
... | ... | |
136 | 138 |
diag.show( manager, RubikDialogPattern.getDialogTag() ); |
137 | 139 |
} |
138 | 140 |
|
141 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
142 |
|
|
143 |
private void setTrioState(boolean enable) |
|
144 |
{ |
|
145 |
int state = enable ? View.VISIBLE : View.INVISIBLE; |
|
146 |
|
|
147 |
if( mPrevButton!=null ) mPrevButton.setVisibility(state); |
|
148 |
if( mNextButton!=null ) mNextButton.setVisibility(state); |
|
149 |
if( mMovesText !=null ) mMovesText.setVisibility(state); |
|
150 |
} |
|
151 |
|
|
139 | 152 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
140 | 153 |
|
141 | 154 |
private void setupBackButton(final RubikActivity act, final float scale) |
... | ... | |
158 | 171 |
if( diag==null ) |
159 | 172 |
{ |
160 | 173 |
showDialog(mana); |
174 |
setTrioState(false); |
|
161 | 175 |
} |
162 | 176 |
else |
163 | 177 |
{ |
... | ... | |
242 | 256 |
mCategory = category; |
243 | 257 |
mPattern = pattern; |
244 | 258 |
|
259 |
setTrioState(true); |
|
260 |
|
|
245 | 261 |
RubikPattern patt = RubikPattern.getInstance(); |
246 | 262 |
String patternName = patt.getPatternName(ordinal,category,pattern); |
247 | 263 |
mText.setText(patternName); |
Also available in: Unified diff
UII improvement in StatePattern