Skip to content

Commit

Permalink
V1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfusheng committed Feb 12, 2018
1 parent 9fad732 commit 2ec82b3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Sample/build.gradle
Expand Up @@ -59,7 +59,7 @@ def generateApk(variant) {
}
}

def localSourceEnabled = true
def localSourceEnabled = false

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
Expand All @@ -68,5 +68,7 @@ dependencies {

if (localSourceEnabled) {
implementation project(':GroupRecyclerViewAdapter')
} else {
compile 'com.sunfusheng:GroupRecyclerViewAdapter:' + gradle.versionName
}
}
Expand Up @@ -28,10 +28,15 @@ protected void onCreate(Bundle savedInstanceState) {
recyclerView.setAdapter(weChatAdapter);

weChatAdapter.setOnItemClickListener((adapter, holder, groupPosition, childPosition) -> {
if (R.attr.key_wechat_me_profile == weChatAdapter.getItem(groupPosition, childPosition).key) {
GroupData.WeChatMeItemConfig item = weChatAdapter.getItem(groupPosition, childPosition);
if (null == item || 0 == item.key) {
return;
}

if (R.attr.key_wechat_me_profile == item.key) {
Utils.toast(this, "惊喜 +" + (++clickProfileCount));
} else {
Utils.toast(this, weChatAdapter.getItem(groupPosition, childPosition).titleId);
Utils.toast(this, item.titleId);
}
});
}
Expand Down
Expand Up @@ -14,6 +14,9 @@ public class Utils {
private static Toast toast;

public static void toast(Context context, @StringRes int resId) {
if (-1 == resId || 0 == resId) {
return;
}
toastIgnoreEmpty(context, context.getString(resId), true);
}

Expand All @@ -22,6 +25,9 @@ public static void toast(Context context, String msg) {
}

public static void toastLong(Context context, @StringRes int resId) {
if (-1 == resId || 0 == resId) {
return;
}
toastIgnoreEmpty(context, context.getString(resId), false);
}

Expand Down

0 comments on commit 2ec82b3

Please sign in to comment.