Skip to content

Commit

Permalink
clear and rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
YcdYng committed Dec 13, 2016
1 parent 9916d13 commit 576fd19
Show file tree
Hide file tree
Showing 19 changed files with 69 additions and 193 deletions.
12 changes: 0 additions & 12 deletions .idea/libraries/espresso_core_2_2_2.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/libraries/espresso_idling_resource_2_2_2.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/libraries/exposed_instrumentation_api_publish_0_5.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/libraries/hamcrest_core_1_3.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/libraries/hamcrest_integration_1_3.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/libraries/hamcrest_library_1_3.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/libraries/javawriter_2_1_1.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/libraries/javax_annotation_api_1_2.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/libraries/javax_inject_1.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/libraries/jsr305_2_0_1.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/libraries/junit_4_12.xml

This file was deleted.

15 changes: 0 additions & 15 deletions .idea/libraries/rules_0_5.xml

This file was deleted.

15 changes: 0 additions & 15 deletions .idea/libraries/runner_0_5.xml

This file was deleted.

13 changes: 13 additions & 0 deletions BaseRecyclerAdapterHelper/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2016 EastWood Yang

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
45 changes: 45 additions & 0 deletions BaseRecyclerAdapterHelper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# BaseRecyclerAdapterHelper
make RecyclerView.Adapter more convenient


# Usage
**One Item View Type**
```
mQuickRecyclerAdapter = new QuickRecyclerAdapter<DataModel>(this, R.layout.item, mDataModelList) {
@Override
protected void convert(int position, RecyclerAdapterHelper helper, DataModel data) {
helper.setText(R.id.textView1, data.getValues());
}
};
```

**Multiple Item View Type**
```
mQuickRecyclerMultiAdapter = new QuickRecyclerMultiAdapter<DataModel>(this, mDataModelList) {
@Override
protected void setItemViewType() {
// add item view type and its layout
addItemType(1, R.layout.list_item_1);
addItemType(2, R.layout.list_item_2);
}
@Override
protected int getItemType(int position) {
if (position % 2 == 0) {
return 1;
} else {
return 2;
}
}
@Override
protected void convert(int position, RecyclerAdapterHelper helper, DataModel data) {
helper.setText(R.id.textView1, data.getValues());
}
};
```

# Thanks
[JoanZapata / base-adapter-helper](https://github.com/JoanZapata/base-adapter-helper)
9 changes: 9 additions & 0 deletions BaseRecyclerAdapterHelper/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
apply plugin: 'com.android.library'

ext {
PUBLISH_GROUP_ID = 'com.ycdyng.android'
PUBLISH_ARTIFACT_ID = 'baserecycleradapterhelper'
PUBLISH_VERSION = '1.0.0'
}

android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
Expand All @@ -23,3 +29,6 @@ dependencies {
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:recyclerview-v7:25.0.1'
}

// or use the remote copy to keep update with latest changes
apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'
8 changes: 2 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ android {
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
Expand All @@ -20,12 +19,9 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})

compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:recyclerview-v7:25.0.1'
testCompile 'junit:junit:4.12'

compile project(path: ':BaseRecyclerAdapterHelper')
}

This file was deleted.

This file was deleted.

0 comments on commit 576fd19

Please sign in to comment.