Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
newApi (#770)
  • Loading branch information
forrestguice committed Feb 13, 2024
1 parent 2c601bb commit f7ce8a6
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import android.appwidget.AppWidgetManager;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
Expand Down Expand Up @@ -86,11 +87,15 @@ public void init(int year, int month, int day)
protected void initViews(Context context, View dialogContent)
{
picker = (DatePicker) dialogContent.findViewById(R.id.appwidget_date_custom);
if (getArguments().containsKey(KEY_MIN_DATETIME)) {
picker.setMinDate(getArguments().getLong(KEY_MIN_DATETIME));
}
if (getArguments().containsKey(KEY_MAX_DATETIME)) {
picker.setMaxDate(getArguments().getLong(KEY_MAX_DATETIME));

if (Build.VERSION.SDK_INT >= 11)
{
if (getArguments().containsKey(KEY_MIN_DATETIME)) {
picker.setMinDate(getArguments().getLong(KEY_MIN_DATETIME));
}
if (getArguments().containsKey(KEY_MAX_DATETIME)) {
picker.setMaxDate(getArguments().getLong(KEY_MAX_DATETIME));
}
}

ImageButton btn_cancel = (ImageButton) dialogContent.findViewById(R.id.dialog_button_cancel);
Expand Down

0 comments on commit f7ce8a6

Please sign in to comment.