|
|
@@ -1,6 +1,5 @@
|
|
|
package com.sheep.gamegroup.view.fragment;
|
|
|
|
|
|
-import android.app.Activity;
|
|
|
import android.content.DialogInterface;
|
|
|
import android.content.Intent;
|
|
|
import android.support.annotation.NonNull;
|
|
|
@@ -8,7 +7,6 @@ import android.support.v7.widget.RecyclerView;
|
|
|
import android.text.TextUtils;
|
|
|
import android.view.LayoutInflater;
|
|
|
import android.view.View;
|
|
|
-import android.view.ViewGroup;
|
|
|
import android.webkit.WebView;
|
|
|
import android.widget.EditText;
|
|
|
import android.widget.ImageView;
|
|
|
@@ -75,7 +73,7 @@ public class FgtArticleComment extends BaseListFragment3<UserComment> implements
|
|
|
|
|
|
@Override
|
|
|
public int getLayoutId() {
|
|
|
- return R.layout.net_empty_smart_refresh_rv;
|
|
|
+ return R.layout.net_empty_smart_refresh_rv_input;
|
|
|
}
|
|
|
|
|
|
@BindView(R.id.refresh)
|
|
|
@@ -95,15 +93,12 @@ public class FgtArticleComment extends BaseListFragment3<UserComment> implements
|
|
|
TitleBarUtils.getInstance().setTitle(getActivity(), "详情")
|
|
|
.setTitleFinish(getActivity())
|
|
|
.setShowOrHide(getActivity(), true)
|
|
|
- .setRightImgBotton(getActivity(), R.mipmap.share, new View.OnClickListener() {
|
|
|
- @Override
|
|
|
- public void onClick(View view) {
|
|
|
- FIND_SHARE.onEvent("find_id", article_id);
|
|
|
- if (article == null) {
|
|
|
- Jump2View.getInstance().tryShare(activity, "find_share_url", "find_id", article_id);
|
|
|
- } else {
|
|
|
- Jump2View.getInstance().tryShare(activity, "find_share_url", "find_id", article_id, article.getTitle());
|
|
|
- }
|
|
|
+ .setRightImgBotton(getActivity(), R.mipmap.share, view -> {
|
|
|
+ FIND_SHARE.onEvent("find_id", article_id);
|
|
|
+ if (article == null) {
|
|
|
+ Jump2View.getInstance().tryShare(activity, "find_share_url", "find_id", article_id);
|
|
|
+ } else {
|
|
|
+ Jump2View.getInstance().tryShare(activity, "find_share_url", "find_id", article_id, article.getTitle());
|
|
|
}
|
|
|
});
|
|
|
smartRefreshLayout = refresh;
|
|
|
@@ -123,14 +118,11 @@ public class FgtArticleComment extends BaseListFragment3<UserComment> implements
|
|
|
//头部view
|
|
|
initHeaderView();
|
|
|
//底部可发表评论
|
|
|
- LayoutInflater.from(SheepApp.getInstance()).inflate(R.layout.include_input_comment, bottom);
|
|
|
+// LayoutInflater.from(SheepApp.getInstance()).inflate(R.layout.include_input_comment, bottom);
|
|
|
input_comment_input = bottom.findViewById(R.id.input_comment_input);
|
|
|
- bottom.findViewById(R.id.input_comment_commit).setOnClickListener(new View.OnClickListener() {
|
|
|
- @Override
|
|
|
- public void onClick(View view) {
|
|
|
- String content = input_comment_input.getText().toString();
|
|
|
- commitContent(content);
|
|
|
- }
|
|
|
+ bottom.findViewById(R.id.input_comment_commit).setOnClickListener(view -> {
|
|
|
+ String content = input_comment_input.getText().toString();
|
|
|
+ commitContent(content);
|
|
|
});
|
|
|
EventBus.getDefault().register(this);
|
|
|
|
|
|
@@ -158,12 +150,7 @@ public class FgtArticleComment extends BaseListFragment3<UserComment> implements
|
|
|
@Override
|
|
|
public void onNext(BaseMessage baseMessage) {
|
|
|
input_comment_input.setText("");
|
|
|
- DialogSuccessUtil.showSuccess(getContext(), "发表成功", new DialogInterface.OnDismissListener() {
|
|
|
- @Override
|
|
|
- public void onDismiss(DialogInterface dialogInterface) {
|
|
|
- refreshData();
|
|
|
- }
|
|
|
- });
|
|
|
+ DialogSuccessUtil.showSuccess(getContext(), "发表成功", dialogInterface -> refreshData());
|
|
|
JSONObject json = new JSONObject();
|
|
|
json.put("act", 7);
|
|
|
SheepApp.getInstance().getNetComponent().getApiService()
|