diff options
author | cyBerta <cyberta@riseup.net> | 2020-12-29 14:38:43 +0100 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2020-12-29 14:38:43 +0100 |
commit | 4487985ea1589ab8d32330c22dac2e65cbede0bf (patch) | |
tree | b48998fd48b04864944643e16d8790b8a35547af /app/src/main/java/se/leap/bitmaskclient/base/fragments/DonationReminderDialog.java | |
parent | fd81f2e14e36adb59d534df257e6ba2262cc362f (diff) |
update butterknife probably a last time
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; |