Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a little refactoring and upgrade version and test complete #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions alertview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.bigkoo.alertview;

import android.annotation.SuppressLint;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
Expand Down Expand Up @@ -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);
Expand All @@ -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));
Expand Down
Original file line number Diff line number Diff line change
@@ -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);
}
Original file line number Diff line number Diff line change
@@ -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);
}
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/xml/backup_descriptor.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
<!-- Exclude specific shared preferences that contain GCM registration Id -->
</full-backup-content>