UI 调整,部分显示细节需要等待接口返回 http://gitlab.ghzhushou.com/pm/halo-app-issues/issues/338

This commit is contained in:
chenjuntao
2018-09-13 10:25:04 +08:00
parent cb891bc063
commit caa9dd4db4
14 changed files with 30 additions and 10 deletions

View File

@ -33,6 +33,8 @@ public class CommentViewHolder extends BaseRecyclerViewHolder {
public TextView commentUserNameTv;
@BindView(R.id.comment_line_bottom)
public View commentLineBottom;
@BindView(R.id.comment_badge)
public View commentBadge;
public CommentViewHolder(View itemView) {
super(itemView);

View File

@ -88,6 +88,9 @@ public class AnswerCommentAdapter extends ListAdapter<CommentEntity> {
holder.itemView.setOnClickListener(v -> CommentUtils.showAnswerCommentOptions(commentEntity, mContext, mOnCommentCallBackListener, null, !mIsShowingConversation, mAnswerId));
holder.commentUserIconDv.setOnClickListener(v -> PersonalHomeActivity.startTargetActivity(mContext, commentEntity.getUser().getId(),"回答详情-评论管理"));
holder.commentUserNameTv.setOnClickListener(v -> PersonalHomeActivity.startTargetActivity(mContext, commentEntity.getUser().getId(), "回答详情-评论管理"));
// TODO 根据字段判断是否需要显示指定标记
holder.commentBadge.setVisibility(View.VISIBLE);
}
private void initFooterViewHolder(FooterViewHolder holder) {

View File

@ -141,7 +141,7 @@ public class AnswerCommentFragment extends ListFragment<CommentEntity, AnswerCom
DisplayMetrics displayMetrics = new DisplayMetrics();
((Activity) getContext()).getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
mCommentContainer.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, displayMetrics.heightPixels / 2));
mCommentContainer.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, displayMetrics.heightPixels * 2 / 3 ));
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 658 B

After

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 550 B

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 550 B

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 991 B

After

Width:  |  Height:  |  Size: 1018 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 658 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -34,11 +34,12 @@
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/comment_user_icon"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_width="30dp"
android:layout_height="30dp"
fresco:placeholderImage="@drawable/user_default_icon_comment"
fresco:placeholderImageScaleType="fitXY"
fresco:roundAsCircle="true" />
fresco:roundAsCircle="true"
tools:src="@drawable/ic_discover_select" />
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/comment_user_badge"
@ -59,12 +60,27 @@
<TextView
android:id="@+id/comment_user_name"
android:layout_width="match_parent"
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"

View File

@ -7,7 +7,7 @@
<RelativeLayout
android:id="@+id/answer_comment_container"
android:layout_width="match_parent"
android:layout_height="320dp"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical">

View File

@ -33,13 +33,12 @@
android:layout_width = "match_parent"
android:layout_height = "wrap_content"
android:background = "@android:color/transparent"
android:drawableBottom = "@drawable/et_line"
android:hint = "请输入评论"
android:drawablePadding="4dp"
android:textColor = "@color/black"
android:textColorHint = "#b3b3b3"
android:textColorHint = "@color/theme"
android:textCursorDrawable = "@drawable/cursor_color"
android:textSize = "13sp" />
android:textSize = "14sp" />
</ScrollView >
<Button

View File

@ -3,7 +3,7 @@ ext {
buildToolsVersion = "27.0.3"
compileSdkVersion = 27
minSdkVersion = 14
// TODO fix permission/ target 23 will cause permission issues
targetSdkVersion = 27
// application info