| 32 |
32 |
|
| 33 |
33 |
public class MainSolvesPopup
|
| 34 |
34 |
{
|
| 35 |
|
private final int mWidth, mHeight;
|
|
35 |
private final int mMargin, mSize, mFontSize, mPadding;
|
|
36 |
private final int mObjectOrdinal, mNumScrambles, mLevel;
|
| 36 |
37 |
private final PopupWindow mPopup;
|
| 37 |
38 |
private final LinearLayout mLayout;
|
| 38 |
|
private final int mMargin, mSize, mFontSize, mPadding;
|
|
39 |
private final RubikObject mObject;
|
| 39 |
40 |
|
| 40 |
41 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
| 41 |
42 |
|
| 42 |
|
MainSolvesPopup(MainActivity act, RubikObject object, JSONArray array, int popupWidth, int popupHeight)
|
|
43 |
MainSolvesPopup(MainActivity act, RubikObject object, int ordinal, int numScrambles, int level, JSONArray array, int height)
|
| 43 |
44 |
{
|
| 44 |
|
mWidth = popupWidth;
|
| 45 |
|
mHeight= popupHeight;
|
|
45 |
mObject= object;
|
|
46 |
|
|
47 |
mObjectOrdinal = ordinal;
|
|
48 |
mNumScrambles = numScrambles;
|
|
49 |
mLevel = level;
|
| 46 |
50 |
|
| 47 |
|
mMargin = (int)(mHeight*0.01f);
|
| 48 |
|
mSize = (int)(mHeight*0.14f);
|
| 49 |
|
mFontSize = (int)(mHeight*0.02f);
|
| 50 |
|
mPadding = (int)(mHeight*0.01f);
|
|
51 |
mMargin = (int)(height*0.01f);
|
|
52 |
mSize = (int)(height*0.14f);
|
|
53 |
mFontSize = (int)(height*0.02f);
|
|
54 |
mPadding = (int)(height*0.01f);
|
| 51 |
55 |
|
| 52 |
56 |
LayoutInflater layoutInflater = (LayoutInflater)act.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
| 53 |
57 |
final View layout = layoutInflater.inflate(R.layout.dialog_scrollable_solves, null);
|
| ... | ... | |
| 179 |
183 |
@Override
|
| 180 |
184 |
public void onClick(View v)
|
| 181 |
185 |
{
|
| 182 |
|
android.util.Log.e("D", "PLAY");
|
|
186 |
mPopup.dismiss();
|
|
187 |
act.switchToPlay(mObject,mObjectOrdinal,mNumScrambles,mLevel);
|
| 183 |
188 |
}
|
| 184 |
189 |
});
|
| 185 |
190 |
|
progress with remembering solves.