diff --git a/alertview/build.gradle b/alertview/build.gradle index 939852f..acae6e9 100644 --- a/alertview/build.gradle +++ b/alertview/build.gradle @@ -5,12 +5,12 @@ apply plugin: 'com.jfrog.bintray' version = "1.0.3" android { - compileSdkVersion 23 + compileSdkVersion 29 buildToolsVersion "23.0.3" defaultConfig { - minSdkVersion 9 - targetSdkVersion 21 + minSdkVersion 14 + targetSdkVersion 29 versionCode 1 versionName "1.0" } diff --git a/alertview/src/main/java/com/bigkoo/alertview/AlertViewAdapter.java b/alertview/src/main/java/com/bigkoo/alertview/AlertViewAdapter.java index f24f620..3992474 100644 --- a/alertview/src/main/java/com/bigkoo/alertview/AlertViewAdapter.java +++ b/alertview/src/main/java/com/bigkoo/alertview/AlertViewAdapter.java @@ -1,5 +1,6 @@ package com.bigkoo.alertview; +import android.annotation.SuppressLint; import android.content.Context; import android.view.LayoutInflater; import android.view.View; @@ -34,6 +35,7 @@ public long getItemId(int position) { return position; } + @SuppressLint("InflateParams") @Override public View getView(int position, View convertView, ViewGroup parent) { String data= mDatas.get(position); @@ -51,16 +53,16 @@ public View getView(int position, View convertView, ViewGroup parent) { holder.UpdateUI(parent.getContext(),data,position); return view; } - public Holder creatHolder(View view){ + private Holder creatHolder(View view){ return new Holder(view); } class Holder { private TextView tvAlert; - public Holder(View view){ + Holder(View view){ tvAlert = (TextView) view.findViewById(R.id.tvAlert); } - public void UpdateUI(Context context,String data,int position){ + void UpdateUI(Context context, String data, int position){ tvAlert.setText(data); if (mDestructive!= null && mDestructive.contains(data)){ tvAlert.setTextColor(context.getResources().getColor(R.color.textColor_alert_button_destructive)); diff --git a/alertview/src/main/java/com/bigkoo/alertview/OnDismissListener.java b/alertview/src/main/java/com/bigkoo/alertview/OnDismissListener.java index a111690..3372098 100644 --- a/alertview/src/main/java/com/bigkoo/alertview/OnDismissListener.java +++ b/alertview/src/main/java/com/bigkoo/alertview/OnDismissListener.java @@ -1,10 +1,8 @@ package com.bigkoo.alertview; -import android.view.View; - /** * Created by Sai on 15/8/9. */ public interface OnDismissListener { - public void onDismiss(Object o); + void onDismiss(Object o); } diff --git a/alertview/src/main/java/com/bigkoo/alertview/OnItemClickListener.java b/alertview/src/main/java/com/bigkoo/alertview/OnItemClickListener.java index 074ea74..ea8ad32 100644 --- a/alertview/src/main/java/com/bigkoo/alertview/OnItemClickListener.java +++ b/alertview/src/main/java/com/bigkoo/alertview/OnItemClickListener.java @@ -1,10 +1,8 @@ package com.bigkoo.alertview; -import android.view.View; - /** * Created by Sai on 15/8/9. */ public interface OnItemClickListener { - public void onItemClick(Object o,int position); + void onItemClick(Object o, int position); } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 2779066..6078414 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -6,7 +6,8 @@ android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" - android:theme="@style/AppTheme" > + android:theme="@style/AppTheme" + android:fullBackupContent="@xml/backup_descriptor"> diff --git a/app/src/main/res/xml/backup_descriptor.xml b/app/src/main/res/xml/backup_descriptor.xml new file mode 100644 index 0000000..6fd6103 --- /dev/null +++ b/app/src/main/res/xml/backup_descriptor.xml @@ -0,0 +1,4 @@ + + + +