@@ -37,7 +37,7 @@ public class MainMenuActivity extends AppCompatActivity implements IabHelper.OnI
37
37
@ Override
38
38
protected void onCreate (Bundle savedInstanceState ) {
39
39
super .onCreate (savedInstanceState );
40
- setContentView (R .layout .activity_main_menu ); //TODO temp
40
+ setContentView (R .layout .activity_main_menu );
41
41
42
42
View logo = findViewById (R .id .logo );
43
43
final View logo_text = findViewById (R .id .logo_text );
@@ -50,6 +50,9 @@ protected void onCreate(Bundle savedInstanceState) {
50
50
51
51
FontManager .applyFontToView (this , (TextView ) findViewById (R .id .trial_info_top ), FontManager .Font .lato_bold );
52
52
FontManager .applyFontToView (this , (TextView ) findViewById (R .id .trial_info_bottom ), FontManager .Font .lato );
53
+ FontManager .applyFontToView (this , (TextView ) findViewById (R .id .version_label ), FontManager .Font .lato );
54
+
55
+ ((TextView ) findViewById (R .id .version_label )).setText ("v" + VersionManager .versionName );
53
56
54
57
if (savedInstanceState != null ) {
55
58
logo_text .setVisibility (View .GONE );
@@ -64,7 +67,7 @@ protected void onCreate(Bundle savedInstanceState) {
64
67
65
68
Animation fadeInMenu = new AlphaAnimation (0 , 1 );
66
69
fadeInMenu .setDuration (1000 );
67
- fadeInMenu .setStartOffset (4000 ); // TODO
70
+ fadeInMenu .setStartOffset (4000 );
68
71
69
72
Animation fadeOut = new AlphaAnimation (1 , 0 );
70
73
fadeOut .setDuration (1000 );
@@ -94,6 +97,8 @@ public void onAnimationRepeat(Animation animation) {}
94
97
logo_text .setAnimation (logoTextAnimations );
95
98
menu .setAnimation (fadeInMenu );
96
99
100
+ findViewById (R .id .version_label ).setAnimation (fadeInMenu );
101
+
97
102
findViewById (R .id .trial_info_bar ).setVisibility (View .INVISIBLE );
98
103
99
104
initializeIAB ();
@@ -252,18 +257,7 @@ public void onRequestPermissionsResult(int requestCode, String permissions[], in
252
257
253
258
@ Override
254
259
public void onIabPurchaseFinished (IabResult result , Purchase purchase ) {
255
- if (result .isFailure ()) {
256
- AlertDialog dialog = new AlertDialog .Builder (this )
257
- .setTitle ("Purchase Cancelled" )
258
- .setMessage ("It looks like the purchase was cancelled. If this is an error, please try reinstalling the app or contact the Orbis team." )
259
- .setIcon (R .drawable .ic_error )
260
- .setNeutralButton ("Dismiss" , null ).create ();
261
- dialog .getWindow ().setFlags (WindowManager .LayoutParams .FLAG_NOT_FOCUSABLE , WindowManager .LayoutParams .FLAG_NOT_FOCUSABLE );
262
- dialog .show ();
263
- dialog .getWindow ().getDecorView ().setSystemUiVisibility (
264
- this .getWindow ().getDecorView ().getSystemUiVisibility ());
265
- dialog .getWindow ().clearFlags (WindowManager .LayoutParams .FLAG_NOT_FOCUSABLE );
266
- } else if (purchase .getSku ().equals (GlobalVars .SKU_PREMIUM )) {
260
+ if (result .isSuccess () && purchase .getSku ().equals (GlobalVars .SKU_PREMIUM )) {
267
261
findViewById (R .id .trial_info_bar ).setVisibility (View .INVISIBLE );
268
262
startActivity (new Intent (this , PurchaseSuccessfulActivity .class ));
269
263
}
0 commit comments