diff options
author | cyberta <cyberta@riseup.net> | 2020-12-29 19:24:27 -0800 |
---|---|---|
committer | cyberta <cyberta@riseup.net> | 2020-12-29 19:24:27 -0800 |
commit | f03c21446566546e66c977c72c16fdb87f16ffed (patch) | |
tree | 4e3d7c5561e963504553ee941cc258b6b2b06d14 /app/src/main/java/se/leap/bitmaskclient/base/fragments/DonationReminderDialog.java | |
parent | fd81f2e14e36adb59d534df257e6ba2262cc362f (diff) | |
parent | 9b690df036cf91f749c0b6159a7035233a73315d (diff) |
Merge branch 'update_android_10' into 'master'
Update android 10
See merge request leap/bitmask_android!118
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/base/fragments/DonationReminderDialog.java')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/base/fragments/DonationReminderDialog.java | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/fragments/DonationReminderDialog.java b/app/src/main/java/se/leap/bitmaskclient/base/fragments/DonationReminderDialog.java index 0277933c..c39386fc 100644 --- a/app/src/main/java/se/leap/bitmaskclient/base/fragments/DonationReminderDialog.java +++ b/app/src/main/java/se/leap/bitmaskclient/base/fragments/DonationReminderDialog.java @@ -6,19 +6,21 @@ import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.appcompat.app.AlertDialog; -import androidx.appcompat.app.AppCompatDialogFragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatDialogFragment; + import java.text.ParseException; +import butterknife.BindView; import butterknife.ButterKnife; -import butterknife.InjectView; +import butterknife.Unbinder; import se.leap.bitmaskclient.R; import se.leap.bitmaskclient.base.utils.DateHelper; import se.leap.bitmaskclient.base.utils.PreferenceHelper; @@ -35,12 +37,14 @@ public class DonationReminderDialog extends AppCompatDialogFragment { public final static String TAG = DonationReminderDialog.class.getName(); private static boolean isShown = false; - @InjectView(R.id.btnDonate) + @BindView(R.id.btnDonate) Button btnDonate; - @InjectView(R.id.btnLater) + @BindView(R.id.btnLater) Button btnLater; + private Unbinder unbinder; + @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -52,7 +56,7 @@ public class DonationReminderDialog extends AppCompatDialogFragment { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); LayoutInflater inflater = getActivity().getLayoutInflater(); View view = inflater.inflate(R.layout.donation_reminder_dialog, null); - ButterKnife.inject(this, view); + unbinder = ButterKnife.bind(this, view); isShown = true; builder.setView(view); @@ -76,6 +80,12 @@ public class DonationReminderDialog extends AppCompatDialogFragment { return builder.create(); } + @Override + public void onDestroyView() { + super.onDestroyView(); + unbinder.unbind(); + } + public static boolean isCallable(Context context) { if (isShown) { return false; |