diff --git a/.DS_Store b/.DS_Store index 18b870e..1cf13b2 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/CommentWithReplyList/app/build.gradle b/CommentWithReplyList/app/build.gradle index 235cc86..ff4b5b6 100644 --- a/CommentWithReplyList/app/build.gradle +++ b/CommentWithReplyList/app/build.gradle @@ -1,11 +1,11 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 26 + compileSdkVersion 25 defaultConfig { applicationId "com.moos.example" minSdkVersion 21 - targetSdkVersion 26 + targetSdkVersion 25 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" @@ -20,10 +20,10 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.android.support:appcompat-v7:26.1.0' + implementation 'com.android.support:appcompat-v7:25.1.0' implementation 'com.android.support.constraint:constraint-layout:1.1.0' testImplementation 'junit:junit:4.12' - implementation 'com.android.support:design:26.1.0' + implementation 'com.android.support:design:25.1.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/CommentWithReplyList/app/src/main/java/com/moos/example/MainActivity.java b/CommentWithReplyList/app/src/main/java/com/moos/example/MainActivity.java index cb661f5..05049c9 100644 --- a/CommentWithReplyList/app/src/main/java/com/moos/example/MainActivity.java +++ b/CommentWithReplyList/app/src/main/java/com/moos/example/MainActivity.java @@ -6,6 +6,7 @@ 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; @@ -105,9 +106,9 @@ protected void onCreate(Bundle savedInstanceState) { } private void initView() { - toolbar = findViewById(R.id.toolbar); - expandableListView = findViewById(R.id.detail_page_lv_comment); - bt_comment = findViewById(R.id.detail_page_do_comment); + 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); diff --git a/CommentWithReplyList/app/src/main/java/com/moos/example/adapter/CommentExpandAdapter.java b/CommentWithReplyList/app/src/main/java/com/moos/example/adapter/CommentExpandAdapter.java index c2d8081..f732fba 100644 --- a/CommentWithReplyList/app/src/main/java/com/moos/example/adapter/CommentExpandAdapter.java +++ b/CommentWithReplyList/app/src/main/java/com/moos/example/adapter/CommentExpandAdapter.java @@ -157,11 +157,11 @@ private class GroupHolder{ private TextView tv_name, tv_content, tv_time; private ImageView iv_like; public GroupHolder(View view) { - logo = view.findViewById(R.id.comment_item_logo); - tv_content = view.findViewById(R.id.comment_item_content); - tv_name = view.findViewById(R.id.comment_item_userName); - tv_time = view.findViewById(R.id.comment_item_time); - iv_like = view.findViewById(R.id.comment_item_like); + 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); } } diff --git a/CommentWithReplyList/art/comment.gif b/CommentWithReplyList/art/comment.gif index 3981319..492ab54 100644 Binary files a/CommentWithReplyList/art/comment.gif and b/CommentWithReplyList/art/comment.gif differ