个人主页动态UI修改
This commit is contained in:
@@ -57,9 +57,13 @@ public class UserInfoDynamicAdapter extends BaseQuickAdapter<WorldDynamicBean, B
|
||||
|
||||
private int iconHeight;
|
||||
|
||||
/**有文本的图片布局的top-margin*/
|
||||
/**
|
||||
* 有文本的图片布局的top-margin
|
||||
*/
|
||||
private int imageTmHasText;
|
||||
/**无文本的图片布局的top-margin*/
|
||||
/**
|
||||
* 无文本的图片布局的top-margin
|
||||
*/
|
||||
private int imageTmNoText;
|
||||
|
||||
/**
|
||||
@@ -76,7 +80,7 @@ public class UserInfoDynamicAdapter extends BaseQuickAdapter<WorldDynamicBean, B
|
||||
*/
|
||||
private int mIdentityState;
|
||||
|
||||
public UserInfoDynamicAdapter(Context context,int identityState) {
|
||||
public UserInfoDynamicAdapter(Context context, int identityState) {
|
||||
super(R.layout.item_userinfo_dynamic);
|
||||
this.context = context;
|
||||
this.mIdentityState = identityState;
|
||||
@@ -118,7 +122,7 @@ public class UserInfoDynamicAdapter extends BaseQuickAdapter<WorldDynamicBean, B
|
||||
}
|
||||
|
||||
helper.setGone(R.id.layout_root_mini_world, item.getTag() != null);
|
||||
helper.setText(R.id.tv_mini_world_name,"#" + item.getTag());
|
||||
helper.setText(R.id.tv_mini_world_name, "#" + item.getTag());
|
||||
|
||||
//评论
|
||||
setCommentCount(helper, item.getCommentCount());
|
||||
@@ -130,7 +134,7 @@ public class UserInfoDynamicAdapter extends BaseQuickAdapter<WorldDynamicBean, B
|
||||
llLike.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (item.getDynamicId() == 0){
|
||||
if (item.getDynamicId() == 0) {
|
||||
return;
|
||||
}
|
||||
llLike.setEnabled(false);
|
||||
@@ -160,9 +164,9 @@ public class UserInfoDynamicAdapter extends BaseQuickAdapter<WorldDynamicBean, B
|
||||
});
|
||||
//评论
|
||||
helper.getView(R.id.ll_comment).setOnClickListener(v -> {
|
||||
if (item.getDynamicId() == 0){
|
||||
return;
|
||||
}
|
||||
if (item.getDynamicId() == 0) {
|
||||
return;
|
||||
}
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_WORLD_COMMENT_MOMENTS,
|
||||
"点击列表评论按钮-区分-话题客态页");
|
||||
//1.3.1新埋点
|
||||
@@ -173,12 +177,12 @@ public class UserInfoDynamicAdapter extends BaseQuickAdapter<WorldDynamicBean, B
|
||||
}
|
||||
);
|
||||
|
||||
if (item.getDynamicId() != 0){
|
||||
if (item.getDynamicId() != 0) {
|
||||
helper.addOnClickListener(R.id.iv_more).addOnClickListener(R.id.ll_share);
|
||||
}
|
||||
|
||||
View.OnClickListener toDetailListener = v -> {
|
||||
if (item.getDynamicId() == 0){
|
||||
if (item.getDynamicId() == 0) {
|
||||
return;
|
||||
}
|
||||
DynamicDetailActivity.start(context, item.getDynamicId(), worldId,
|
||||
@@ -190,7 +194,7 @@ public class UserInfoDynamicAdapter extends BaseQuickAdapter<WorldDynamicBean, B
|
||||
}
|
||||
//跳转去详情
|
||||
helper.itemView.setOnClickListener(toDetailListener);
|
||||
|
||||
helper.setGone(R.id.line_bottom, getItemCount() != helper.getLayoutPosition());
|
||||
|
||||
}
|
||||
|
||||
@@ -215,7 +219,7 @@ public class UserInfoDynamicAdapter extends BaseQuickAdapter<WorldDynamicBean, B
|
||||
// drawable.stop();
|
||||
// drawable.start();
|
||||
// } else {
|
||||
ivLikeAnim.setImageResource(R.drawable.icon_dy_list_like);
|
||||
ivLikeAnim.setImageResource(R.drawable.icon_dy_list_like);
|
||||
// }
|
||||
} else {
|
||||
ivLikeAnim.setImageResource(R.drawable.icon_dy_list_like_false);
|
||||
|
@@ -449,13 +449,16 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_13"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_marginBottom="@dimen/dp_50"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingTop="1dp"
|
||||
android:paddingEnd="2dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:background="@drawable/bg_corner_shadow_12"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/dp_15"
|
||||
android:paddingBottom="@dimen/dp_15">
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
@@ -470,11 +473,7 @@
|
||||
android:id="@+id/rv_dynamic"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingTop="1dp"
|
||||
android:paddingEnd="2dp"
|
||||
android:paddingBottom="5dp" />
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:topLeftRadius="@dimen/dp_20"
|
||||
android:bottomLeftRadius="@dimen/dp_20"
|
||||
android:topRightRadius="@dimen/dp_8"
|
||||
android:topRightRadius="@dimen/dp_4"
|
||||
android:bottomRightRadius="@dimen/dp_18"/>
|
||||
<solid android:color="@color/color_EFEBFF" />
|
||||
</shape>
|
@@ -13,6 +13,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:textColor="@color/color_999999"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -24,7 +25,7 @@
|
||||
android:id="@+id/etv_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:orientation="vertical"
|
||||
app:animAlphaStart="1"
|
||||
app:collapseIndicator="@string/collapse"
|
||||
@@ -66,23 +67,23 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintTop_toBottomOf="@id/etv_content">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
|
||||
/>
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_root_mini_world"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginBottom="16.5dp"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
@@ -92,7 +93,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_miniworld"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@drawable/bg_dynamic_topic"
|
||||
android:orientation="horizontal"
|
||||
@@ -108,7 +109,6 @@
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingEnd="0dp"
|
||||
android:maxWidth="150dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_7154EE"
|
||||
@@ -123,8 +123,9 @@
|
||||
android:id="@+id/rl_option"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_11"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -163,8 +164,7 @@
|
||||
android:layout_width="66dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_toEndOf="@id/ll_like"
|
||||
android:orientation="horizontal"
|
||||
android:paddingEnd="0dp">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_comment_pic"
|
||||
@@ -215,10 +215,11 @@
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/line_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="9.5dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="@color/line_color"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
Reference in New Issue
Block a user