光环助手V3.5-文章详情优化
This commit is contained in:
@ -3,6 +3,7 @@ package com.gh.gamecenter.adapter;
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.RecyclerView.ViewHolder;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
@ -143,16 +144,20 @@ public class CommentDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
|
||||
private void initCommentViewHolder(final CommentViewHolder holder, int position) {
|
||||
final CommentEntity commentEntity = mCommentList.get(position);
|
||||
|
||||
holder.commentLine.setVisibility(View.GONE);
|
||||
holder.commentLineBottom.setVisibility(View.VISIBLE);
|
||||
holder.commentLine.setVisibility(View.VISIBLE);
|
||||
holder.commentLineBottom.setVisibility(View.GONE);
|
||||
|
||||
CommentUtils.setCommentUserView(mContext, holder, commentEntity);
|
||||
|
||||
CommentUtils.setCommentTime(holder.commentTimeTv, commentEntity.getTime());
|
||||
if (commentEntity.getParent() != null) {
|
||||
holder.commentContentTv.setText("@" + commentEntity.getParent().getUser().getName() + ": " + commentEntity.getContent());
|
||||
|
||||
holder.commentContentTv.setText(commentEntity.getContent());
|
||||
if (commentEntity.getParent() != null && !TextUtils.isEmpty(commentEntity.getParent().getUser().getName())) {
|
||||
holder.quoteContainer.setVisibility(View.VISIBLE);
|
||||
holder.quoteAuthorTv.setText(String.format("@%s", commentEntity.getParent().getUser().getName()));
|
||||
holder.quoteContentTv.setText(commentEntity.getParent().getComment());
|
||||
} else {
|
||||
holder.commentContentTv.setText(commentEntity.getContent());
|
||||
holder.quoteContainer.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
holder.commentLikeIv.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@ -5,6 +5,7 @@ import android.content.Intent;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.RecyclerView.ViewHolder;
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -271,7 +272,6 @@ public class MessageDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
|
||||
mContext.getResources().getDisplayMetrics().widthPixels - DisplayUtils.dip2px(mContext, 34));
|
||||
}
|
||||
|
||||
// viewHolder.thumb.setImageURI(mConcernEntity.getGameIcon());
|
||||
ImageUtils.display(viewHolder.thumb, mConcernEntity.getGameIcon());
|
||||
viewHolder.title.setText(mConcernEntity.getGameName());
|
||||
NewsUtils.setNewsPublishOn(viewHolder.time, mConcernEntity.getTime());
|
||||
@ -369,11 +369,13 @@ public class MessageDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
|
||||
return;
|
||||
}
|
||||
|
||||
if (commentEntity.getParent() != null) {
|
||||
holder.commentContentTv.setText(StringUtils.buildString("回复", commentEntity.getParent().getUser().getName(),
|
||||
": ", commentEntity.getContent()));
|
||||
holder.commentContentTv.setText(commentEntity.getContent());
|
||||
if (commentEntity.getParent() != null && !TextUtils.isEmpty(commentEntity.getParent().getUser().getName())) {
|
||||
holder.quoteContainer.setVisibility(View.VISIBLE);
|
||||
holder.quoteAuthorTv.setText(String.format("@%s", commentEntity.getParent().getUser().getName()));
|
||||
holder.quoteContentTv.setText(commentEntity.getParent().getComment());
|
||||
} else {
|
||||
holder.commentContentTv.setText(commentEntity.getContent());
|
||||
holder.quoteContainer.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
CommentUtils.setCommentUserView(mContext, holder, commentEntity);
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.gh.gamecenter.adapter.viewholder;
|
||||
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
@ -36,6 +37,13 @@ public class CommentViewHolder extends BaseRecyclerViewHolder {
|
||||
@BindView(R.id.comment_badge)
|
||||
public View commentBadge;
|
||||
|
||||
@BindView(R.id.comment_quote_container)
|
||||
public ViewGroup quoteContainer;
|
||||
@BindView(R.id.comment_quote_author_tv)
|
||||
public TextView quoteAuthorTv;
|
||||
@BindView(R.id.comment_quote_content_tv)
|
||||
public TextView quoteContentTv;
|
||||
|
||||
public CommentViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
}
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
package com.gh.gamecenter.adapter.viewholder;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.facebook.drawee.view.SimpleDraweeView;
|
||||
import com.gh.base.BaseRecyclerViewHolder;
|
||||
import com.gh.gamecenter.R;
|
||||
|
||||
import butterknife.BindView;
|
||||
|
||||
/**
|
||||
* Created by LGT on 2016/9/8.
|
||||
*/
|
||||
public class GameDetailTopViewHolder extends BaseRecyclerViewHolder {
|
||||
|
||||
@BindView(R.id.gamedetail_iv_thumb)
|
||||
public SimpleDraweeView gamedetailThumb;
|
||||
@BindView(R.id.gamedetail_tv_name)
|
||||
public TextView gamedetailName;
|
||||
@BindView(R.id.gamedetail_tv_info)
|
||||
public TextView gamedetailInfo;
|
||||
@BindView(R.id.gamedetail_tv_concern)
|
||||
public TextView gamedetailConcern;
|
||||
|
||||
public GameDetailTopViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.gh.gamecenter.adapter.viewholder;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.facebook.drawee.view.SimpleDraweeView;
|
||||
import com.gh.base.BaseRecyclerViewHolder;
|
||||
import com.gh.gamecenter.R;
|
||||
|
||||
import butterknife.BindView;
|
||||
|
||||
/**
|
||||
* Created by LGT on 2016/9/8.
|
||||
*/
|
||||
public class NewsDetailGameViewHolder extends BaseRecyclerViewHolder {
|
||||
|
||||
@BindView(R.id.game_iv_thumb)
|
||||
public SimpleDraweeView gameThumb;
|
||||
@BindView(R.id.game_tv_name)
|
||||
public TextView gameName;
|
||||
@BindView(R.id.game_tv_info)
|
||||
public TextView gameInfo;
|
||||
@BindView(R.id.game_tv_concern)
|
||||
public TextView gameConcern;
|
||||
@BindView(R.id.game_iv_libao)
|
||||
public View libaoIcon;
|
||||
@BindView(R.id.game_server_type)
|
||||
public TextView gameServerType;
|
||||
|
||||
public NewsDetailGameViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package com.gh.gamecenter.entity
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.android.parcel.Parcelize
|
||||
|
||||
@Parcelize
|
||||
data class ArticleCommentParent(val user: User = User(),
|
||||
val comment: String = "") : Parcelable
|
||||
|
||||
@Parcelize
|
||||
data class User(val name: String = "") : Parcelable
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ class CommentEntity() : Parcelable {
|
||||
|
||||
var user: UserEntity = UserEntity()
|
||||
|
||||
var parent: CommentParentEntity? = null
|
||||
var parent: ArticleCommentParent? = null
|
||||
|
||||
@SerializedName("parent_user")
|
||||
var parentUser: CommentParentEntity? = null
|
||||
|
||||
@ -12,16 +12,12 @@ import android.text.TextWatcher;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.facebook.drawee.view.SimpleDraweeView;
|
||||
import com.gh.common.constant.Config;
|
||||
import com.gh.common.util.CheckLoginUtils;
|
||||
import com.gh.common.util.DialogUtils;
|
||||
import com.gh.common.util.EntranceUtils;
|
||||
import com.gh.common.util.ImageUtils;
|
||||
import com.gh.common.util.LoginUtils;
|
||||
import com.gh.common.util.PostCommentUtils;
|
||||
import com.gh.common.util.TimestampUtils;
|
||||
@ -56,7 +52,6 @@ import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.OnClick;
|
||||
import butterknife.OnTouch;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import retrofit2.HttpException;
|
||||
@ -73,28 +68,12 @@ public class MessageDetailFragment extends NormalFragment implements OnCommentCa
|
||||
|
||||
@BindView(R.id.message_detail_rv)
|
||||
RecyclerView mMessageDetailRv;
|
||||
@BindView(R.id.message_detail_user_rl)
|
||||
RelativeLayout mMessageDetailUserRl;
|
||||
@BindView(R.id.message_detail_comment_rl)
|
||||
RelativeLayout mMessageDetailCommentRl;
|
||||
@BindView(R.id.comment_user_icon)
|
||||
SimpleDraweeView mMessageDetailIconDv;
|
||||
@BindView(R.id.comment_user_name)
|
||||
TextView mMessageDetailUserNameTv;
|
||||
@BindView(R.id.comment_send)
|
||||
@BindView(R.id.comment_send_btn)
|
||||
TextView mMessageDetailCommentSend;
|
||||
@BindView(R.id.message_detail_comment_et)
|
||||
@BindView(R.id.comment_et)
|
||||
EditText mMessageDetailEt;
|
||||
@BindView(R.id.message_detail_comment_hint_rl)
|
||||
RelativeLayout mMessageDetailCommentHintRl;
|
||||
@BindView(R.id.message_detail_sv)
|
||||
ScrollView mMessageDetailSv;
|
||||
@BindView(R.id.message_detail_hint_line)
|
||||
View mMessageDetailLine;
|
||||
@BindView(R.id.reuse_no_connection)
|
||||
LinearLayout mNoConnection;
|
||||
@BindView(R.id.message_detail_close_comment)
|
||||
View mColseCommentV;
|
||||
|
||||
private LinearLayoutManager mLayoutManager;
|
||||
|
||||
@ -190,10 +169,6 @@ public class MessageDetailFragment extends NormalFragment implements OnCommentCa
|
||||
});
|
||||
|
||||
mUserInfo = UserManager.getInstance().getUserInfoEntity();
|
||||
if (mUserInfo != null) {
|
||||
ImageUtils.display(mMessageDetailIconDv, mUserInfo.getIcon());
|
||||
mMessageDetailUserNameTv.setText(mUserInfo.getName());
|
||||
}
|
||||
|
||||
if (newsId != null && mConcernEntity == null) {
|
||||
getConcernDigest();
|
||||
@ -273,11 +248,9 @@ public class MessageDetailFragment extends NormalFragment implements OnCommentCa
|
||||
});
|
||||
}
|
||||
|
||||
@OnClick({R.id.message_detail_comment_hint_rl, R.id.reuse_no_connection})
|
||||
@OnClick({R.id.reuse_no_connection})
|
||||
public void OnViewClick(View view) {
|
||||
if (view.getId() == R.id.message_detail_comment_hint_rl) {
|
||||
setSoftInput(true);
|
||||
} else if (view.getId() == R.id.reuse_no_connection) {
|
||||
if (view.getId() == R.id.reuse_no_connection) {
|
||||
if (newsId != null && mConcernEntity == null) {
|
||||
showNoConnection(false);
|
||||
}
|
||||
@ -289,14 +262,9 @@ public class MessageDetailFragment extends NormalFragment implements OnCommentCa
|
||||
if (isShow) {
|
||||
CheckLoginUtils.checkLogin(getContext(), () -> {
|
||||
Util_System_Keyboard.showSoftKeyboard(getContext(), mMessageDetailEt);
|
||||
mMessageDetailCommentHintRl.setVisibility(View.GONE);
|
||||
mMessageDetailLine.setVisibility(View.GONE);
|
||||
mMessageDetailCommentRl.setVisibility(View.VISIBLE);
|
||||
mMessageDetailUserRl.setVisibility(View.VISIBLE);
|
||||
mMessageDetailEt.setFocusable(true);
|
||||
mMessageDetailEt.setFocusableInTouchMode(true);
|
||||
mMessageDetailEt.requestFocus();
|
||||
mColseCommentV.setVisibility(View.VISIBLE);
|
||||
|
||||
if (mCommentEntity != null && mCommentEntity.getUser() != null) {
|
||||
mMessageDetailEt.setHint(getString(R.string.comment_repty_hint, mCommentEntity.getUser().getName()));
|
||||
@ -306,11 +274,6 @@ public class MessageDetailFragment extends NormalFragment implements OnCommentCa
|
||||
});
|
||||
} else {
|
||||
Util_System_Keyboard.hideSoftKeyboard(getActivity());
|
||||
mMessageDetailCommentHintRl.setVisibility(View.VISIBLE);
|
||||
mMessageDetailLine.setVisibility(View.VISIBLE);
|
||||
mMessageDetailCommentRl.setVisibility(View.GONE);
|
||||
mMessageDetailUserRl.setVisibility(View.GONE);
|
||||
mColseCommentV.setVisibility(View.GONE);
|
||||
|
||||
if (mCommentEntity != null) {
|
||||
mCommentEntity = null; // 清空当前评论实体
|
||||
@ -320,15 +283,7 @@ public class MessageDetailFragment extends NormalFragment implements OnCommentCa
|
||||
}
|
||||
}
|
||||
|
||||
@OnTouch(R.id.message_detail_close_comment)
|
||||
public boolean OnRecyclerTouchListener() {
|
||||
if (mMessageDetailCommentRl.getVisibility() == View.VISIBLE) {
|
||||
setSoftInput(false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@OnClick(R.id.comment_send)
|
||||
@OnClick(R.id.comment_send_btn)
|
||||
public void OnSendCommentListener() {
|
||||
final String content = mMessageDetailEt.getText().toString();
|
||||
|
||||
@ -460,9 +415,6 @@ public class MessageDetailFragment extends NormalFragment implements OnCommentCa
|
||||
if (newsId != null) {
|
||||
getConcernDigest();
|
||||
}
|
||||
if (mMessageDetailCommentRl.getVisibility() == View.VISIBLE) {
|
||||
setSoftInput(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -471,10 +423,6 @@ public class MessageDetailFragment extends NormalFragment implements OnCommentCa
|
||||
public void onEventMainThread(EBReuse reuse) {
|
||||
if (reuse.getType().equals(LOGIN_TAG)) { // 登入
|
||||
mUserInfo = UserManager.getInstance().getUserInfoEntity();
|
||||
if (mUserInfo != null) {
|
||||
ImageUtils.display(mMessageDetailIconDv, mUserInfo.getIcon());
|
||||
mMessageDetailUserNameTv.setText(mUserInfo.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ import android.preference.PreferenceManager;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.RecyclerView.ViewHolder;
|
||||
import android.text.Layout;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
@ -18,6 +19,7 @@ import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.gh.base.OnRequestCallBackListener;
|
||||
@ -46,8 +48,8 @@ import com.gh.gamecenter.ViewImageActivity;
|
||||
import com.gh.gamecenter.WebActivity;
|
||||
import com.gh.gamecenter.adapter.viewholder.CommentViewHolder;
|
||||
import com.gh.gamecenter.adapter.viewholder.GameDetailNewsViewHolder;
|
||||
import com.gh.gamecenter.adapter.viewholder.GameDetailTopViewHolder;
|
||||
import com.gh.gamecenter.adapter.viewholder.NewsDetailCommentListViewHolder;
|
||||
import com.gh.gamecenter.adapter.viewholder.NewsDetailGameViewHolder;
|
||||
import com.gh.gamecenter.entity.ApkEntity;
|
||||
import com.gh.gamecenter.entity.CommentEntity;
|
||||
import com.gh.gamecenter.entity.CommentnumEntity;
|
||||
@ -139,7 +141,7 @@ public class NewsDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
|
||||
return new NewsDetailContentViewHolder(view);
|
||||
case 1:
|
||||
view = mLayoutInflater.inflate(R.layout.newsdetail_item_game, parent, false);
|
||||
return new GameDetailTopViewHolder(view);
|
||||
return new NewsDetailGameViewHolder(view);
|
||||
case 2:
|
||||
view = mLayoutInflater.inflate(R.layout.gamedetail_item_news, parent, false);
|
||||
return new GameDetailNewsViewHolder(view);
|
||||
@ -156,8 +158,8 @@ public class NewsDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
|
||||
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
|
||||
if (holder instanceof NewsDetailContentViewHolder) {
|
||||
initNewsDetailContentViewHolder((NewsDetailContentViewHolder) holder);
|
||||
} else if (holder instanceof GameDetailTopViewHolder) {
|
||||
initGameDetailTopViewHolder((GameDetailTopViewHolder) holder);
|
||||
} else if (holder instanceof NewsDetailGameViewHolder) {
|
||||
initGameViewHolder((NewsDetailGameViewHolder) holder);
|
||||
} else if (holder instanceof GameDetailNewsViewHolder) {
|
||||
initNewsDetailNewsViewHolder((GameDetailNewsViewHolder) holder);
|
||||
} else if (holder instanceof NewsDetailCommentListViewHolder) {
|
||||
@ -322,37 +324,81 @@ public class NewsDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
|
||||
}
|
||||
}
|
||||
|
||||
private void initGameDetailTopViewHolder(final GameDetailTopViewHolder viewHolder) {
|
||||
ImageUtils.display(viewHolder.gamedetailThumb, mGameEntity.getIcon());
|
||||
viewHolder.gamedetailName.setText(mGameEntity.getName());
|
||||
private void initGameViewHolder(final NewsDetailGameViewHolder viewHolder) {
|
||||
ImageUtils.display(viewHolder.gameThumb, mGameEntity.getIcon());
|
||||
viewHolder.gameName.setText(mGameEntity.getName());
|
||||
if (mGameEntity.getApk() != null && mGameEntity.getApk().size() != 0) {
|
||||
for (int i = 0, size = mGameEntity.getApk().size(); i < size; i++) {
|
||||
ApkEntity apkEntity = mGameEntity.getApk().get(i);
|
||||
if ("9u".equals(apkEntity.getPlatform())) {
|
||||
viewHolder.gamedetailInfo.setText(String.format("V%s | %s", apkEntity.getVersion(), apkEntity.getSize()));
|
||||
viewHolder.gameInfo.setText(String.format("V%s | %s", apkEntity.getVersion(), apkEntity.getSize()));
|
||||
break;
|
||||
}
|
||||
if (i == size - 1) {
|
||||
viewHolder.gamedetailInfo.setText(String.format("V%s | %s", apkEntity.getVersion(), apkEntity.getSize()));
|
||||
viewHolder.gameInfo.setText(String.format("V%s | %s", apkEntity.getVersion(), apkEntity.getSize()));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (mNewsDetailEntity.getMe() != null && mNewsDetailEntity.getMe().isGameConcerned()) {
|
||||
viewHolder.gamedetailConcern.setText(R.string.cancel_concern);
|
||||
viewHolder.gamedetailConcern.setBackgroundResource(R.drawable.button_normal_border);
|
||||
viewHolder.gamedetailConcern.setTextColor(ContextCompat.getColor(mContext, R.color.theme));
|
||||
viewHolder.gameConcern.setText(R.string.cancel_concern);
|
||||
viewHolder.gameConcern.setBackgroundResource(R.drawable.button_normal_border);
|
||||
viewHolder.gameConcern.setTextColor(ContextCompat.getColor(mContext, R.color.theme));
|
||||
} else {
|
||||
viewHolder.gamedetailConcern.setText(R.string.concern);
|
||||
viewHolder.gamedetailConcern.setBackgroundResource(R.drawable.button_normal_style);
|
||||
viewHolder.gamedetailConcern.setTextColor(Color.WHITE);
|
||||
viewHolder.gameConcern.setText(R.string.concern);
|
||||
viewHolder.gameConcern.setBackgroundResource(R.drawable.button_normal_style);
|
||||
viewHolder.gameConcern.setTextColor(Color.WHITE);
|
||||
}
|
||||
viewHolder.gamedetailConcern.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
if (mGameEntity.isLibaoExists()) {
|
||||
viewHolder.libaoIcon.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
viewHolder.libaoIcon.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
String serverRemark = mGameEntity.getServerRemark();
|
||||
if (TextUtils.isEmpty(serverRemark)) {
|
||||
String serverGenre = mGameEntity.getServerGenre();
|
||||
if (TextUtils.isEmpty(serverGenre)) {
|
||||
viewHolder.gameServerType.setVisibility(View.GONE);
|
||||
} else {
|
||||
viewHolder.gameServerType.setVisibility(View.INVISIBLE);
|
||||
viewHolder.gameServerType.setText(serverGenre);
|
||||
viewHolder.gameServerType.setBackgroundResource(R.drawable.textview_yellow_bg);
|
||||
}
|
||||
} else {
|
||||
viewHolder.gameServerType.setVisibility(View.INVISIBLE);
|
||||
viewHolder.gameServerType.setText(serverRemark);
|
||||
viewHolder.gameServerType.setBackgroundResource(R.drawable.textview_orange_up);
|
||||
}
|
||||
|
||||
viewHolder.gameName.post(() -> {
|
||||
if (viewHolder.gameServerType.getVisibility() == View.INVISIBLE) {
|
||||
int nameWidth = viewHolder.gameName.getWidth();
|
||||
int typeWidth = viewHolder.gameServerType.getWidth();
|
||||
|
||||
Layout layout = viewHolder.gameName.getLayout();
|
||||
if (layout != null) {
|
||||
float lineRight = layout.getLineRight(layout.getLineCount() - 1);
|
||||
int margin = DisplayUtils.dip2px(2);
|
||||
if (nameWidth - lineRight > typeWidth + margin) {
|
||||
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) viewHolder.gameServerType.getLayoutParams();
|
||||
layoutParams.leftMargin = (int) (lineRight + margin);
|
||||
viewHolder.gameServerType.setLayoutParams(layoutParams);
|
||||
} else {
|
||||
viewHolder.gameName.setMinLines(layout.getLineCount() + 1);
|
||||
}
|
||||
viewHolder.gameServerType.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
viewHolder.gameConcern.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
final TextView concern = ((TextView) v);
|
||||
CheckLoginUtils.checkLogin(mContext, () -> {
|
||||
String str = concern.getText().toString();
|
||||
viewHolder.gamedetailConcern.setEnabled(false);
|
||||
viewHolder.gameConcern.setEnabled(false);
|
||||
if (mContext.getString(R.string.concern).equals(str)) {
|
||||
// 添加关注
|
||||
ConcernUtils.INSTANCE.postConcernGameId(mContext, mGameEntity.getId()
|
||||
@ -370,13 +416,13 @@ public class NewsDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
|
||||
concern.setTextColor(ContextCompat.getColor(mContext, R.color.theme));
|
||||
|
||||
Utils.toast(mContext, R.string.concern_success);
|
||||
viewHolder.gamedetailConcern.setEnabled(true);
|
||||
viewHolder.gameConcern.setEnabled(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
Utils.toast(mContext, R.string.concern_failure);
|
||||
viewHolder.gamedetailConcern.setEnabled(true);
|
||||
viewHolder.gameConcern.setEnabled(true);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@ -402,20 +448,20 @@ public class NewsDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
|
||||
concern.setText(mContext.getString(R.string.concern));
|
||||
concern.setBackgroundResource(R.drawable.button_normal_style);
|
||||
concern.setTextColor(Color.WHITE);
|
||||
viewHolder.gamedetailConcern.setEnabled(true);
|
||||
viewHolder.gameConcern.setEnabled(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError() {
|
||||
Utils.toast(mContext, R.string.cancel_concern_failure);
|
||||
viewHolder.gamedetailConcern.setEnabled(true);
|
||||
viewHolder.gameConcern.setEnabled(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, new DialogUtils.CancelListener() {
|
||||
@Override
|
||||
public void onCancel() {
|
||||
viewHolder.gamedetailConcern.setEnabled(true);
|
||||
viewHolder.gameConcern.setEnabled(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -504,13 +550,15 @@ public class NewsDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
|
||||
viewHolder.commentLikeCountTv.setText(NumberUtils.transSimpleCount(commentEntity.getVote()));
|
||||
holder.list.addView(contentView);
|
||||
|
||||
if (commentEntity.getParent() != null) {
|
||||
viewHolder.commentContentTv.setText("回复" + commentEntity.getParent().getUser().getName() + ": " + commentEntity.getContent());
|
||||
viewHolder.commentContentTv.setText(commentEntity.getContent());
|
||||
if (commentEntity.getParent() != null && !TextUtils.isEmpty(commentEntity.getParent().getUser().getName())) {
|
||||
viewHolder.quoteContainer.setVisibility(View.VISIBLE);
|
||||
viewHolder.quoteAuthorTv.setText(String.format("@%s", commentEntity.getParent().getUser().getName()));
|
||||
viewHolder.quoteContentTv.setText(commentEntity.getParent().getComment());
|
||||
} else {
|
||||
viewHolder.commentContentTv.setText(commentEntity.getContent());
|
||||
viewHolder.quoteContainer.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
|
||||
NewsUtils.setNewsDetailTime(viewHolder.commentTimeTv, commentEntity.getTime());
|
||||
|
||||
|
||||
@ -541,7 +589,6 @@ public class NewsDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
|
||||
View view = new View(mContext);
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT
|
||||
, DisplayUtils.dip2px(mContext, 1));
|
||||
params.setMargins(DisplayUtils.dip2px(mContext, 10), 0, DisplayUtils.dip2px(mContext, 10), 0);
|
||||
view.setLayoutParams(params);
|
||||
view.setBackgroundColor(ContextCompat.getColor(mContext, R.color.cutting_line));
|
||||
linearLayout.addView(view);
|
||||
|
||||
@ -8,15 +8,11 @@ import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.facebook.drawee.view.SimpleDraweeView;
|
||||
import com.gh.common.util.CheckLoginUtils;
|
||||
import com.gh.common.util.DialogUtils;
|
||||
import com.gh.common.util.EntranceUtils;
|
||||
import com.gh.common.util.ImageUtils;
|
||||
import com.gh.common.util.LoginUtils;
|
||||
import com.gh.common.util.PostCommentUtils;
|
||||
import com.gh.gamecenter.NewsDetailActivity;
|
||||
@ -25,8 +21,6 @@ import com.gh.gamecenter.adapter.CommentDetailAdapter;
|
||||
import com.gh.gamecenter.adapter.OnCommentCallBackListener;
|
||||
import com.gh.gamecenter.entity.CommentEntity;
|
||||
import com.gh.gamecenter.entity.MessageEntity;
|
||||
import com.gh.gamecenter.entity.UserInfoEntity;
|
||||
import com.gh.gamecenter.manager.UserManager;
|
||||
import com.gh.gamecenter.normal.NormalFragment;
|
||||
import com.lightgame.utils.Util_System_Keyboard;
|
||||
import com.lightgame.utils.Utils;
|
||||
@ -34,8 +28,6 @@ import com.lightgame.utils.Utils;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.OnClick;
|
||||
import butterknife.OnTouch;
|
||||
@ -45,38 +37,30 @@ import retrofit2.HttpException;
|
||||
* Created by CsHeng on 14/12/2017.
|
||||
* <p>
|
||||
* 评论详情页面-查看对话详情
|
||||
* TODO: 16/11/17 时间比较紧 先暂时这么做 最好发表评论那块和评论详情整合
|
||||
*/
|
||||
public class CommentDetailFragment extends NormalFragment implements OnCommentCallBackListener {
|
||||
|
||||
@BindView(R.id.comment_detail_rv)
|
||||
RecyclerView mRecyclerView;
|
||||
@BindView(R.id.comment_detail_close_comment)
|
||||
View mCommentDetailCloseComment;
|
||||
@BindView(R.id.comment_detail_comment_et)
|
||||
@BindView(R.id.comment_et)
|
||||
EditText mCommentDetailCommentEt;
|
||||
@BindView(R.id.comment_user_icon)
|
||||
SimpleDraweeView mCommentUserIcon;
|
||||
@BindView(R.id.comment_user_name)
|
||||
TextView mCommentUserName;
|
||||
@BindView(R.id.comment_send)
|
||||
@BindView(R.id.comment_send_btn)
|
||||
TextView mCommentSend;
|
||||
@BindView(R.id.comment_detail_user_rl)
|
||||
RelativeLayout mCommentDetailUserRl;
|
||||
@BindView(R.id.comment_detail_comment_rl)
|
||||
RelativeLayout mCommentDetailCommentRl;
|
||||
@BindView(R.id.comment_detail_sv)
|
||||
ScrollView mCommentDetailSv;
|
||||
@BindView(R.id.reuse_none_data)
|
||||
View mNoData;
|
||||
@BindView(R.id.reuse_tv_none_data)
|
||||
TextView mNoDataTv;
|
||||
@BindView(R.id.skip_article_detail_btn)
|
||||
TextView mSkipArticleDetail;
|
||||
@BindView(R.id.comment_content_container)
|
||||
View mCommentContentContainer;
|
||||
@BindView(R.id.comment_line)
|
||||
View mCommentLine;
|
||||
@BindView(R.id.comment_detail_close_comment)
|
||||
View mCommentDetailCloseComment;
|
||||
|
||||
private Dialog mSendingDialog;
|
||||
|
||||
private UserInfoEntity mUserInfo;
|
||||
private CommentEntity mCommentEntity; // 回复评论的实体 用完马上清空
|
||||
|
||||
private CommentDetailAdapter mAdapter;
|
||||
@ -114,13 +98,6 @@ public class CommentDetailFragment extends NormalFragment implements OnCommentCa
|
||||
}
|
||||
});
|
||||
|
||||
mUserInfo = UserManager.getInstance().getUserInfoEntity();
|
||||
if (mUserInfo != null) {
|
||||
ImageUtils.display(mCommentUserIcon, mUserInfo.getIcon());
|
||||
mCommentUserName.setText(mUserInfo.getName());
|
||||
}
|
||||
|
||||
|
||||
// 显示原文跳转按钮
|
||||
if (mArticle != null) {
|
||||
mSkipArticleDetail.setVisibility(View.VISIBLE);
|
||||
@ -167,13 +144,13 @@ public class CommentDetailFragment extends NormalFragment implements OnCommentCa
|
||||
|
||||
@OnTouch(R.id.comment_detail_close_comment)
|
||||
public boolean OnRecyclerTouchListener() {
|
||||
if (mCommentDetailCloseComment.getVisibility() == View.VISIBLE) {
|
||||
if (mCommentContentContainer.getVisibility() == View.VISIBLE) {
|
||||
setSoftInput(false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@OnClick({R.id.comment_send})
|
||||
@OnClick({R.id.comment_send_btn})
|
||||
public void OnSendCommentListener() {
|
||||
final String content = mCommentDetailCommentEt.getText().toString();
|
||||
|
||||
@ -229,7 +206,8 @@ public class CommentDetailFragment extends NormalFragment implements OnCommentCa
|
||||
if (isShow) {
|
||||
CheckLoginUtils.checkLogin(getContext(), () -> {
|
||||
Util_System_Keyboard.showSoftKeyboard(getContext(), mCommentDetailCommentEt);
|
||||
mCommentDetailCommentRl.setVisibility(View.VISIBLE);
|
||||
mCommentContentContainer.setVisibility(View.VISIBLE);
|
||||
mCommentLine.setVisibility(View.VISIBLE);
|
||||
mCommentDetailCommentEt.setFocusable(true);
|
||||
mCommentDetailCommentEt.setFocusableInTouchMode(true);
|
||||
mCommentDetailCommentEt.requestFocus();
|
||||
@ -244,9 +222,9 @@ public class CommentDetailFragment extends NormalFragment implements OnCommentCa
|
||||
} else {
|
||||
Util_System_Keyboard.hideSoftKeyboard(getContext(), mCommentDetailCommentEt);
|
||||
|
||||
mCommentContentContainer.setVisibility(View.GONE);
|
||||
mCommentLine.setVisibility(View.GONE);
|
||||
mCommentDetailCloseComment.setVisibility(View.GONE);
|
||||
|
||||
mCommentDetailCommentRl.setVisibility(View.GONE);
|
||||
if (mCommentEntity != null) {
|
||||
mCommentEntity = null; // 清空当前评论实体
|
||||
mCommentDetailCommentEt.setHint(getString(R.string.message_detail_comment_hint));
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 351 B |
@ -55,11 +55,13 @@
|
||||
android:id = "@+id/comment_icon"
|
||||
android:layout_width = "wrap_content"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_centerVertical = "true"
|
||||
android:src = "@drawable/ic_edit" />
|
||||
|
||||
<TextView
|
||||
android:layout_width = "wrap_content"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_centerVertical = "true"
|
||||
android:layout_marginLeft = "10dp"
|
||||
android:layout_toRightOf = "@+id/comment_icon"
|
||||
android:text = "@string/news_detail_send_comment"
|
||||
|
||||
@ -8,108 +8,172 @@
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "match_parent" >
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:id = "@+id/comment_line"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "1dp"
|
||||
android:layout_marginLeft = "10dp"
|
||||
android:layout_marginRight = "10dp"
|
||||
android:background = "@color/cutting_line" />
|
||||
android:id="@+id/comment_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/cutting_line" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id = "@+id/comment_icon_container"
|
||||
android:layout_width = "45dp"
|
||||
android:layout_height = "45dp"
|
||||
android:layout_marginLeft = "16dp"
|
||||
android:layout_marginRight = "17dp"
|
||||
android:layout_marginTop = "16dp">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="12dp">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id = "@+id/comment_user_icon"
|
||||
android:layout_width = "45dp"
|
||||
android:layout_height = "45dp"
|
||||
fresco:placeholderImage = "@drawable/user_default_icon_comment"
|
||||
fresco:placeholderImageScaleType = "fitXY"
|
||||
fresco:roundAsCircle = "true" />
|
||||
<RelativeLayout
|
||||
android:id="@+id/comment_icon_container"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id = "@+id/comment_user_badge"
|
||||
android:layout_width = "15dp"
|
||||
android:layout_height = "15dp"
|
||||
android:layout_alignParentBottom = "true"
|
||||
android:layout_alignParentRight = "true"
|
||||
tools:src = "@drawable/ic_discover_select"/>
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/comment_user_icon"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
fresco:placeholderImage="@drawable/user_default_icon_comment"
|
||||
fresco:placeholderImageScaleType="fitXY"
|
||||
fresco:roundAsCircle="true"
|
||||
tools:src="@drawable/ic_discover_select" />
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/comment_user_badge"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
tools:src="@drawable/ic_discover_select" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/comment_username_and_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/comment_icon_container"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_toRightOf="@+id/comment_icon_container">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp"
|
||||
tools:text="孙一峰" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_badge"
|
||||
android:layout_width="27dp"
|
||||
android:layout_height="13dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_toRightOf="@id/comment_user_name"
|
||||
android:background="@color/theme"
|
||||
android:gravity="center"
|
||||
android:text="置顶"
|
||||
android:textColor="#fff"
|
||||
android:textSize="9sp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/comment_user_name"
|
||||
android:layout_marginTop="1dp"
|
||||
android:textColor="@color/c7c7c7"
|
||||
android:textSize="10sp"
|
||||
tools:text="一个小时前" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_like_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/hint"
|
||||
android:textSize="13sp"
|
||||
tools:text="9" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/comment_like"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="7dp"
|
||||
android:paddingLeft="7dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingTop="6dp"
|
||||
android:src="@drawable/ic_like_unselect" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/comment_username_and_time"
|
||||
android:layout_below="@id/comment_username_and_time"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:lineSpacingExtra="3dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="13sp"
|
||||
tools:text="星際爭霸與星際爭霸2的職業選手,電競戰隊Xteam的經理,美少女团体星際老男孩成員之一,還在杭州經營水產生意。" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/comment_quote_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/comment_username_and_time"
|
||||
android:layout_below="@id/comment_content"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:background="#f7f7f7"
|
||||
android:orientation="vertical"
|
||||
android:padding="9dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_quote_author_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_5d5d5d"
|
||||
android:textSize="12sp"
|
||||
tools:text="孙宁" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comment_quote_content_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:lineSpacingExtra="3dp"
|
||||
android:textColor="@color/text_5d5d5d"
|
||||
android:textSize="12sp"
|
||||
tools:text="2006年12月30日,孙一峰与女友weiwei结婚,育有儿子孙宁和女儿孙焕佳。" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id = "@+id/comment_username_and_time"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_alignTop = "@id/comment_icon_container"
|
||||
android:layout_toRightOf = "@+id/comment_icon_container"
|
||||
android:paddingRight = "5dp" >
|
||||
|
||||
<TextView
|
||||
android:id = "@+id/comment_user_name"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_toLeftOf = "@+id/comment_like_count"
|
||||
android:textColor = "@color/title"
|
||||
android:textSize = "15sp" />
|
||||
|
||||
<TextView
|
||||
android:id = "@+id/comment_time"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_below = "@+id/comment_user_name"
|
||||
android:layout_marginTop = "6dp"
|
||||
android:textColor = "@color/c7c7c7"
|
||||
android:textSize = "11sp" />
|
||||
|
||||
<TextView
|
||||
android:id = "@+id/comment_like_count"
|
||||
android:layout_width = "wrap_content"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_toLeftOf = "@+id/comment_like"
|
||||
android:textColor = "@color/hint"
|
||||
android:textSize = "11sp" />
|
||||
|
||||
<ImageView
|
||||
android:id = "@+id/comment_like"
|
||||
android:layout_width = "36dp"
|
||||
android:layout_height = "26dp"
|
||||
android:layout_alignParentRight = "true"
|
||||
android:paddingBottom = "12dp"
|
||||
android:paddingLeft = "4dp"
|
||||
android:paddingRight = "10dp"
|
||||
android:src = "@drawable/ic_like_unselect" />
|
||||
|
||||
</RelativeLayout >
|
||||
|
||||
<TextView
|
||||
android:id = "@+id/comment_content"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_below = "@+id/comment_username_and_time"
|
||||
android:layout_marginRight = "15dp"
|
||||
android:layout_toRightOf = "@+id/comment_icon_container"
|
||||
android:paddingBottom = "20dp"
|
||||
android:paddingTop = "10dp"
|
||||
android:textColor = "@color/title"
|
||||
android:textSize = "15sp" />
|
||||
</RelativeLayout >
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id = "@+id/comment_line_bottom"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "1dp"
|
||||
android:layout_marginLeft = "10dp"
|
||||
android:layout_marginRight = "10dp"
|
||||
android:background = "@color/cutting_line"
|
||||
android:visibility = "gone" />
|
||||
android:id="@+id/comment_line_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/cutting_line"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</LinearLayout >
|
||||
</LinearLayout>
|
||||
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android = "http://schemas.android.com/apk/res/android"
|
||||
xmlns:fresco = "http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "match_parent" >
|
||||
|
||||
@ -8,7 +7,7 @@
|
||||
android:id = "@+id/skip_article_detail_btn"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "40dp"
|
||||
android:layout_marginBottom = "8dp"
|
||||
android:layout_marginBottom = "7dp"
|
||||
android:layout_marginTop = "8dp"
|
||||
android:background = "@android:color/white"
|
||||
android:drawableLeft = "@drawable/article_link"
|
||||
@ -18,13 +17,14 @@
|
||||
android:singleLine = "true"
|
||||
android:textColor = "@color/theme"
|
||||
android:textSize = "13dp"
|
||||
android:visibility = "visible" />
|
||||
android:visibility = "gone" />
|
||||
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id = "@+id/comment_detail_rv"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "match_parent"
|
||||
android:layout_above = "@+id/comment_content_container"
|
||||
android:layout_below = "@+id/skip_article_detail_btn" />
|
||||
|
||||
<include
|
||||
@ -32,88 +32,70 @@
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "match_parent" />
|
||||
|
||||
|
||||
<View
|
||||
android:id = "@+id/comment_detail_close_comment"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_above = "@+id/comment_detail_sv"
|
||||
android:visibility = "visible" />
|
||||
android:layout_above = "@+id/comment_content_container"
|
||||
android:visibility = "gone" />
|
||||
|
||||
|
||||
<View
|
||||
android:id = "@+id/comment_line"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "7dp"
|
||||
android:layout_above = "@+id/comment_detail_sv"
|
||||
android:background = "@drawable/shadow" />
|
||||
android:layout_above = "@+id/comment_content_container"
|
||||
android:background = "@drawable/shadow"
|
||||
android:visibility = "gone" />
|
||||
|
||||
<ScrollView
|
||||
android:id = "@+id/comment_detail_sv"
|
||||
<RelativeLayout
|
||||
android:id = "@+id/comment_content_container"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_alignParentBottom = "true"
|
||||
android:background = "@android:color/white" >
|
||||
android:background = "@android:color/transparent"
|
||||
android:visibility = "gone" >
|
||||
|
||||
<RelativeLayout
|
||||
android:id = "@+id/comment_detail_comment_rl"
|
||||
<ScrollView
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:paddingLeft = "18dp"
|
||||
android:paddingRight = "18dp"
|
||||
android:visibility = "gone" >
|
||||
|
||||
<EditText
|
||||
android:id = "@+id/comment_detail_comment_et"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:background = "@null"
|
||||
android:drawableBottom = "@drawable/et_line"
|
||||
android:drawablePadding = "6dp"
|
||||
android:hint = "@string/message_detail_comment_hint"
|
||||
android:paddingTop = "14dp"
|
||||
android:textColorHint = "@color/text_b2b2b2"
|
||||
android:textCursorDrawable = "@drawable/cursor_color"
|
||||
android:textSize = "14sp" />
|
||||
android:layout_height = "wrap_content" >
|
||||
|
||||
<RelativeLayout
|
||||
android:id = "@+id/comment_detail_user_rl"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "70dp"
|
||||
android:layout_below = "@+id/comment_detail_comment_et"
|
||||
android:visibility = "visible" >
|
||||
android:layout_height = "50dp"
|
||||
android:layout_below = "@id/comment_line"
|
||||
android:background = "@android:color/white" >
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id = "@+id/comment_user_icon"
|
||||
style = "@style/frescoStyle"
|
||||
android:layout_width = "45dp"
|
||||
android:layout_height = "45dp"
|
||||
android:layout_centerVertical = "true"
|
||||
android:layout_marginRight = "17dp"
|
||||
fresco:roundAsCircle = "true" />
|
||||
|
||||
<TextView
|
||||
android:id = "@+id/comment_user_name"
|
||||
<EditText
|
||||
android:id = "@+id/comment_et"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_centerInParent = "true"
|
||||
android:layout_toLeftOf = "@+id/comment_send"
|
||||
android:layout_toRightOf = "@+id/comment_user_icon"
|
||||
android:textColor = "@color/title"
|
||||
android:textSize = "15sp" />
|
||||
|
||||
<TextView
|
||||
android:id = "@+id/comment_send"
|
||||
android:layout_width = "60dp"
|
||||
android:layout_height = "28.5dp"
|
||||
android:layout_alignParentRight = "true"
|
||||
android:layout_centerVertical = "true"
|
||||
android:background = "@drawable/textview_comment_send_style"
|
||||
android:clickable = "true"
|
||||
android:gravity = "center"
|
||||
android:text = "@string/message_detail_send"
|
||||
android:textColor = "@android:color/white"
|
||||
android:layout_marginLeft = "20dp"
|
||||
android:layout_marginRight = "20dp"
|
||||
android:layout_toLeftOf = "@+id/comment_send_btn"
|
||||
android:background = "@android:color/transparent"
|
||||
android:drawablePadding = "4dp"
|
||||
android:hint = "请输入评论"
|
||||
android:textColor = "@color/black"
|
||||
android:textColorHint = "@color/theme"
|
||||
android:textCursorDrawable = "@drawable/cursor_color"
|
||||
android:textSize = "14sp" />
|
||||
|
||||
<Button
|
||||
android:id = "@+id/comment_send_btn"
|
||||
style = "?android:attr/borderlessButtonStyle"
|
||||
android:layout_width = "52dp"
|
||||
android:layout_height = "25dp"
|
||||
android:layout_alignParentRight = "true"
|
||||
android:layout_centerVertical = "true"
|
||||
android:layout_marginRight = "20dp"
|
||||
android:background = "@drawable/button_normal_style"
|
||||
android:text = "发送"
|
||||
android:textColor = "@android:color/white"
|
||||
android:textSize = "12sp" />
|
||||
</RelativeLayout >
|
||||
</RelativeLayout >
|
||||
</ScrollView >
|
||||
</ScrollView >
|
||||
</RelativeLayout >
|
||||
</RelativeLayout >
|
||||
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android = "http://schemas.android.com/apk/res/android"
|
||||
xmlns:fresco = "http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "match_parent" >
|
||||
|
||||
@ -8,14 +7,7 @@
|
||||
android:id = "@+id/message_detail_rv"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "match_parent"
|
||||
android:layout_marginBottom = "45dp" />
|
||||
|
||||
<View
|
||||
android:id = "@+id/message_detail_close_comment"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_above = "@+id/message_detail_sv"
|
||||
android:visibility = "gone" />
|
||||
android:layout_above = "@+id/comment_content_container" />
|
||||
|
||||
<include
|
||||
layout = "@layout/reuse_no_connection"
|
||||
@ -24,118 +16,59 @@
|
||||
android:layout_marginBottom = "45dp" />
|
||||
|
||||
<View
|
||||
android:id = "@+id/comment_line"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "7dp"
|
||||
android:layout_above = "@+id/message_detail_sv"
|
||||
android:background = "@drawable/shadow" />
|
||||
|
||||
<ScrollView
|
||||
android:id = "@+id/message_detail_sv"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_alignParentBottom = "true"
|
||||
android:background = "@android:color/white" >
|
||||
|
||||
<RelativeLayout
|
||||
android:id = "@+id/message_detail_comment_rl"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:paddingLeft = "18dp"
|
||||
android:paddingRight = "18dp"
|
||||
android:visibility = "gone" >
|
||||
|
||||
<EditText
|
||||
android:id = "@+id/message_detail_comment_et"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:background = "@null"
|
||||
android:drawableBottom = "@drawable/et_line"
|
||||
android:drawablePadding = "6dp"
|
||||
android:hint = "@string/message_detail_comment_hint"
|
||||
android:paddingTop = "14dp"
|
||||
android:textColorHint = "@color/text_b2b2b2"
|
||||
android:textCursorDrawable = "@drawable/cursor_color"
|
||||
android:textSize = "14sp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id = "@+id/message_detail_user_rl"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "70dp"
|
||||
android:layout_below = "@+id/message_detail_comment_et"
|
||||
android:visibility = "visible" >
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id = "@+id/comment_user_icon"
|
||||
style = "@style/frescoStyle"
|
||||
android:layout_width = "45dp"
|
||||
android:layout_height = "45dp"
|
||||
android:layout_centerVertical = "true"
|
||||
android:layout_marginRight = "17dp"
|
||||
fresco:roundAsCircle = "true" />
|
||||
|
||||
<TextView
|
||||
android:id = "@+id/comment_user_name"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_centerInParent = "true"
|
||||
android:layout_toLeftOf = "@+id/comment_send"
|
||||
android:layout_toRightOf = "@+id/comment_user_icon"
|
||||
android:textColor = "@color/title"
|
||||
android:textSize = "15sp" />
|
||||
|
||||
<TextView
|
||||
android:id = "@+id/comment_send"
|
||||
android:layout_width = "60dp"
|
||||
android:layout_height = "28.5dp"
|
||||
android:layout_alignParentRight = "true"
|
||||
android:layout_centerVertical = "true"
|
||||
android:background = "@drawable/textview_comment_send_style"
|
||||
android:clickable = "true"
|
||||
android:gravity = "center"
|
||||
android:text = "@string/message_detail_send"
|
||||
android:textColor = "@android:color/white"
|
||||
android:textSize = "14sp" />
|
||||
|
||||
</RelativeLayout >
|
||||
</RelativeLayout >
|
||||
</ScrollView >
|
||||
|
||||
<View
|
||||
android:id = "@+id/message_detail_hint_line"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "7dp"
|
||||
android:layout_above = "@+id/message_detail_comment_hint_rl"
|
||||
android:layout_above = "@+id/comment_content_container"
|
||||
android:background = "@drawable/shadow" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id = "@+id/message_detail_comment_hint_rl"
|
||||
android:id = "@+id/comment_content_container"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "44dp"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_alignParentBottom = "true"
|
||||
android:background = "@android:color/white" >
|
||||
android:background = "@android:color/transparent" >
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id = "@+id/message_detail_comment_hint_icon"
|
||||
android:layout_width = "wrap_content"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_centerVertical = "true"
|
||||
android:layout_marginLeft = "14dp"
|
||||
android:layout_marginRight = "10dp"
|
||||
android:paddingBottom = "14dp"
|
||||
android:paddingTop = "13dp"
|
||||
android:src = "@drawable/ic_edit_comment" />
|
||||
|
||||
<TextView
|
||||
android:id = "@+id/message_detail_comment_hint"
|
||||
<ScrollView
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_centerVertical = "true"
|
||||
android:layout_toRightOf = "@+id/message_detail_comment_hint_icon"
|
||||
android:drawablePadding = "13dp"
|
||||
android:paddingRight = "18dp"
|
||||
android:text = "@string/message_detail_send_hint"
|
||||
android:textColor = "@color/theme"
|
||||
android:visibility = "visible" />
|
||||
android:layout_height = "wrap_content" >
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "50dp"
|
||||
android:layout_below = "@id/comment_line"
|
||||
android:background = "@android:color/white" >
|
||||
|
||||
|
||||
<EditText
|
||||
android:id = "@+id/comment_et"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_centerVertical = "true"
|
||||
android:layout_marginLeft = "20dp"
|
||||
android:layout_marginRight = "20dp"
|
||||
android:layout_toLeftOf = "@+id/comment_send_btn"
|
||||
android:background = "@android:color/transparent"
|
||||
android:drawablePadding = "4dp"
|
||||
android:hint = "请输入评论"
|
||||
android:textColor = "@color/black"
|
||||
android:textColorHint = "@color/theme"
|
||||
android:textCursorDrawable = "@drawable/cursor_color"
|
||||
android:textSize = "14sp" />
|
||||
|
||||
<Button
|
||||
android:id = "@+id/comment_send_btn"
|
||||
style = "?android:attr/borderlessButtonStyle"
|
||||
android:layout_width = "52dp"
|
||||
android:layout_height = "25dp"
|
||||
android:layout_alignParentRight = "true"
|
||||
android:layout_centerVertical = "true"
|
||||
android:layout_marginRight = "20dp"
|
||||
android:background = "@drawable/button_normal_style"
|
||||
android:text = "发送"
|
||||
android:textColor = "@android:color/white"
|
||||
android:textSize = "12sp" />
|
||||
</RelativeLayout >
|
||||
</ScrollView >
|
||||
</RelativeLayout >
|
||||
</RelativeLayout >
|
||||
@ -26,15 +26,15 @@
|
||||
app:layout_scrollFlags = "scroll|enterAlwaysCollapsed" >
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width = "68dp"
|
||||
android:layout_width = "58dp"
|
||||
android:layout_height = "74dp"
|
||||
android:layout_marginRight = "11dp" >
|
||||
android:layout_marginRight = "12dp" >
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id = "@+id/gamedetail_iv_thumb"
|
||||
style = "@style/frescoStyle"
|
||||
android:layout_width = "60dp"
|
||||
android:layout_height = "60dp"
|
||||
android:layout_width = "50dp"
|
||||
android:layout_height = "50dp"
|
||||
android:layout_alignParentRight = "true"
|
||||
android:layout_centerVertical = "true"
|
||||
fresco:roundedCornerRadius = "10dp" />
|
||||
@ -66,8 +66,9 @@
|
||||
android:ellipsize = "end"
|
||||
android:includeFontPadding = "false"
|
||||
android:lineSpacingMultiplier = "1.2"
|
||||
android:textColor = "@color/title"
|
||||
android:textSize = "14sp" />
|
||||
android:textColor = "@color/black"
|
||||
android:textSize = "13sp"
|
||||
android:textStyle = "bold" />
|
||||
|
||||
<TextView
|
||||
android:id = "@+id/gamedetail_game_server_type"
|
||||
@ -90,15 +91,15 @@
|
||||
android:layout_width = "wrap_content"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_marginTop = "10dp"
|
||||
android:textColor = "@color/content"
|
||||
android:textColor = "@color/hint"
|
||||
android:textSize = "11sp" />
|
||||
|
||||
</LinearLayout >
|
||||
|
||||
<TextView
|
||||
android:id = "@+id/gamedetail_tv_concern"
|
||||
android:layout_width = "60dp"
|
||||
android:layout_height = "28.5dp"
|
||||
android:layout_width = "57dp"
|
||||
android:layout_height = "28dp"
|
||||
android:background = "@drawable/button_normal_style"
|
||||
android:gravity = "center"
|
||||
android:text = "@string/game_detail_favorite"
|
||||
|
||||
@ -5,14 +5,14 @@
|
||||
android:background = "@android:color/white"
|
||||
android:orientation = "vertical"
|
||||
android:paddingBottom = "3dp"
|
||||
android:paddingLeft = "18dp"
|
||||
android:paddingRight = "18dp"
|
||||
android:paddingTop = "12dp" >
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_marginBottom = "12dp" >
|
||||
android:layout_marginBottom = "12dp"
|
||||
android:paddingLeft = "18dp"
|
||||
android:paddingRight = "18dp" >
|
||||
|
||||
<TextView
|
||||
android:id = "@+id/gamedetail_item_news_title"
|
||||
@ -20,8 +20,9 @@
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_centerVertical = "true"
|
||||
android:text = "@string/news_info"
|
||||
android:textColor = "@color/text_3a3a3a"
|
||||
android:textSize = "15sp" />
|
||||
android:textColor = "@color/black"
|
||||
android:textSize = "15sp"
|
||||
android:textStyle = "bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:id = "@+id/gamedetail_item_news_more"
|
||||
@ -54,17 +55,19 @@
|
||||
android:id = "@+id/gamedetail_item_line_news1"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "1dp"
|
||||
android:layout_marginLeft = "18dp"
|
||||
android:layout_marginRight = "18dp"
|
||||
android:background = "@color/cutting_line"
|
||||
android:visibility = "visible" />
|
||||
|
||||
<LinearLayout
|
||||
android:id = "@+id/gamedetail_item_news1"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_height = "40dp"
|
||||
android:background = "@drawable/reuse_listview_item_style"
|
||||
android:gravity = "center_vertical"
|
||||
android:paddingBottom = "12dp"
|
||||
android:paddingTop = "12dp"
|
||||
android:paddingLeft = "18dp"
|
||||
android:paddingRight = "18dp"
|
||||
android:visibility = "visible" >
|
||||
|
||||
<TextView
|
||||
@ -85,25 +88,27 @@
|
||||
android:layout_marginLeft = "8dp"
|
||||
android:ellipsize = "end"
|
||||
android:singleLine = "true"
|
||||
android:textColor = "@color/title"
|
||||
android:textSize = "14sp" />
|
||||
android:textColor = "@color/text_3a3a3a"
|
||||
android:textSize = "12sp" />
|
||||
</LinearLayout >
|
||||
|
||||
<View
|
||||
android:id = "@+id/gamedetail_item_line_news2"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "1dp"
|
||||
android:layout_marginLeft = "18dp"
|
||||
android:layout_marginRight = "18dp"
|
||||
android:background = "@color/cutting_line"
|
||||
android:visibility = "gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:id = "@+id/gamedetail_item_news2"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_height = "40dp"
|
||||
android:background = "@drawable/reuse_listview_item_style"
|
||||
android:gravity = "center_vertical"
|
||||
android:paddingBottom = "12dp"
|
||||
android:paddingTop = "12dp"
|
||||
android:paddingLeft = "18dp"
|
||||
android:paddingRight = "18dp"
|
||||
android:visibility = "gone" >
|
||||
|
||||
<TextView
|
||||
@ -124,25 +129,27 @@
|
||||
android:layout_marginLeft = "8dp"
|
||||
android:ellipsize = "end"
|
||||
android:singleLine = "true"
|
||||
android:textColor = "@color/title"
|
||||
android:textSize = "14sp" />
|
||||
android:textColor = "@color/text_3a3a3a"
|
||||
android:textSize = "12sp" />
|
||||
</LinearLayout >
|
||||
|
||||
<View
|
||||
android:id = "@+id/gamedetail_item_line_news3"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "1dp"
|
||||
android:layout_marginLeft = "18dp"
|
||||
android:layout_marginRight = "18dp"
|
||||
android:background = "@color/cutting_line"
|
||||
android:visibility = "gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:id = "@+id/gamedetail_item_news3"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_height = "40dp"
|
||||
android:background = "@drawable/reuse_listview_item_style"
|
||||
android:gravity = "center_vertical"
|
||||
android:paddingBottom = "12dp"
|
||||
android:paddingTop = "12dp"
|
||||
android:paddingLeft = "18dp"
|
||||
android:paddingRight = "18dp"
|
||||
android:visibility = "gone" >
|
||||
|
||||
<TextView
|
||||
@ -163,7 +170,7 @@
|
||||
android:layout_marginLeft = "8dp"
|
||||
android:ellipsize = "end"
|
||||
android:singleLine = "true"
|
||||
android:textColor = "@color/title"
|
||||
android:textSize = "14sp" />
|
||||
android:textColor = "@color/text_3a3a3a"
|
||||
android:textSize = "12sp" />
|
||||
</LinearLayout >
|
||||
</LinearLayout >
|
||||
@ -1,21 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android = "http://schemas.android.com/apk/res/android"
|
||||
xmlns:fresco = "http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:background = "@android:color/white"
|
||||
android:gravity = "center_vertical"
|
||||
android:orientation = "horizontal"
|
||||
android:paddingBottom = "15dp"
|
||||
android:paddingBottom = "3dp"
|
||||
android:paddingLeft = "18dp"
|
||||
android:paddingRight = "18dp"
|
||||
android:paddingTop = "15dp" >
|
||||
android:paddingTop = "3dp" >
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id = "@+id/gamedetail_iv_thumb"
|
||||
style = "@style/frescoStyle"
|
||||
android:layout_width = "60dp"
|
||||
android:layout_height = "60dp"
|
||||
android:layout_marginRight = "11dp" />
|
||||
<RelativeLayout
|
||||
android:layout_width = "58dp"
|
||||
android:layout_height = "74dp"
|
||||
android:layout_marginRight = "12dp" >
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id = "@+id/game_iv_thumb"
|
||||
style = "@style/frescoStyle"
|
||||
android:layout_width = "50dp"
|
||||
android:layout_height = "50dp"
|
||||
android:layout_alignParentRight = "true"
|
||||
android:layout_centerVertical = "true"
|
||||
fresco:roundedCornerRadius = "10dp" />
|
||||
|
||||
<ImageView
|
||||
android:id = "@+id/game_iv_libao"
|
||||
android:layout_width = "25dp"
|
||||
android:layout_height = "25dp"
|
||||
android:src = "@drawable/game_libao_icon"
|
||||
android:visibility = "gone" />
|
||||
|
||||
</RelativeLayout >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width = "0dp"
|
||||
@ -23,37 +40,55 @@
|
||||
android:layout_marginRight = "16dp"
|
||||
android:layout_weight = "1"
|
||||
android:orientation = "vertical" >
|
||||
<RelativeLayout
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content" >
|
||||
|
||||
<TextView
|
||||
android:id = "@+id/game_tv_name"
|
||||
android:layout_width = "match_parent"
|
||||
android:layout_height = "wrap_content"
|
||||
android:ellipsize = "end"
|
||||
android:includeFontPadding = "false"
|
||||
android:lineSpacingMultiplier = "1.2"
|
||||
android:textColor = "@color/black"
|
||||
android:textSize = "13sp"
|
||||
android:textStyle = "bold" />
|
||||
|
||||
<TextView
|
||||
android:id = "@+id/game_server_type"
|
||||
android:layout_width = "wrap_content"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_alignBottom = "@id/game_tv_name"
|
||||
android:layout_centerVertical = "true"
|
||||
android:layout_marginBottom = "2dp"
|
||||
android:maxLines = "1"
|
||||
android:paddingBottom = "0.5dp"
|
||||
android:paddingLeft = "3dp"
|
||||
android:paddingRight = "3dp"
|
||||
android:textColor = "@android:color/white"
|
||||
android:textSize = "9sp"
|
||||
android:visibility = "gone" />
|
||||
</RelativeLayout >
|
||||
|
||||
<TextView
|
||||
android:id = "@+id/gamedetail_tv_name"
|
||||
android:id = "@+id/game_tv_info"
|
||||
android:layout_width = "wrap_content"
|
||||
android:layout_height = "wrap_content"
|
||||
android:ellipsize = "end"
|
||||
android:includeFontPadding = "false"
|
||||
android:lineSpacingMultiplier = "0.9"
|
||||
android:singleLine = "true"
|
||||
android:text = "@string/string_description"
|
||||
android:textColor = "@color/title"
|
||||
android:textSize = "16sp" />
|
||||
|
||||
<TextView
|
||||
android:id = "@+id/gamedetail_tv_info"
|
||||
android:layout_width = "wrap_content"
|
||||
android:layout_height = "wrap_content"
|
||||
android:layout_marginTop = "10dp"
|
||||
android:textColor = "@color/content"
|
||||
android:layout_marginTop = "13dp"
|
||||
android:textColor = "@color/hint"
|
||||
android:textSize = "11sp" />
|
||||
|
||||
</LinearLayout >
|
||||
|
||||
<TextView
|
||||
android:id = "@+id/gamedetail_tv_concern"
|
||||
android:layout_width = "60dp"
|
||||
android:layout_height = "28.5dp"
|
||||
android:id = "@+id/game_tv_concern"
|
||||
android:layout_width = "57dp"
|
||||
android:layout_height = "28dp"
|
||||
android:background = "@drawable/textview_blue_style"
|
||||
android:gravity = "center"
|
||||
android:text = "@string/game_detail_concern"
|
||||
android:textColor = "@android:color/white"
|
||||
android:textSize = "14sp" />
|
||||
android:textSize = "13sp" />
|
||||
|
||||
</LinearLayout >
|
||||
@ -115,7 +115,7 @@
|
||||
<string name = "main_game" >游戏</string >
|
||||
<string name = "main_info" >资讯</string >
|
||||
<string name = "main_personal" >我的光环</string >
|
||||
<string name = "message_detail_comment_hint" >优质评论会被优先展示</string >
|
||||
<string name = "message_detail_comment_hint" >请输入评论</string >
|
||||
<string name = "message_detail_send" >发送</string >
|
||||
<string name = "message_detail_send_hint" >发表评论...</string >
|
||||
<string name = "news_detail_send_comment" >发表评论...</string >
|
||||
|
||||
Reference in New Issue
Block a user