Balanced maps, fixed donation dialog crash
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="io.anuke.mindustry"
|
||||
android:versionCode="27"
|
||||
android:versionName="3.0" >
|
||||
android:versionCode="28"
|
||||
android:versionName="3.01" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="25" />
|
||||
<uses-permission android:name="com.android.vending.BILLING" />
|
||||
|
@ -1,15 +1,18 @@
|
||||
package io.anuke.mindustry;
|
||||
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
import org.sufficientlysecure.donations.DonationsFragment;
|
||||
|
||||
public class DonationsActivity extends FragmentActivity {
|
||||
DonationsFragment donationsFragment;
|
||||
|
||||
/**
|
||||
* Google
|
||||
@ -33,7 +36,6 @@ public class DonationsActivity extends FragmentActivity {
|
||||
setContentView(R.layout.donations_activity);
|
||||
|
||||
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
||||
DonationsFragment donationsFragment;
|
||||
if (BuildConfig.DONATIONS_GOOGLE) {
|
||||
donationsFragment = DonationsFragment.newInstance(BuildConfig.DEBUG, true, GOOGLE_PUBKEY, GOOGLE_CATALOG,
|
||||
getResources().getStringArray(R.array.donation_google_catalog_values), false, null, null,
|
||||
@ -43,9 +45,21 @@ public class DonationsActivity extends FragmentActivity {
|
||||
|
||||
ft.replace(R.id.donations_activity_container, donationsFragment, "donationsFragment");
|
||||
ft.commit();
|
||||
|
||||
}
|
||||
|
||||
public void onStart(){
|
||||
super.onStart();
|
||||
Button b = ((Button)findViewById(org.sufficientlysecure.donations.R.id.donations__google_android_market_donate_button));
|
||||
b.setOnClickListener(new View.OnClickListener() {
|
||||
@Override public void onClick(View view) {
|
||||
donationsFragment.donateGoogleOnClick(donationsFragment.getView());
|
||||
b.setEnabled(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Needed for Google Play In-app Billing. It uses startIntentSenderForResult(). The result is not propagated to
|
||||
* the Fragment like in startActivityForResult(). Thus we need to propagate manually to our Fragment.
|
||||
@ -53,6 +67,8 @@ public class DonationsActivity extends FragmentActivity {
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
Button b = ((Button)findViewById(org.sufficientlysecure.donations.R.id.donations__google_android_market_donate_button));
|
||||
b.setEnabled(true);
|
||||
|
||||
FragmentManager fragmentManager = getSupportFragmentManager();
|
||||
Fragment fragment = fragmentManager.findFragmentByTag("donationsFragment");
|
||||
@ -61,5 +77,4 @@ public class DonationsActivity extends FragmentActivity {
|
||||
//TODO donation event, set settings
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
@ -6,7 +6,7 @@ canvas {
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: transparent;
|
||||
background-color: #191919;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
@ -17,3 +17,7 @@ body {
|
||||
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #f4ba6e),color-stop(1, #d29d58)) !important;
|
||||
background-image: -webkit-linear-gradient(#f4ba6e, #d29d58) !important;
|
||||
}
|
||||
|
||||
.gdx-meter {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|