Skip to content

Commit

Permalink
update plugin version to 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanCheen committed Jan 11, 2021
1 parent a5a92f9 commit 39c2f45
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildscript {
}

dependencies {
classpath 'me.yifeiyuan.flap:plugin:1.0.2'
classpath 'me.yifeiyuan.flap:plugin:1.1.0'
}
}

Expand Down
27 changes: 26 additions & 1 deletion app/src/main/java/me/yifeiyuan/flapdev/DifferActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.os.Bundle;
import android.os.Handler;
import android.util.Log;

import androidx.annotation.Keep;
import androidx.annotation.NonNull;
Expand Down Expand Up @@ -40,6 +41,7 @@ public boolean areItemsTheSame(@NonNull final SimpleTextModel simpleTextModel, @

@Override
public boolean areContentsTheSame(@NonNull final SimpleTextModel simpleTextModel, @NonNull final SimpleTextModel t1) {
Log.d(TAG, "areContentsTheSame() called with: simpleTextModel = [" + simpleTextModel + "], t1 = [" + t1 + "]");
return simpleTextModel.equals(t1);
}

Expand Down Expand Up @@ -92,6 +94,29 @@ public void run() {

flapAdapter.setData(newModels);
}
}, 5000);
}, 2000);
}

private void changeModels2() {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {

for (SimpleTextModel datum : flapAdapter.getData()) {
datum.content = "asdf";
}

flapAdapter.notifyDataSetChanged();
//
// List<SimpleTextModel> newModels = new ArrayList<>();
//
// for (int i = 0; i < 20; i++) {
//// newModels.add(new SimpleTextModel("Android :" + i));
// newModels.add(new SimpleTextModel("Android :" + (i % 2 == 0 ? i : (666))));
// }
//
// flapAdapter.setData(newModels);
}
}, 2000);
}
}

0 comments on commit 39c2f45

Please sign in to comment.