diff --git a/EventBus/AsyncDemo/build.gradle b/EventBus/AsyncDemo/build.gradle index c3d76adbf..33763c818 100644 --- a/EventBus/AsyncDemo/build.gradle +++ b/EventBus/AsyncDemo/build.gradle @@ -3,24 +3,22 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:0.10.+' + classpath 'com.android.tools.build:gradle:0.12.2' } } -apply plugin: 'android' +apply plugin: 'com.android.application' repositories { mavenCentral() } dependencies { - compile fileTree(dir: 'libs', include: '*.jar') - compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar' - compile 'com.android.support:support-v4:19.1.0' + compile 'de.greenrobot:eventbus:2.2.1' } android { - compileSdkVersion 18 - buildToolsVersion "19.0.1" + compileSdkVersion 19 + buildToolsVersion "19.1.0" defaultConfig { targetSdkVersion 17 diff --git a/EventBus/AsyncDemo/project.properties b/EventBus/AsyncDemo/project.properties index 0f735cea9..0a458d4d7 100644 --- a/EventBus/AsyncDemo/project.properties +++ b/EventBus/AsyncDemo/project.properties @@ -1 +1 @@ -target=android-15 +target=android-19 diff --git a/EventBus/AsyncDemo/src/com/commonsware/android/eventbus/AsyncDemoFragment.java b/EventBus/AsyncDemo/src/com/commonsware/android/eventbus/AsyncDemoFragment.java index a82a7666a..bf590c529 100644 --- a/EventBus/AsyncDemo/src/com/commonsware/android/eventbus/AsyncDemoFragment.java +++ b/EventBus/AsyncDemo/src/com/commonsware/android/eventbus/AsyncDemoFragment.java @@ -52,8 +52,7 @@ public void onDetach() { } public void onEventMainThread(WordReadyEvent event) { - model.add(event.getWord()); - adapter.notifyDataSetChanged(); + adapter.add(event.getWord()); } public void setModel(ArrayList model) {