Revision e71baee1
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/dialogs/RubikDialogAbout.java | ||
---|---|---|
1 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
2 |
// Copyright 2022 Leszek Koltunski // |
|
3 |
// // |
|
4 |
// This file is part of Magic Cube. // |
|
5 |
// // |
|
6 |
// Magic Cube is proprietary software licensed under an EULA which you should have received // |
|
7 |
// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html // |
|
8 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
9 |
|
|
10 |
package org.distorted.dialogs; |
|
11 |
|
|
12 |
import android.app.Dialog; |
|
13 |
import android.content.pm.PackageInfo; |
|
14 |
import android.content.pm.PackageManager; |
|
15 |
import android.content.res.Resources; |
|
16 |
import android.view.View; |
|
17 |
import android.view.Window; |
|
18 |
import android.view.WindowManager; |
|
19 |
|
|
20 |
import androidx.fragment.app.FragmentActivity; |
|
21 |
|
|
22 |
import org.distorted.main.R; |
|
23 |
import org.distorted.main.RubikActivity; |
|
24 |
|
|
25 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
26 |
|
|
27 |
public class RubikDialogAbout extends RubikDialogAbstract |
|
28 |
{ |
|
29 |
private static final String WHATS_NEW = |
|
30 |
"1. Implement 2x2x3, Pyraminx & Skewb Diamond solvers.\n" + |
|
31 |
"2. Connect the solvers to the scrambling engine. Which means: from now on, " + |
|
32 |
"all puzzles which have a solver implemented will be perfectly scrambled " + |
|
33 |
" - i.e. any scramble at Level 7 will always require exactly 7 moves to solve. " + |
|
34 |
"Which also means that in some point in the future, we'll have to clear the High Scores.\n" + |
|
35 |
"3. Implement Icosamate & Master Icosamate"; |
|
36 |
|
|
37 |
private static final String WHATS_COMING = |
|
38 |
"1. Implemented Pocket Cube, Skewb solvers.\n" + |
|
39 |
"2. Support for adjustable stickers.\n" + |
|
40 |
"3. In-game currency (stars)\n" + |
|
41 |
"4. More objects (Penrose Cubes, higher-order Jings, Ghost Cubes, more Mirrors, more Mixups)"; |
|
42 |
|
|
43 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
44 |
|
|
45 |
@Override |
|
46 |
public void onResume() |
|
47 |
{ |
|
48 |
super.onResume(); |
|
49 |
|
|
50 |
Window window = getDialog().getWindow(); |
|
51 |
|
|
52 |
if( window!=null ) |
|
53 |
{ |
|
54 |
WindowManager.LayoutParams params = window.getAttributes(); |
|
55 |
params.width = (int)Math.min( mHeight*0.60f,mWidth*0.90f ); |
|
56 |
window.setAttributes(params); |
|
57 |
} |
|
58 |
} |
|
59 |
|
|
60 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
61 |
|
|
62 |
public int getResource() { return R.layout.dialog_about; } |
|
63 |
public int getTitleResource() { return PARAMETRIC_TITLE; } |
|
64 |
public boolean hasArgument() { return true; } |
|
65 |
public int getPositive() { return R.string.ok; } |
|
66 |
public int getNegative() { return -1; } |
|
67 |
public void positiveAction() { } |
|
68 |
public void negativeAction() { } |
|
69 |
|
|
70 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
71 |
|
|
72 |
private String findCurrentVersion(RubikActivity act) |
|
73 |
{ |
|
74 |
String version; |
|
75 |
try |
|
76 |
{ |
|
77 |
PackageInfo pInfo = act.getPackageManager().getPackageInfo( act.getPackageName(), 0); |
|
78 |
version= pInfo.versionName; |
|
79 |
} |
|
80 |
catch (PackageManager.NameNotFoundException e) |
|
81 |
{ |
|
82 |
version= "unknown"; |
|
83 |
} |
|
84 |
|
|
85 |
return version; |
|
86 |
} |
|
87 |
|
|
88 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
89 |
|
|
90 |
@Override |
|
91 |
String getTitleString(FragmentActivity act) |
|
92 |
{ |
|
93 |
Resources res= getResources(); |
|
94 |
RubikActivity ract= (RubikActivity) getContext(); |
|
95 |
String version= ract!=null ? findCurrentVersion(ract) : "unknown"; |
|
96 |
return res.getString(R.string.ab_placeholder,version); |
|
97 |
} |
|
98 |
|
|
99 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
100 |
|
|
101 |
public void prepareBody(Dialog dialog, View view, FragmentActivity act, float size) |
|
102 |
{ |
|
103 |
int margin= (int)(mHeight*0.010f); |
|
104 |
int titleH= (int)(mHeight*0.035f); |
|
105 |
int padd = (int)(mHeight*0.010f); |
|
106 |
} |
|
107 |
|
|
108 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
109 |
|
|
110 |
public static String getDialogTag() |
|
111 |
{ |
|
112 |
return "DialogAbout"; |
|
113 |
} |
|
114 |
} |
src/main/java/org/distorted/dialogs/RubikDialogAbstract.java | ||
---|---|---|
32 | 32 |
|
33 | 33 |
abstract public class RubikDialogAbstract extends AppCompatDialogFragment |
34 | 34 |
{ |
35 |
static final int PARAMETRIC_TITLE = -10000; |
|
36 |
|
|
35 | 37 |
protected float mTitleSize, mButSize, mTextSize; |
36 | 38 |
protected int mWidth, mHeight; |
37 | 39 |
protected String mArgument; |
... | ... | |
47 | 49 |
abstract void negativeAction(); |
48 | 50 |
abstract void prepareBody(Dialog dialog, View view, FragmentActivity act, float size); |
49 | 51 |
|
52 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
53 |
|
|
54 |
String getTitleString(FragmentActivity act) |
|
55 |
{ |
|
56 |
return ""; |
|
57 |
} |
|
58 |
|
|
50 | 59 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
51 | 60 |
|
52 | 61 |
@NonNull |
... | ... | |
85 | 94 |
builder.setCancelable(true); |
86 | 95 |
|
87 | 96 |
int title = getTitleResource(); |
88 |
if( title>=0 ) |
|
97 |
if( title>=0 || title==PARAMETRIC_TITLE )
|
|
89 | 98 |
{ |
90 | 99 |
TextView tv = (TextView) inflater.inflate(R.layout.dialog_title, null); |
91 | 100 |
tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTitleSize); |
92 |
tv.setText(title); |
|
101 |
|
|
102 |
if( title>=0 ) |
|
103 |
{ |
|
104 |
tv.setText(title); |
|
105 |
} |
|
106 |
else |
|
107 |
{ |
|
108 |
String titleString = getTitleString(act); |
|
109 |
tv.setText(titleString); |
|
110 |
} |
|
111 |
|
|
93 | 112 |
builder.setCustomTitle(tv); |
94 | 113 |
} |
95 | 114 |
|
src/main/java/org/distorted/dialogs/RubikDialogWhatsNew.java | ||
---|---|---|
1 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
2 |
// Copyright 2022 Leszek Koltunski // |
|
3 |
// // |
|
4 |
// This file is part of Magic Cube. // |
|
5 |
// // |
|
6 |
// Magic Cube is proprietary software licensed under an EULA which you should have received // |
|
7 |
// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html // |
|
8 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
9 |
|
|
10 |
package org.distorted.dialogs; |
|
11 |
|
|
12 |
import android.app.Dialog; |
|
13 |
import android.content.pm.PackageInfo; |
|
14 |
import android.content.pm.PackageManager; |
|
15 |
import android.view.View; |
|
16 |
import android.view.Window; |
|
17 |
import android.view.WindowManager; |
|
18 |
import android.widget.LinearLayout; |
|
19 |
import android.widget.TextView; |
|
20 |
|
|
21 |
import androidx.fragment.app.FragmentActivity; |
|
22 |
|
|
23 |
import org.distorted.main.R; |
|
24 |
import org.distorted.main.RubikActivity; |
|
25 |
|
|
26 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
27 |
|
|
28 |
public class RubikDialogWhatsNew extends RubikDialogAbstract |
|
29 |
{ |
|
30 |
private static final String[] MESSAGES = |
|
31 |
{ |
|
32 |
"1.12.1", |
|
33 |
|
|
34 |
"1. This dialog :)\n" + |
|
35 |
"2. UI ready for NEW SOLVERS\n" + |
|
36 |
"3. Important fix for a bug which used to let players solve any scramble with just one move\n" + |
|
37 |
"4. Support for curved walls of cubies (preparation for Penrose Cubes)\n" + |
|
38 |
"5. Support for scrambling algorithms (preparation for AI Cube & Camouflage Cubes)", |
|
39 |
|
|
40 |
"1.12.2", |
|
41 |
|
|
42 |
"1. Fixes for two critical crashers that appeared in the previous version.", |
|
43 |
|
|
44 |
"1.12.3", |
|
45 |
|
|
46 |
"1. Implement the first two solvers - Pyraminx Duo & Ivy Cube\n" + |
|
47 |
"2. Implement AI Cube and Burr Cube\n" + |
|
48 |
"3. Many fixes - for Trajber 4x4, touch control, creation of Bandaged Cuboids, scores dialog...", |
|
49 |
|
|
50 |
"1.12.4", |
|
51 |
|
|
52 |
"1. Implement 2x2x3, Pyraminx & Skewb Diamond solvers.\n" + |
|
53 |
"2. Connect the solvers to the scrambling engine. Which means: from now on, " + |
|
54 |
"all puzzles which have a solver implemented will be perfectly scrambled " + |
|
55 |
" - i.e. any scramble at Level 7 will always require exactly 7 moves to solve. " + |
|
56 |
"Which also means that in some point in the future, we'll have to clear the High Scores.\n" + |
|
57 |
"3. Implement Icosamate & Master Icosamate", |
|
58 |
|
|
59 |
"Coming", |
|
60 |
|
|
61 |
"1. Implemented Pocket Cube, Skewb solvers.\n" + |
|
62 |
"2. Support for adjustable stickers.\n" + |
|
63 |
"3. In-game currency (stars)\n" + |
|
64 |
"4. More objects (Penrose Cubes, the Double-Crazy, Ghost Cubes, more Mirrors, more Mixups, Clover Cube)" |
|
65 |
}; |
|
66 |
|
|
67 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
68 |
|
|
69 |
@Override |
|
70 |
public void onResume() |
|
71 |
{ |
|
72 |
super.onResume(); |
|
73 |
|
|
74 |
Window window = getDialog().getWindow(); |
|
75 |
|
|
76 |
if( window!=null ) |
|
77 |
{ |
|
78 |
WindowManager.LayoutParams params = window.getAttributes(); |
|
79 |
params.width = (int)Math.min( mHeight*0.65f,mWidth*0.98f ); |
|
80 |
window.setAttributes(params); |
|
81 |
} |
|
82 |
} |
|
83 |
|
|
84 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
85 |
|
|
86 |
public int getResource() { return R.layout.dialog_scrollable_panes; } |
|
87 |
public int getTitleResource() { return R.string.whatsnew; } |
|
88 |
public boolean hasArgument() { return true; } |
|
89 |
public int getPositive() { return R.string.ok; } |
|
90 |
public int getNegative() { return -1; } |
|
91 |
|
|
92 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
93 |
|
|
94 |
public void positiveAction() |
|
95 |
{ |
|
96 |
|
|
97 |
} |
|
98 |
|
|
99 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
100 |
|
|
101 |
public void negativeAction() |
|
102 |
{ |
|
103 |
|
|
104 |
} |
|
105 |
|
|
106 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
107 |
|
|
108 |
public void prepareBody(Dialog dialog, View view, FragmentActivity act, float size) |
|
109 |
{ |
|
110 |
int margin= (int)(mHeight*0.010f); |
|
111 |
int titleH= (int)(mHeight*0.035f); |
|
112 |
int padd = (int)(mHeight*0.010f); |
|
113 |
|
|
114 |
LinearLayout layout= view.findViewById(R.id.dialog_scrollable_main_layout); |
|
115 |
TextView text = view.findViewById(R.id.dialog_scrollable_message); |
|
116 |
text.setVisibility(View.GONE); |
|
117 |
|
|
118 |
LinearLayout.LayoutParams pV = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT ); |
|
119 |
pV.setMargins(margin, margin, margin, 0); |
|
120 |
LinearLayout.LayoutParams pL = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT ); |
|
121 |
pL.setMargins(margin, margin, margin, margin); |
|
122 |
LinearLayout.LayoutParams pT = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, titleH ); |
|
123 |
LinearLayout.LayoutParams pM = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT ); |
|
124 |
pM.setMargins(0,2*margin,0,0); |
|
125 |
|
|
126 |
RubikActivity ract = (RubikActivity) getContext(); |
|
127 |
int numMessages= MESSAGES.length/2; |
|
128 |
String thisVersion = findCurrentVersion(ract); |
|
129 |
|
|
130 |
for(int i=0; i<numMessages; i++) |
|
131 |
{ |
|
132 |
String version = MESSAGES[2*i]; |
|
133 |
String message = MESSAGES[2*i+1]; |
|
134 |
boolean isCurrent = version.equals(thisVersion); |
|
135 |
|
|
136 |
RubikDialogWhatsNewView pane = new RubikDialogWhatsNewView(ract,version,message,padd, isCurrent, (i==(numMessages-1) ? pL:pV),pT,pM); |
|
137 |
layout.addView(pane.getView()); |
|
138 |
} |
|
139 |
} |
|
140 |
|
|
141 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
142 |
|
|
143 |
private String findCurrentVersion(RubikActivity act) |
|
144 |
{ |
|
145 |
String version; |
|
146 |
try |
|
147 |
{ |
|
148 |
PackageInfo pInfo = act.getPackageManager().getPackageInfo( act.getPackageName(), 0); |
|
149 |
version= pInfo.versionName; |
|
150 |
} |
|
151 |
catch (PackageManager.NameNotFoundException e) |
|
152 |
{ |
|
153 |
version= "unknown"; |
|
154 |
} |
|
155 |
|
|
156 |
return version; |
|
157 |
} |
|
158 |
|
|
159 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
160 |
|
|
161 |
private int findVersion(String version) |
|
162 |
{ |
|
163 |
int len = MESSAGES.length; |
|
164 |
|
|
165 |
for(int i=0; i<len; i++) |
|
166 |
{ |
|
167 |
if( MESSAGES[i].equals(version) ) return i; |
|
168 |
} |
|
169 |
|
|
170 |
return 0; |
|
171 |
} |
|
172 |
|
|
173 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
174 |
|
|
175 |
public static String getDialogTag() |
|
176 |
{ |
|
177 |
return "DialogSolvers"; |
|
178 |
} |
|
179 |
} |
src/main/java/org/distorted/dialogs/RubikDialogWhatsNewView.java | ||
---|---|---|
1 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
2 |
// Copyright 2023 Leszek Koltunski // |
|
3 |
// // |
|
4 |
// This file is part of Magic Cube. // |
|
5 |
// // |
|
6 |
// Magic Cube is proprietary software licensed under an EULA which you should have received // |
|
7 |
// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html // |
|
8 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
9 |
|
|
10 |
package org.distorted.dialogs; |
|
11 |
|
|
12 |
import android.view.View; |
|
13 |
import android.widget.LinearLayout; |
|
14 |
import android.widget.TextView; |
|
15 |
|
|
16 |
import org.distorted.main.R; |
|
17 |
import org.distorted.main.RubikActivity; |
|
18 |
|
|
19 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
20 |
|
|
21 |
public class RubikDialogWhatsNewView |
|
22 |
{ |
|
23 |
private final View mView; |
|
24 |
|
|
25 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
26 |
|
|
27 |
public RubikDialogWhatsNewView(final RubikActivity act, String version, String message, int padding, boolean isCurrent, |
|
28 |
LinearLayout.LayoutParams pView, LinearLayout.LayoutParams pTitle, LinearLayout.LayoutParams pMessage ) |
|
29 |
{ |
|
30 |
mView = act.getLayoutInflater().inflate(R.layout.dialog_whatsnew_pane, null); |
|
31 |
mView.setLayoutParams(pView); |
|
32 |
mView.setPadding(padding,padding,padding,padding); |
|
33 |
|
|
34 |
TextView titleView = mView.findViewById(R.id.whatsnew_pane_title); |
|
35 |
titleView.setText( isCurrent ? act.getString(R.string.tv_placeholder,version) : version ); |
|
36 |
titleView.setLayoutParams(pTitle); |
|
37 |
|
|
38 |
TextView messView = mView.findViewById(R.id.whatsnew_pane_message); |
|
39 |
messView.setText(message); |
|
40 |
messView.setLayoutParams(pMessage); |
|
41 |
} |
|
42 |
|
|
43 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
44 |
|
|
45 |
public View getView() |
|
46 |
{ |
|
47 |
return mView; |
|
48 |
} |
|
49 |
} |
src/main/java/org/distorted/main/RubikActivity.java | ||
---|---|---|
35 | 35 |
|
36 | 36 |
import org.distorted.config.ConfigActivity; |
37 | 37 |
import org.distorted.bandaged.BandagedCreatorActivity; |
38 |
import org.distorted.dialogs.RubikDialogWhatsNew;
|
|
38 |
import org.distorted.dialogs.RubikDialogAbout;
|
|
39 | 39 |
import org.distorted.library.main.DistortedLibrary; |
40 | 40 |
|
41 | 41 |
import org.distorted.library.main.DistortedScreen; |
... | ... | |
300 | 300 |
{ |
301 | 301 |
Bundle bundle = new Bundle(); |
302 | 302 |
bundle.putString("argument",mOldVersion); |
303 |
RubikDialogWhatsNew newDialog = new RubikDialogWhatsNew();
|
|
303 |
RubikDialogAbout newDialog = new RubikDialogAbout();
|
|
304 | 304 |
newDialog.setArguments(bundle); |
305 |
newDialog.show(getSupportFragmentManager(), RubikDialogWhatsNew.getDialogTag() );
|
|
305 |
newDialog.show(getSupportFragmentManager(), RubikDialogAbout.getDialogTag() );
|
|
306 | 306 |
} |
307 | 307 |
|
308 | 308 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/screens/RubikScreenPlay.java | ||
---|---|---|
33 | 33 |
import org.distorted.dialogs.RubikDialogSolvers; |
34 | 34 |
import org.distorted.dialogs.RubikDialogStarsStatus; |
35 | 35 |
import org.distorted.dialogs.RubikDialogUpdates; |
36 |
import org.distorted.dialogs.RubikDialogWhatsNew;
|
|
36 |
import org.distorted.dialogs.RubikDialogAbout;
|
|
37 | 37 |
import org.distorted.external.RubikNetwork; |
38 | 38 |
import org.distorted.external.RubikScores; |
39 | 39 |
import org.distorted.external.RubikUpdates; |
... | ... | |
455 | 455 |
public void onClick(View v) |
456 | 456 |
{ |
457 | 457 |
mMenuPopup.dismiss(); |
458 |
RubikDialogWhatsNew aDiag = new RubikDialogWhatsNew();
|
|
458 |
RubikDialogAbout aDiag = new RubikDialogAbout();
|
|
459 | 459 |
aDiag.show(act.getSupportFragmentManager(), null); |
460 | 460 |
} |
461 | 461 |
}); |
src/main/res/layout/dialog_about.xml | ||
---|---|---|
6 | 6 |
android:orientation="vertical"> |
7 | 7 |
|
8 | 8 |
<LinearLayout |
9 |
android:id="@+id/about_share_layout" |
|
9 | 10 |
android:layout_width="fill_parent" |
10 |
android:layout_height="wrap_content"
|
|
11 |
android:layout_height="100dp"
|
|
11 | 12 |
android:gravity="center|fill_horizontal" |
12 | 13 |
android:layout_marginLeft="10dp" |
13 | 14 |
android:layout_marginRight="10dp" |
... | ... | |
16 | 17 |
android:orientation="horizontal"> |
17 | 18 |
|
18 | 19 |
<ImageView |
19 |
android:layout_gravity="center"
|
|
20 |
android:layout_gravity="top"
|
|
20 | 21 |
android:layout_height="wrap_content" |
21 |
android:layout_width="wrap_content" |
|
22 |
android:src="@drawable/share"/> |
|
22 |
android:layout_marginStart="5dp" |
|
23 |
android:layout_width="0dp" |
|
24 |
android:layout_weight="0.25" |
|
25 |
android:src="@drawable/ui_share"/> |
|
23 | 26 |
|
24 |
<TextView |
|
25 |
android:id="@+id/about_share_string" |
|
26 |
android:layout_width="wrap_content" |
|
27 |
android:layout_height="wrap_content" |
|
28 |
android:gravity="start" |
|
29 |
android:textSize="24sp" |
|
30 |
android:text="@string/share" |
|
31 |
android:layout_marginTop="10dp" |
|
32 |
android:layout_marginLeft="10dp" |
|
33 |
android:layout_marginRight="10dp" |
|
34 |
android:layout_marginBottom="10dp"/> |
|
27 |
<LinearLayout |
|
28 |
android:layout_width="0dp" |
|
29 |
android:layout_height="match_parent" |
|
30 |
android:layout_weight="1" |
|
31 |
android:gravity="center|fill_horizontal" |
|
32 |
android:background="@color/dark_grey" |
|
33 |
android:orientation="vertical"> |
|
34 |
|
|
35 |
<TextView |
|
36 |
android:id="@+id/about_share_string" |
|
37 |
android:layout_width="match_parent" |
|
38 |
android:layout_height="wrap_content" |
|
39 |
android:gravity="start" |
|
40 |
android:textSize="20sp" |
|
41 |
android:text="@string/share" |
|
42 |
android:layout_marginTop="5dp" |
|
43 |
android:layout_marginLeft="10dp" |
|
44 |
android:layout_marginRight="10dp" |
|
45 |
android:layout_marginBottom="5dp"/> |
|
46 |
</LinearLayout> |
|
35 | 47 |
</LinearLayout> |
36 | 48 |
|
37 | 49 |
<LinearLayout |
50 |
android:id="@+id/about_email_layout" |
|
38 | 51 |
android:layout_width="fill_parent" |
39 |
android:layout_height="wrap_content"
|
|
52 |
android:layout_height="100dp"
|
|
40 | 53 |
android:gravity="center|fill_horizontal" |
41 | 54 |
android:layout_marginLeft="10dp" |
42 | 55 |
android:layout_marginRight="10dp" |
... | ... | |
45 | 58 |
android:orientation="horizontal"> |
46 | 59 |
|
47 | 60 |
<ImageView |
48 |
android:layout_gravity="center"
|
|
61 |
android:layout_gravity="top"
|
|
49 | 62 |
android:layout_height="wrap_content" |
50 |
android:layout_width="wrap_content" |
|
51 |
android:src="@drawable/email"/> |
|
63 |
android:layout_marginStart="5dp" |
|
64 |
android:layout_width="0dp" |
|
65 |
android:layout_weight="0.25" |
|
66 |
android:src="@drawable/ui_contact"/> |
|
52 | 67 |
|
53 | 68 |
<LinearLayout |
54 |
android:layout_width="match_parent"
|
|
69 |
android:layout_width="0dp"
|
|
55 | 70 |
android:layout_height="match_parent" |
71 |
android:layout_weight="1" |
|
56 | 72 |
android:gravity="center|fill_horizontal" |
57 |
android:layout_marginLeft="10dp" |
|
58 |
android:layout_marginRight="10dp" |
|
59 | 73 |
android:background="@color/dark_grey" |
60 | 74 |
android:orientation="vertical"> |
61 | 75 |
|
... | ... | |
64 | 78 |
android:layout_width="wrap_content" |
65 | 79 |
android:layout_height="wrap_content" |
66 | 80 |
android:gravity="start" |
67 |
android:textSize="18sp"
|
|
81 |
android:textSize="20sp"
|
|
68 | 82 |
android:text="@string/contact" |
69 | 83 |
android:layout_marginTop="5dp" |
70 | 84 |
android:layout_marginLeft="10dp" |
... | ... | |
75 | 89 |
android:layout_width="wrap_content" |
76 | 90 |
android:layout_height="wrap_content" |
77 | 91 |
android:gravity="start" |
78 |
android:textSize="18sp"
|
|
92 |
android:textSize="14sp"
|
|
79 | 93 |
android:text="@string/email" |
80 |
android:layout_marginTop="5dp" |
|
94 |
android:layout_marginLeft="10dp" |
|
95 |
android:layout_marginRight="10dp"/> |
|
96 |
<TextView |
|
97 |
android:id="@+id/about_mail_address" |
|
98 |
android:layout_width="wrap_content" |
|
99 |
android:layout_height="wrap_content" |
|
100 |
android:gravity="start" |
|
101 |
android:textSize="14sp" |
|
102 |
android:text="@string/email_address" |
|
81 | 103 |
android:layout_marginLeft="10dp" |
82 | 104 |
android:layout_marginRight="10dp" |
83 | 105 |
android:layout_marginBottom="5dp"/> |
84 | 106 |
</LinearLayout> |
85 | 107 |
</LinearLayout> |
108 |
|
|
109 |
<LinearLayout |
|
110 |
android:id="@+id/about_new_layout" |
|
111 |
android:layout_width="fill_parent" |
|
112 |
android:layout_height="150dp" |
|
113 |
android:gravity="center|fill_horizontal" |
|
114 |
android:layout_marginLeft="10dp" |
|
115 |
android:layout_marginRight="10dp" |
|
116 |
android:layout_marginTop="5dp" |
|
117 |
android:background="@color/dark_grey" |
|
118 |
android:orientation="horizontal"> |
|
119 |
|
|
120 |
<ImageView |
|
121 |
android:layout_gravity="top" |
|
122 |
android:layout_height="wrap_content" |
|
123 |
android:layout_marginStart="5dp" |
|
124 |
android:layout_width="0dp" |
|
125 |
android:layout_weight="0.25" |
|
126 |
android:src="@drawable/ui_new"/> |
|
127 |
|
|
128 |
<ScrollView |
|
129 |
android:id="@+id/new_scroll" |
|
130 |
android:layout_width="0dp" |
|
131 |
android:layout_height="match_parent" |
|
132 |
android:layout_weight="1" |
|
133 |
android:paddingTop="10dp" |
|
134 |
android:paddingBottom="10dp" |
|
135 |
android:paddingLeft="10dp" |
|
136 |
android:paddingRight="10dp"> |
|
137 |
|
|
138 |
<LinearLayout |
|
139 |
android:id="@+id/new_scrollable_main_layout" |
|
140 |
android:layout_width="match_parent" |
|
141 |
android:layout_height="wrap_content" |
|
142 |
android:orientation="vertical"> |
|
143 |
|
|
144 |
<TextView |
|
145 |
android:id="@+id/new_scrollable_message" |
|
146 |
android:layout_width="match_parent" |
|
147 |
android:layout_height="match_parent" |
|
148 |
android:text="@string/credits1" |
|
149 |
android:gravity="start"/> |
|
150 |
</LinearLayout> |
|
151 |
</ScrollView> |
|
152 |
</LinearLayout> |
|
153 |
|
|
154 |
<LinearLayout |
|
155 |
android:id="@+id/about_coming_layout" |
|
156 |
android:layout_width="fill_parent" |
|
157 |
android:layout_height="150dp" |
|
158 |
android:gravity="center|fill_horizontal" |
|
159 |
android:layout_marginLeft="10dp" |
|
160 |
android:layout_marginRight="10dp" |
|
161 |
android:layout_marginTop="5dp" |
|
162 |
android:background="@color/dark_grey" |
|
163 |
android:orientation="horizontal"> |
|
164 |
|
|
165 |
<ImageView |
|
166 |
android:layout_gravity="top" |
|
167 |
android:layout_height="wrap_content" |
|
168 |
android:layout_marginStart="5dp" |
|
169 |
android:layout_width="0dp" |
|
170 |
android:layout_weight="0.25" |
|
171 |
android:src="@drawable/ui_coming"/> |
|
172 |
|
|
173 |
<ScrollView |
|
174 |
android:id="@+id/coming_scroll" |
|
175 |
android:layout_width="0dp" |
|
176 |
android:layout_height="match_parent" |
|
177 |
android:layout_weight="1" |
|
178 |
android:paddingTop="10dp" |
|
179 |
android:paddingBottom="10dp" |
|
180 |
android:paddingLeft="10dp" |
|
181 |
android:paddingRight="10dp"> |
|
182 |
|
|
183 |
<LinearLayout |
|
184 |
android:id="@+id/coming_scrollable_main_layout" |
|
185 |
android:layout_width="match_parent" |
|
186 |
android:layout_height="wrap_content" |
|
187 |
android:orientation="vertical"> |
|
188 |
|
|
189 |
<TextView |
|
190 |
android:id="@+id/coming_scrollable_message" |
|
191 |
android:layout_width="match_parent" |
|
192 |
android:layout_height="match_parent" |
|
193 |
android:text="@string/credits2" |
|
194 |
android:gravity="start"/> |
|
195 |
</LinearLayout> |
|
196 |
</ScrollView> |
|
197 |
</LinearLayout> |
|
198 |
|
|
86 | 199 |
</LinearLayout> |
src/main/res/values/strings.xml | ||
---|---|---|
197 | 197 |
<string name="solver_cube2_description">Not implemented yet.\nAuthor: Leszek Koltunski.</string> |
198 | 198 |
<string name="solver_skew2_description">Not implemented yet.\nAuthor: Leszek Koltunski.</string> |
199 | 199 |
|
200 |
<string name="email_address" translatable="false">app.magic.cube@gmail.com</string> |
|
201 |
|
|
200 | 202 |
<string name="ns_placeholder" translatable="false">+%1$d</string> |
201 | 203 |
<string name="sq_placeholder" translatable="false">%1$2d.</string> |
202 | 204 |
<string name="mo_placeholder" translatable="false">%1$d/%2$d</string> |
Also available in: Unified diff
Dialog About.