Revision a6d3b158
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/uistate/RubikStateMain.java | ||
---|---|---|
23 | 23 |
import android.support.v4.app.FragmentManager; |
24 | 24 |
import android.util.DisplayMetrics; |
25 | 25 |
import android.view.LayoutInflater; |
26 |
import android.view.View; |
|
26 | 27 |
import android.widget.Button; |
27 | 28 |
import android.widget.LinearLayout; |
28 | 29 |
import android.widget.TextView; |
29 | 30 |
|
30 | 31 |
import org.distorted.dialog.RubikDialogMain; |
31 |
import org.distorted.dialog.RubikDialogPattern; |
|
32 | 32 |
import org.distorted.magic.R; |
33 | 33 |
import org.distorted.magic.RubikActivity; |
34 | 34 |
|
... | ... | |
53 | 53 |
|
54 | 54 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
55 | 55 |
|
56 |
void enterState(RubikActivity act, RubikState prev)
|
|
56 |
void enterState(final RubikActivity act)
|
|
57 | 57 |
{ |
58 | 58 |
FragmentManager mana = act.getSupportFragmentManager(); |
59 | 59 |
RubikDialogMain diag = (RubikDialogMain) mana.findFragmentByTag(RubikDialogMain.getDialogTag()); |
... | ... | |
64 | 64 |
diag2.show( mana, RubikDialogMain.getDialogTag() ); |
65 | 65 |
} |
66 | 66 |
|
67 |
if( prev==RubikState.PATT ) |
|
68 |
{ |
|
69 |
RubikDialogPattern diag2 = new RubikDialogPattern(); |
|
70 |
diag2.show( mana, RubikDialogPattern.getDialogTag() ); |
|
71 |
} |
|
72 |
|
|
73 | 67 |
LayoutInflater inflater = act.getLayoutInflater(); |
74 | 68 |
|
75 | 69 |
// TOP //////////////////////////// |
... | ... | |
95 | 89 |
buttonR.setId(BUTTON_ID_BACK); |
96 | 90 |
buttonR.setPadding(padding,0,padding,0); |
97 | 91 |
buttonR.setText(R.string.exit); |
98 |
buttonR.setOnClickListener(act); |
|
92 |
|
|
93 |
buttonR.setOnClickListener( new View.OnClickListener() |
|
94 |
{ |
|
95 |
@Override |
|
96 |
public void onClick(View v) |
|
97 |
{ |
|
98 |
RubikState.goBack(act); |
|
99 |
} |
|
100 |
}); |
|
101 |
|
|
99 | 102 |
layoutRight.addView(buttonR); |
100 | 103 |
} |
101 | 104 |
|
Also available in: Unified diff
Progress with Pretty Patterns.