diff --git a/src/CommentReplyComponent-master/.gitignore b/src/CommentReplyComponent-master/.gitignore
new file mode 100644
index 0000000..520a863
--- /dev/null
+++ b/src/CommentReplyComponent-master/.gitignore
@@ -0,0 +1,55 @@
+# Built application files
+*.apk
+*.ap_
+
+# Files for the ART/Dalvik VM
+*.dex
+
+# Java class files
+*.class
+
+# Generated files
+bin/
+gen/
+out/
+
+# Gradle files
+.gradle/
+build/
+
+# Local configuration file (sdk path, etc)
+local.properties
+
+# Proguard folder generated by Eclipse
+proguard/
+
+# Log Files
+*.log
+
+# Android Studio Navigation editor temp files
+.navigation/
+
+# Android Studio captures folder
+captures/
+
+# Intellij
+*.iml
+.idea/workspace.xml
+.idea/tasks.xml
+.idea/gradle.xml
+.idea/dictionaries
+.idea/libraries
+
+# Keystore files
+*.jks
+
+# External native build folder generated in Android Studio 2.2 and later
+.externalNativeBuild
+
+# Google Services (e.g. APIs or Firebase)
+google-services.json
+
+# Freeline
+freeline.py
+freeline/
+freeline_project_description.json
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/.gitignore b/src/CommentReplyComponent-master/CommentWithReplyList/.gitignore
new file mode 100644
index 0000000..39fb081
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/.gitignore
@@ -0,0 +1,9 @@
+*.iml
+.gradle
+/local.properties
+/.idea/workspace.xml
+/.idea/libraries
+.DS_Store
+/build
+/captures
+.externalNativeBuild
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/.idea/.gitignore b/src/CommentReplyComponent-master/CommentWithReplyList/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/.idea/compiler.xml b/src/CommentReplyComponent-master/CommentWithReplyList/.idea/compiler.xml
new file mode 100644
index 0000000..61a9130
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/.idea/dictionaries/moos.xml b/src/CommentReplyComponent-master/CommentWithReplyList/.idea/dictionaries/moos.xml
new file mode 100644
index 0000000..2f01d98
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/.idea/dictionaries/moos.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/.idea/gradle.xml b/src/CommentReplyComponent-master/CommentWithReplyList/.idea/gradle.xml
new file mode 100644
index 0000000..a2d7c21
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/.idea/gradle.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/.idea/jarRepositories.xml b/src/CommentReplyComponent-master/CommentWithReplyList/.idea/jarRepositories.xml
new file mode 100644
index 0000000..a5f05cd
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/.idea/jarRepositories.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/.idea/misc.xml b/src/CommentReplyComponent-master/CommentWithReplyList/.idea/misc.xml
new file mode 100644
index 0000000..6bb70d7
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/.idea/misc.xml
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Android
+
+
+ CorrectnessLintAndroid
+
+
+ Java
+
+
+ LintAndroid
+
+
+ Probable bugsJava
+
+
+ RELAX NG
+
+
+
+
+ Android
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/.idea/modules.xml b/src/CommentReplyComponent-master/CommentWithReplyList/.idea/modules.xml
new file mode 100644
index 0000000..f0036bc
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/.idea/modules.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/.gitignore b/src/CommentReplyComponent-master/CommentWithReplyList/app/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/build.gradle b/src/CommentReplyComponent-master/CommentWithReplyList/app/build.gradle
new file mode 100644
index 0000000..8b179ce
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/build.gradle
@@ -0,0 +1,32 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 28
+ defaultConfig {
+ applicationId "com.moos.example"
+ minSdkVersion 21
+ targetSdkVersion 28
+ versionCode 1
+ versionName "1.0"
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ implementation fileTree(include: ['*.jar'], dir: 'libs')
+ implementation 'com.android.support:appcompat-v7:28.0.0'
+ implementation 'com.android.support.constraint:constraint-layout:2.0.4'
+ testImplementation 'junit:junit:4.12'
+ implementation 'com.android.support:design:28.0.0'
+ implementation 'de.hdodenhof:circleimageview:2.1.0'
+ implementation 'com.github.bumptech.glide:glide:3.7.0'
+ implementation 'com.google.code.gson:gson:2.7'
+
+
+}
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/proguard-rules.pro b/src/CommentReplyComponent-master/CommentWithReplyList/app/proguard-rules.pro
new file mode 100644
index 0000000..f1b4245
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/androidTest/java/com/moos/example/ExampleInstrumentedTest.java b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/androidTest/java/com/moos/example/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..ae9bba6
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/androidTest/java/com/moos/example/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package com.moos.example;
+
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * @see Testing documentation
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+ @Test
+ public void useAppContext() throws Exception {
+ // Context of the app under test.
+ Context appContext = InstrumentationRegistry.getTargetContext();
+
+ assertEquals("com.moos.example", appContext.getPackageName());
+ }
+}
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/AndroidManifest.xml b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..729fdbb
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/AndroidManifest.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/java/com/moos/example/MainActivity.java b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/java/com/moos/example/MainActivity.java
new file mode 100644
index 0000000..05049c9
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/java/com/moos/example/MainActivity.java
@@ -0,0 +1,304 @@
+package com.moos.example;
+
+import android.graphics.Color;
+import android.support.design.widget.BottomSheetBehavior;
+import android.support.design.widget.BottomSheetDialog;
+import android.support.design.widget.CollapsingToolbarLayout;
+import android.support.v7.app.AppCompatActivity;
+import android.os.Bundle;
+import android.support.v7.widget.Toolbar;
+import android.text.Editable;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.ExpandableListView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.google.gson.Gson;
+import com.moos.example.adapter.CommentExpandAdapter;
+import com.moos.example.bean.CommentBean;
+import com.moos.example.bean.CommentDetailBean;
+import com.moos.example.bean.ReplyDetailBean;
+import com.moos.example.view.CommentExpandableListView;
+
+import java.util.List;
+
+/**
+ * by moos on 2018/04/20
+ */
+public class MainActivity extends AppCompatActivity implements View.OnClickListener {
+ private static final String TAG = "MainActivity";
+ private android.support.v7.widget.Toolbar toolbar;
+ private TextView bt_comment;
+ private CommentExpandableListView expandableListView;
+ private CommentExpandAdapter adapter;
+ private CommentBean commentBean;
+ private List commentsList;
+ private BottomSheetDialog dialog;
+ private String testJson = "{\n" +
+ "\t\"code\": 1000,\n" +
+ "\t\"message\": \"查看评论成功\",\n" +
+ "\t\"data\": {\n" +
+ "\t\t\"total\": 3,\n" +
+ "\t\t\"list\": [{\n" +
+ "\t\t\t\t\"id\": 42,\n" +
+ "\t\t\t\t\"nickName\": \"程序猿\",\n" +
+ "\t\t\t\t\"userLogo\": \"http://ucardstorevideo.b0.upaiyun.com/userLogo/9fa13ec6-dddd-46cb-9df0-4bbb32d83fc1.png\",\n" +
+ "\t\t\t\t\"content\": \"时间是一切财富中最宝贵的财富。\",\n" +
+ "\t\t\t\t\"imgId\": \"xcclsscrt0tev11ok364\",\n" +
+ "\t\t\t\t\"replyTotal\": 1,\n" +
+ "\t\t\t\t\"createDate\": \"三分钟前\",\n" +
+ "\t\t\t\t\"replyList\": [{\n" +
+ "\t\t\t\t\t\"nickName\": \"沐風\",\n" +
+ "\t\t\t\t\t\"userLogo\": \"http://ucardstorevideo.b0.upaiyun.com/userLogo/9fa13ec6-dddd-46cb-9df0-4bbb32d83fc1.png\",\n" +
+ "\t\t\t\t\t\"id\": 40,\n" +
+ "\t\t\t\t\t\"commentId\": \"42\",\n" +
+ "\t\t\t\t\t\"content\": \"时间总是在不经意中擦肩而过,不留一点痕迹.\",\n" +
+ "\t\t\t\t\t\"status\": \"01\",\n" +
+ "\t\t\t\t\t\"createDate\": \"一个小时前\"\n" +
+ "\t\t\t\t}]\n" +
+ "\t\t\t},\n" +
+ "\t\t\t{\n" +
+ "\t\t\t\t\"id\": 41,\n" +
+ "\t\t\t\t\"nickName\": \"设计狗\",\n" +
+ "\t\t\t\t\"userLogo\": \"http://ucardstorevideo.b0.upaiyun.com/userLogo/9fa13ec6-dddd-46cb-9df0-4bbb32d83fc1.png\",\n" +
+ "\t\t\t\t\"content\": \"这世界要是没有爱情,它在我们心中还会有什么意义!这就如一盏没有亮光的走马灯。\",\n" +
+ "\t\t\t\t\"imgId\": \"xcclsscrt0tev11ok364\",\n" +
+ "\t\t\t\t\"replyTotal\": 1,\n" +
+ "\t\t\t\t\"createDate\": \"一天前\",\n" +
+ "\t\t\t\t\"replyList\": [{\n" +
+ "\t\t\t\t\t\"nickName\": \"沐風\",\n" +
+ "\t\t\t\t\t\"userLogo\": \"http://ucardstorevideo.b0.upaiyun.com/userLogo/9fa13ec6-dddd-46cb-9df0-4bbb32d83fc1.png\",\n" +
+ "\t\t\t\t\t\"commentId\": \"41\",\n" +
+ "\t\t\t\t\t\"content\": \"时间总是在不经意中擦肩而过,不留一点痕迹.\",\n" +
+ "\t\t\t\t\t\"status\": \"01\",\n" +
+ "\t\t\t\t\t\"createDate\": \"三小时前\"\n" +
+ "\t\t\t\t}]\n" +
+ "\t\t\t},\n" +
+ "\t\t\t{\n" +
+ "\t\t\t\t\"id\": 40,\n" +
+ "\t\t\t\t\"nickName\": \"产品喵\",\n" +
+ "\t\t\t\t\"userLogo\": \"http://ucardstorevideo.b0.upaiyun.com/userLogo/9fa13ec6-dddd-46cb-9df0-4bbb32d83fc1.png\",\n" +
+ "\t\t\t\t\"content\": \"笨蛋自以为聪明,聪明人才知道自己是笨蛋。\",\n" +
+ "\t\t\t\t\"imgId\": \"xcclsscrt0tev11ok364\",\n" +
+ "\t\t\t\t\"replyTotal\": 0,\n" +
+ "\t\t\t\t\"createDate\": \"三天前\",\n" +
+ "\t\t\t\t\"replyList\": []\n" +
+ "\t\t\t}\n" +
+ "\t\t]\n" +
+ "\t}\n" +
+ "}";
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+ initView();
+ }
+
+ private void initView() {
+ toolbar = (Toolbar) findViewById(R.id.toolbar);
+ expandableListView = (CommentExpandableListView) findViewById(R.id.detail_page_lv_comment);
+ bt_comment = (TextView) findViewById(R.id.detail_page_do_comment);
+ bt_comment.setOnClickListener(this);
+ setSupportActionBar(toolbar);
+ getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+ CollapsingToolbarLayout collapsingToolbar =
+ (CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar);
+ collapsingToolbar.setTitle("详情");
+ commentsList = generateTestData();
+ initExpandableListView(commentsList);
+ }
+
+ /**
+ * 初始化评论和回复列表
+ */
+ private void initExpandableListView(final List commentList){
+ expandableListView.setGroupIndicator(null);
+ //默认展开所有回复
+ adapter = new CommentExpandAdapter(this, commentList);
+ expandableListView.setAdapter(adapter);
+ for(int i = 0; i>>"+commentList.get(groupPosition).getId());
+// if(isExpanded){
+// expandableListView.collapseGroup(groupPosition);
+// }else {
+// expandableListView.expandGroup(groupPosition, true);
+// }
+ showReplyDialog(groupPosition);
+ return true;
+ }
+ });
+
+ expandableListView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() {
+ @Override
+ public boolean onChildClick(ExpandableListView expandableListView, View view, int groupPosition, int childPosition, long l) {
+ Toast.makeText(MainActivity.this,"点击了回复",Toast.LENGTH_SHORT).show();
+ return false;
+ }
+ });
+
+ expandableListView.setOnGroupExpandListener(new ExpandableListView.OnGroupExpandListener() {
+ @Override
+ public void onGroupExpand(int groupPosition) {
+ //toast("展开第"+groupPosition+"个分组");
+
+ }
+ });
+
+ }
+
+ /**
+ * by moos on 2018/04/20
+ * func:生成测试数据
+ * @return 评论数据
+ */
+ private List generateTestData(){
+ Gson gson = new Gson();
+ commentBean = gson.fromJson(testJson, CommentBean.class);
+ List commentList = commentBean.getData().getList();
+ return commentList;
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ if(item.getItemId() == android.R.id.home){
+ finish();
+ return true;
+ }
+ return super.onOptionsItemSelected(item);
+ }
+
+ @Override
+ public void onClick(View view) {
+ if(view.getId() == R.id.detail_page_do_comment){
+
+ showCommentDialog();
+ }
+ }
+
+ /**
+ * by moos on 2018/04/20
+ * func:弹出评论框
+ */
+ private void showCommentDialog(){
+ dialog = new BottomSheetDialog(this);
+ View commentView = LayoutInflater.from(this).inflate(R.layout.comment_dialog_layout,null);
+ final EditText commentText = (EditText) commentView.findViewById(R.id.dialog_comment_et);
+ final Button bt_comment = (Button) commentView.findViewById(R.id.dialog_comment_bt);
+ dialog.setContentView(commentView);
+ /**
+ * 解决bsd显示不全的情况
+ */
+ View parent = (View) commentView.getParent();
+ BottomSheetBehavior behavior = BottomSheetBehavior.from(parent);
+ commentView.measure(0,0);
+ behavior.setPeekHeight(commentView.getMeasuredHeight());
+
+ bt_comment.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View view) {
+ String commentContent = commentText.getText().toString().trim();
+ if(!TextUtils.isEmpty(commentContent)){
+
+ //commentOnWork(commentContent);
+ dialog.dismiss();
+ CommentDetailBean detailBean = new CommentDetailBean("小明", commentContent,"刚刚");
+ adapter.addTheCommentData(detailBean);
+ Toast.makeText(MainActivity.this,"评论成功",Toast.LENGTH_SHORT).show();
+
+ }else {
+ Toast.makeText(MainActivity.this,"评论内容不能为空",Toast.LENGTH_SHORT).show();
+ }
+ }
+ });
+ commentText.addTextChangedListener(new TextWatcher() {
+ @Override
+ public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+
+ }
+
+ @Override
+ public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+ if(!TextUtils.isEmpty(charSequence) && charSequence.length()>2){
+ bt_comment.setBackgroundColor(Color.parseColor("#FFB568"));
+ }else {
+ bt_comment.setBackgroundColor(Color.parseColor("#D8D8D8"));
+ }
+ }
+
+ @Override
+ public void afterTextChanged(Editable editable) {
+
+ }
+ });
+ dialog.show();
+ }
+
+ /**
+ * by moos on 2018/04/20
+ * func:弹出回复框
+ */
+ private void showReplyDialog(final int position){
+ dialog = new BottomSheetDialog(this);
+ View commentView = LayoutInflater.from(this).inflate(R.layout.comment_dialog_layout,null);
+ final EditText commentText = (EditText) commentView.findViewById(R.id.dialog_comment_et);
+ final Button bt_comment = (Button) commentView.findViewById(R.id.dialog_comment_bt);
+ commentText.setHint("回复 " + commentsList.get(position).getNickName() + " 的评论:");
+ dialog.setContentView(commentView);
+ bt_comment.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ String replyContent = commentText.getText().toString().trim();
+ if(!TextUtils.isEmpty(replyContent)){
+
+ dialog.dismiss();
+ ReplyDetailBean detailBean = new ReplyDetailBean("小红",replyContent);
+ adapter.addTheReplyData(detailBean, position);
+ expandableListView.expandGroup(position);
+ Toast.makeText(MainActivity.this,"回复成功",Toast.LENGTH_SHORT).show();
+ }else {
+ Toast.makeText(MainActivity.this,"回复内容不能为空",Toast.LENGTH_SHORT).show();
+ }
+ }
+ });
+ commentText.addTextChangedListener(new TextWatcher() {
+ @Override
+ public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+
+ }
+
+ @Override
+ public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+ if(!TextUtils.isEmpty(charSequence) && charSequence.length()>2){
+ bt_comment.setBackgroundColor(Color.parseColor("#FFB568"));
+ }else {
+ bt_comment.setBackgroundColor(Color.parseColor("#D8D8D8"));
+ }
+ }
+
+ @Override
+ public void afterTextChanged(Editable editable) {
+
+ }
+ });
+ dialog.show();
+ }
+
+}
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/java/com/moos/example/adapter/CommentExpandAdapter.java b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/java/com/moos/example/adapter/CommentExpandAdapter.java
new file mode 100644
index 0000000..f732fba
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/java/com/moos/example/adapter/CommentExpandAdapter.java
@@ -0,0 +1,233 @@
+package com.moos.example.adapter;
+
+import android.content.Context;
+import android.graphics.Color;
+import android.support.design.widget.BottomSheetDialog;
+import android.text.Editable;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseExpandableListAdapter;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.ImageView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.bumptech.glide.Glide;
+import com.bumptech.glide.load.engine.DiskCacheStrategy;
+import com.moos.example.R;
+import com.moos.example.bean.CommentDetailBean;
+import com.moos.example.bean.ReplyDetailBean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import de.hdodenhof.circleimageview.CircleImageView;
+
+/**
+ * Author: Moos
+ * E-mail: moosphon@gmail.com
+ * Date: 18/4/20.
+ * Desc: 评论与回复列表的适配器
+ */
+
+public class CommentExpandAdapter extends BaseExpandableListAdapter {
+ private static final String TAG = "CommentExpandAdapter";
+ private List commentBeanList;
+ private List replyBeanList;
+ private Context context;
+ private int pageIndex = 1;
+
+ public CommentExpandAdapter(Context context, List commentBeanList) {
+ this.context = context;
+ this.commentBeanList = commentBeanList;
+ }
+
+ @Override
+ public int getGroupCount() {
+ return commentBeanList.size();
+ }
+
+ @Override
+ public int getChildrenCount(int i) {
+ if(commentBeanList.get(i).getReplyList() == null){
+ return 0;
+ }else {
+ return commentBeanList.get(i).getReplyList().size()>0 ? commentBeanList.get(i).getReplyList().size():0;
+ }
+
+ }
+
+ @Override
+ public Object getGroup(int i) {
+ return commentBeanList.get(i);
+ }
+
+ @Override
+ public Object getChild(int i, int i1) {
+ return commentBeanList.get(i).getReplyList().get(i1);
+ }
+
+ @Override
+ public long getGroupId(int groupPosition) {
+ return groupPosition;
+ }
+
+ @Override
+ public long getChildId(int groupPosition, int childPosition) {
+ return getCombinedChildId(groupPosition, childPosition);
+ }
+
+ @Override
+ public boolean hasStableIds() {
+ return true;
+ }
+ boolean isLike = false;
+
+ @Override
+ public View getGroupView(final int groupPosition, boolean isExpand, View convertView, ViewGroup viewGroup) {
+ final GroupHolder groupHolder;
+
+ if(convertView == null){
+ convertView = LayoutInflater.from(context).inflate(R.layout.comment_item_layout, viewGroup, false);
+ groupHolder = new GroupHolder(convertView);
+ convertView.setTag(groupHolder);
+ }else {
+ groupHolder = (GroupHolder) convertView.getTag();
+ }
+ Glide.with(context).load(R.drawable.user_other)
+ .diskCacheStrategy(DiskCacheStrategy.RESULT)
+ .error(R.mipmap.ic_launcher)
+ .centerCrop()
+ .into(groupHolder.logo);
+ groupHolder.tv_name.setText(commentBeanList.get(groupPosition).getNickName());
+ groupHolder.tv_time.setText(commentBeanList.get(groupPosition).getCreateDate());
+ groupHolder.tv_content.setText(commentBeanList.get(groupPosition).getContent());
+ groupHolder.iv_like.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ if(isLike){
+ isLike = false;
+ groupHolder.iv_like.setColorFilter(Color.parseColor("#aaaaaa"));
+ }else {
+ isLike = true;
+ groupHolder.iv_like.setColorFilter(Color.parseColor("#FF5C5C"));
+ }
+ }
+ });
+
+ return convertView;
+ }
+
+ @Override
+ public View getChildView(final int groupPosition, int childPosition, boolean b, View convertView, ViewGroup viewGroup) {
+ final ChildHolder childHolder;
+ if(convertView == null){
+ convertView = LayoutInflater.from(context).inflate(R.layout.comment_reply_item_layout,viewGroup, false);
+ childHolder = new ChildHolder(convertView);
+ convertView.setTag(childHolder);
+ }
+ else {
+ childHolder = (ChildHolder) convertView.getTag();
+ }
+
+ String replyUser = commentBeanList.get(groupPosition).getReplyList().get(childPosition).getNickName();
+ if(!TextUtils.isEmpty(replyUser)){
+ childHolder.tv_name.setText(replyUser + ":");
+ }else {
+ childHolder.tv_name.setText("无名"+":");
+ }
+
+ childHolder.tv_content.setText(commentBeanList.get(groupPosition).getReplyList().get(childPosition).getContent());
+
+ return convertView;
+ }
+
+ @Override
+ public boolean isChildSelectable(int i, int i1) {
+ return true;
+ }
+
+ private class GroupHolder{
+ private CircleImageView logo;
+ private TextView tv_name, tv_content, tv_time;
+ private ImageView iv_like;
+ public GroupHolder(View view) {
+ logo = (CircleImageView) view.findViewById(R.id.comment_item_logo);
+ tv_content = (TextView) view.findViewById(R.id.comment_item_content);
+ tv_name = (TextView) view.findViewById(R.id.comment_item_userName);
+ tv_time = (TextView) view.findViewById(R.id.comment_item_time);
+ iv_like = (ImageView) view.findViewById(R.id.comment_item_like);
+ }
+ }
+
+ private class ChildHolder{
+ private TextView tv_name, tv_content;
+ public ChildHolder(View view) {
+ tv_name = (TextView) view.findViewById(R.id.reply_item_user);
+ tv_content = (TextView) view.findViewById(R.id.reply_item_content);
+ }
+ }
+
+
+ /**
+ * by moos on 2018/04/20
+ * func:评论成功后插入一条数据
+ * @param commentDetailBean 新的评论数据
+ */
+ public void addTheCommentData(CommentDetailBean commentDetailBean){
+ if(commentDetailBean!=null){
+
+ commentBeanList.add(commentDetailBean);
+ notifyDataSetChanged();
+ }else {
+ throw new IllegalArgumentException("评论数据为空!");
+ }
+
+ }
+
+ /**
+ * by moos on 2018/04/20
+ * func:回复成功后插入一条数据
+ * @param replyDetailBean 新的回复数据
+ */
+ public void addTheReplyData(ReplyDetailBean replyDetailBean, int groupPosition){
+ if(replyDetailBean!=null){
+ Log.e(TAG, "addTheReplyData: >>>>该刷新回复列表了:"+replyDetailBean.toString() );
+ if(commentBeanList.get(groupPosition).getReplyList() != null ){
+ commentBeanList.get(groupPosition).getReplyList().add(replyDetailBean);
+ }else {
+ List replyList = new ArrayList<>();
+ replyList.add(replyDetailBean);
+ commentBeanList.get(groupPosition).setReplyList(replyList);
+ }
+ notifyDataSetChanged();
+ }else {
+ throw new IllegalArgumentException("回复数据为空!");
+ }
+
+ }
+
+ /**
+ * by moos on 2018/04/20
+ * func:添加和展示所有回复
+ * @param replyBeanList 所有回复数据
+ * @param groupPosition 当前的评论
+ */
+ private void addReplyList(List replyBeanList, int groupPosition){
+ if(commentBeanList.get(groupPosition).getReplyList() != null ){
+ commentBeanList.get(groupPosition).getReplyList().clear();
+ commentBeanList.get(groupPosition).getReplyList().addAll(replyBeanList);
+ }else {
+
+ commentBeanList.get(groupPosition).setReplyList(replyBeanList);
+ }
+
+ notifyDataSetChanged();
+ }
+
+}
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/java/com/moos/example/bean/CommentBean.java b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/java/com/moos/example/bean/CommentBean.java
new file mode 100644
index 0000000..69aaceb
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/java/com/moos/example/bean/CommentBean.java
@@ -0,0 +1,54 @@
+package com.moos.example.bean;
+
+import java.util.List;
+
+/**
+ * Created by moos on 2018/4/20.
+ */
+
+public class CommentBean {
+ private int code;
+ private String message;
+ private Data data;
+ public void setCode(int code) {
+ this.code = code;
+ }
+ public int getCode() {
+ return code;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+ public String getMessage() {
+ return message;
+ }
+
+ public void setData(Data data) {
+ this.data = data;
+ }
+ public Data getData() {
+ return data;
+ }
+
+ public class Data {
+
+ private int total;
+ private List list;
+ public void setTotal(int total) {
+ this.total = total;
+ }
+ public int getTotal() {
+ return total;
+ }
+
+ public void setList(List list) {
+ this.list = list;
+ }
+ public List getList() {
+ return list;
+ }
+
+ }
+
+}
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/java/com/moos/example/bean/CommentDetailBean.java b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/java/com/moos/example/bean/CommentDetailBean.java
new file mode 100644
index 0000000..a5ab6fd
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/java/com/moos/example/bean/CommentDetailBean.java
@@ -0,0 +1,80 @@
+package com.moos.example.bean;
+
+import java.util.List;
+
+/**
+ * Created by moos on 2018/4/20.
+ */
+
+public class CommentDetailBean {
+ private int id;
+ private String nickName;
+ private String userLogo;
+ private String content;
+ private String imgId;
+ private int replyTotal;
+ private String createDate;
+ private List replyList;
+
+ public CommentDetailBean(String nickName, String content, String createDate) {
+ this.nickName = nickName;
+ this.content = content;
+ this.createDate = createDate;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+ public int getId() {
+ return id;
+ }
+
+ public void setNickName(String nickName) {
+ this.nickName = nickName;
+ }
+ public String getNickName() {
+ return nickName;
+ }
+
+ public void setUserLogo(String userLogo) {
+ this.userLogo = userLogo;
+ }
+ public String getUserLogo() {
+ return userLogo;
+ }
+
+ public void setContent(String content) {
+ this.content = content;
+ }
+ public String getContent() {
+ return content;
+ }
+
+ public void setImgId(String imgId) {
+ this.imgId = imgId;
+ }
+ public String getImgId() {
+ return imgId;
+ }
+
+ public void setReplyTotal(int replyTotal) {
+ this.replyTotal = replyTotal;
+ }
+ public int getReplyTotal() {
+ return replyTotal;
+ }
+
+ public void setCreateDate(String createDate) {
+ this.createDate = createDate;
+ }
+ public String getCreateDate() {
+ return createDate;
+ }
+
+ public void setReplyList(List replyList) {
+ this.replyList = replyList;
+ }
+ public List getReplyList() {
+ return replyList;
+ }
+}
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/java/com/moos/example/bean/ReplyDetailBean.java b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/java/com/moos/example/bean/ReplyDetailBean.java
new file mode 100644
index 0000000..9a3e346
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/java/com/moos/example/bean/ReplyDetailBean.java
@@ -0,0 +1,70 @@
+package com.moos.example.bean;
+
+/**
+ * Created by moos on 2018/4/20.
+ */
+
+public class ReplyDetailBean {
+ private String nickName;
+ private String userLogo;
+ private int id;
+ private String commentId;
+ private String content;
+ private String status;
+ private String createDate;
+
+ public ReplyDetailBean(String nickName, String content) {
+ this.nickName = nickName;
+ this.content = content;
+ }
+
+ public void setNickName(String nickName) {
+ this.nickName = nickName;
+ }
+ public String getNickName() {
+ return nickName;
+ }
+
+ public void setUserLogo(String userLogo) {
+ this.userLogo = userLogo;
+ }
+ public String getUserLogo() {
+ return userLogo;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+ public int getId() {
+ return id;
+ }
+
+ public void setCommentId(String commentId) {
+ this.commentId = commentId;
+ }
+ public String getCommentId() {
+ return commentId;
+ }
+
+ public void setContent(String content) {
+ this.content = content;
+ }
+ public String getContent() {
+ return content;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+ public String getStatus() {
+ return status;
+ }
+
+ public void setCreateDate(String createDate) {
+ this.createDate = createDate;
+ }
+ public String getCreateDate() {
+ return createDate;
+ }
+
+}
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/java/com/moos/example/view/CommentExpandableListView.java b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/java/com/moos/example/view/CommentExpandableListView.java
new file mode 100644
index 0000000..63ca5ae
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/java/com/moos/example/view/CommentExpandableListView.java
@@ -0,0 +1,83 @@
+package com.moos.example.view;
+
+import android.content.Context;
+import android.os.Build;
+import android.support.v4.view.NestedScrollingChild;
+import android.support.v4.view.NestedScrollingChildHelper;
+import android.util.AttributeSet;
+import android.widget.ExpandableListView;
+/**
+ * Author: Moos
+ * E-mail: moosphon@gmail.com
+ * Date: 18/4/20.
+ * Desc: 自定义ExpandableListView,解决与CoordinatorLayout滑动冲突问题
+ */
+
+public class CommentExpandableListView extends ExpandableListView implements NestedScrollingChild{
+ private NestedScrollingChildHelper mScrollingChildHelper;
+
+
+ public CommentExpandableListView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ mScrollingChildHelper = new NestedScrollingChildHelper(this);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ setNestedScrollingEnabled(true);
+ }
+
+ }
+
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
+ super.onMeasure(widthMeasureSpec, expandSpec);
+
+ }
+
+ @Override
+ public void setNestedScrollingEnabled(boolean enabled) {
+ mScrollingChildHelper.setNestedScrollingEnabled(enabled);
+ }
+
+ @Override
+ public boolean isNestedScrollingEnabled() {
+ return mScrollingChildHelper.isNestedScrollingEnabled();
+ }
+
+ @Override
+ public boolean startNestedScroll(int axes) {
+ return mScrollingChildHelper.startNestedScroll(axes);
+ }
+
+ @Override
+ public void stopNestedScroll() {
+ mScrollingChildHelper.stopNestedScroll();
+ }
+
+ @Override
+ public boolean hasNestedScrollingParent() {
+ return mScrollingChildHelper.hasNestedScrollingParent();
+ }
+
+ @Override
+ public boolean dispatchNestedScroll(int dxConsumed, int dyConsumed, int dxUnconsumed,
+ int dyUnconsumed, int[] offsetInWindow) {
+ return mScrollingChildHelper.dispatchNestedScroll(dxConsumed, dyConsumed,
+ dxUnconsumed, dyUnconsumed, offsetInWindow);
+ }
+
+ @Override
+ public boolean dispatchNestedPreScroll(int dx, int dy, int[] consumed, int[] offsetInWindow) {
+ return mScrollingChildHelper.dispatchNestedPreScroll(dx, dy, consumed, offsetInWindow);
+ }
+
+ @Override
+ public boolean dispatchNestedFling(float velocityX, float velocityY, boolean consumed) {
+ return mScrollingChildHelper.dispatchNestedFling(velocityX, velocityY, consumed);
+ }
+
+ @Override
+ public boolean dispatchNestedPreFling(float velocityX, float velocityY) {
+ return mScrollingChildHelper.dispatchNestedPreFling(velocityX, velocityY);
+ }
+}
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 0000000..c7bd21d
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/icon_collect.png b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/icon_collect.png
new file mode 100644
index 0000000..3bf8bc1
Binary files /dev/null and b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/icon_collect.png differ
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/icon_comment_like.png b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/icon_comment_like.png
new file mode 100644
index 0000000..4df9982
Binary files /dev/null and b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/icon_comment_like.png differ
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/icon_focus.png b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/icon_focus.png
new file mode 100644
index 0000000..fd05b02
Binary files /dev/null and b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/icon_focus.png differ
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/icon_work_like.png b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/icon_work_like.png
new file mode 100644
index 0000000..ba73e14
Binary files /dev/null and b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/icon_work_like.png differ
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/teaser.png b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/teaser.png
new file mode 100644
index 0000000..e3ea129
Binary files /dev/null and b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/teaser.png differ
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/user_logo.jpg b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/user_logo.jpg
new file mode 100644
index 0000000..c8d8a7b
Binary files /dev/null and b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/user_logo.jpg differ
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/user_other.jpg b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/user_other.jpg
new file mode 100644
index 0000000..cee062c
Binary files /dev/null and b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable-xhdpi/user_other.jpg differ
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable/comment_bt_selector.xml b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable/comment_bt_selector.xml
new file mode 100644
index 0000000..caca810
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable/comment_bt_selector.xml
@@ -0,0 +1,15 @@
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable/comment_dialog_et_selector.xml b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable/comment_dialog_et_selector.xml
new file mode 100644
index 0000000..9d1c3d8
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable/comment_dialog_et_selector.xml
@@ -0,0 +1,15 @@
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable/ic_launcher_background.xml b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 0000000..d5fccc5
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/layout/activity_main.xml b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..af4c99a
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,212 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/layout/comment_dialog_layout.xml b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/layout/comment_dialog_layout.xml
new file mode 100644
index 0000000..1782d8b
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/layout/comment_dialog_layout.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/layout/comment_item_layout.xml b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/layout/comment_item_layout.xml
new file mode 100644
index 0000000..d043a4b
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/layout/comment_item_layout.xml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/layout/comment_reply_item_layout.xml b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/layout/comment_reply_item_layout.xml
new file mode 100644
index 0000000..29970c4
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/layout/comment_reply_item_layout.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-hdpi/ic_launcher.png b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..a2f5908
Binary files /dev/null and b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..1b52399
Binary files /dev/null and b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-mdpi/ic_launcher.png b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..ff10afd
Binary files /dev/null and b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..115a4c7
Binary files /dev/null and b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..dcd3cd8
Binary files /dev/null and b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..459ca60
Binary files /dev/null and b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..8ca12fe
Binary files /dev/null and b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..8e19b41
Binary files /dev/null and b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..b824ebd
Binary files /dev/null and b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..4c19a13
Binary files /dev/null and b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/values/colors.xml b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..3ab3e9c
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #3F51B5
+ #303F9F
+ #FF4081
+
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/values/strings.xml b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..6a2fc29
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ CommentWithReplyList
+
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/values/styles.xml b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..6bf2361
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/main/res/values/styles.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/app/src/test/java/com/moos/example/ExampleUnitTest.java b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/test/java/com/moos/example/ExampleUnitTest.java
new file mode 100644
index 0000000..2158dbc
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/app/src/test/java/com/moos/example/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package com.moos.example;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see Testing documentation
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() throws Exception {
+ assertEquals(4, 2 + 2);
+ }
+}
\ No newline at end of file
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/art/comment_sample.gif b/src/CommentReplyComponent-master/CommentWithReplyList/art/comment_sample.gif
new file mode 100644
index 0000000..492ab54
Binary files /dev/null and b/src/CommentReplyComponent-master/CommentWithReplyList/art/comment_sample.gif differ
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/build.gradle b/src/CommentReplyComponent-master/CommentWithReplyList/build.gradle
new file mode 100644
index 0000000..de09b28
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/build.gradle
@@ -0,0 +1,27 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+
+ repositories {
+ google()
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:4.2.2'
+
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ jcenter()
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/gradle.properties b/src/CommentReplyComponent-master/CommentWithReplyList/gradle.properties
new file mode 100644
index 0000000..c4f0d9c
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/gradle.properties
@@ -0,0 +1,17 @@
+# Project-wide Gradle settings.
+
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx1536m
+android.overridePathCheck=true
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/gradle/wrapper/gradle-wrapper.jar b/src/CommentReplyComponent-master/CommentWithReplyList/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..13372ae
Binary files /dev/null and b/src/CommentReplyComponent-master/CommentWithReplyList/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/gradle/wrapper/gradle-wrapper.properties b/src/CommentReplyComponent-master/CommentWithReplyList/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..5832acb
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Thu Nov 24 20:23:05 CST 2022
+distributionBase=GRADLE_USER_HOME
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
+distributionPath=wrapper/dists
+zipStorePath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/gradlew b/src/CommentReplyComponent-master/CommentWithReplyList/gradlew
new file mode 100644
index 0000000..9d82f78
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/gradlew
@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/gradlew.bat b/src/CommentReplyComponent-master/CommentWithReplyList/gradlew.bat
new file mode 100644
index 0000000..8a0b282
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/src/CommentReplyComponent-master/CommentWithReplyList/settings.gradle b/src/CommentReplyComponent-master/CommentWithReplyList/settings.gradle
new file mode 100644
index 0000000..e7b4def
--- /dev/null
+++ b/src/CommentReplyComponent-master/CommentWithReplyList/settings.gradle
@@ -0,0 +1 @@
+include ':app'
diff --git a/src/CommentReplyComponent-master/LICENSE b/src/CommentReplyComponent-master/LICENSE
new file mode 100644
index 0000000..525733a
--- /dev/null
+++ b/src/CommentReplyComponent-master/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 Moos
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/src/CommentReplyComponent-master/README.md b/src/CommentReplyComponent-master/README.md
new file mode 100644
index 0000000..85263d6
--- /dev/null
+++ b/src/CommentReplyComponent-master/README.md
@@ -0,0 +1,10 @@
+# CommentWithReplyView-master
+基于ExpandableListView实现评论和回复的功能。
+>
+
+## 说明
+- 提供了模拟数据,实现评论和回复的插入数据
+- 对评论和回复数据进行了异常处理
+- material design风格的详情页
+- 处理了NestedScrollView、ExpandableListView和CoordinatorLayout的嵌套问题
+- 点击某条评论,即可@ta进行回复