动态话题主页UI修改
This commit is contained in:
@@ -3,13 +3,16 @@ package com.yizhuan.erban.home.fragment;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.netease.nim.uikit.StatusBarUtil;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseMvpActivity;
|
||||
import com.yizhuan.erban.base.TitleBar;
|
||||
@@ -51,53 +54,35 @@ public class CommunityNoticeAct extends BaseMvpActivity<ICommunityNoticeAct, Com
|
||||
|
||||
setContentView(R.layout.act_community_notice);
|
||||
mUnbinder = ButterKnife.bind(this);
|
||||
initTitleBar("全部消息", new TitleBar.TextAction("清空",R.drawable.ic_message_trash) {
|
||||
initWhiteTitleBar("全部消息");
|
||||
mTitleBar.addAction(new TitleBar.TextAction("清空", getResources().getColor(R.color.color_c6c6e9)) {
|
||||
@Override
|
||||
public void performAction(View view) {
|
||||
getDialogManager().showOkCancelWithTitleDialog("清空后所有互动通知将被删除\n确定清空吗?", "确定",
|
||||
new DialogManager.OkCancelDialogListener() {
|
||||
@Override
|
||||
public void onOk() {
|
||||
getMvpPresenter().delete(AuthModel.get().getCurrentUid());
|
||||
}
|
||||
});
|
||||
() -> getMvpPresenter().delete(AuthModel.get().getCurrentUid()));
|
||||
}
|
||||
});
|
||||
|
||||
swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
getMvpPresenter().refresh(AuthModel.get().getCurrentUid());
|
||||
}
|
||||
});
|
||||
swipeRefreshLayout.setOnRefreshListener(() -> getMvpPresenter().refresh(AuthModel.get().getCurrentUid()));
|
||||
|
||||
mCommunityNoticeAdapter = new CommunityNoticeAdapter();
|
||||
mCommunityNoticeAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
|
||||
@Override
|
||||
public void onLoadMoreRequested() {
|
||||
getMvpPresenter().loadMore(AuthModel.get().getCurrentUid());
|
||||
mCommunityNoticeAdapter.setOnLoadMoreListener(() -> getMvpPresenter().loadMore(AuthModel.get().getCurrentUid()), recyclerView);
|
||||
mCommunityNoticeAdapter.setOnItemChildClickListener((adapter, view, position) -> {
|
||||
List<CommunityNoticeInfo> list = adapter.getData();
|
||||
if (list.size() > 0 && position < list.size()) {
|
||||
CommunityNoticeInfo info = list.get(position);
|
||||
|
||||
}
|
||||
}, recyclerView);
|
||||
mCommunityNoticeAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
|
||||
@Override
|
||||
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
||||
List<CommunityNoticeInfo> list = adapter.getData();
|
||||
if (list.size() > 0 && position < list.size()) {
|
||||
CommunityNoticeInfo info = list.get(position);
|
||||
|
||||
if (info != null) {
|
||||
switch (view.getId()) {
|
||||
case R.id.cl_community_notice_list:
|
||||
DynamicDetailActivity.start(CommunityNoticeAct.this, info.getDynamicId(), info.getWorldId(), 4);
|
||||
break;
|
||||
|
||||
case R.id.civ_avatar_community_notice_list:
|
||||
UserInfoActivity.Companion.start(context, info.getUid());
|
||||
break;
|
||||
}
|
||||
if (info != null) {
|
||||
switch (view.getId()) {
|
||||
case R.id.cl_community_notice_list:
|
||||
DynamicDetailActivity.start(CommunityNoticeAct.this, info.getDynamicId(), info.getWorldId(), 4);
|
||||
break;
|
||||
|
||||
case R.id.civ_avatar_community_notice_list:
|
||||
UserInfoActivity.Companion.start(context, info.getUid());
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -161,12 +146,9 @@ public class CommunityNoticeAct extends BaseMvpActivity<ICommunityNoticeAct, Com
|
||||
|
||||
@Override
|
||||
public View.OnClickListener getLoadListener() {
|
||||
return new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showLoading();
|
||||
getMvpPresenter().refresh(AuthModel.get().getCurrentUid());
|
||||
}
|
||||
return v -> {
|
||||
showLoading();
|
||||
getMvpPresenter().refresh(AuthModel.get().getCurrentUid());
|
||||
};
|
||||
}
|
||||
|
||||
@@ -185,4 +167,15 @@ public class CommunityNoticeAct extends BaseMvpActivity<ICommunityNoticeAct, Com
|
||||
public void clearFail(String error) {
|
||||
toast(error);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean needSteepStateBar() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setStatusBar() {
|
||||
super.setStatusBar();
|
||||
StatusBarUtil.transparencyBar(this);
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#EAE5FC" />
|
||||
<corners android:radius="19dp" />
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#ffbcddff"
|
||||
android:startColor="#ffd6bef7"
|
||||
android:type="linear"
|
||||
android:useLevel="true" />
|
||||
</shape>
|
@@ -4,8 +4,10 @@
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:startColor="#735FFE"
|
||||
android:endColor="#8776FF"/>
|
||||
<corners android:radius="19dp"/>
|
||||
android:endColor="#ff218eff"
|
||||
android:startColor="#ff7727e4"
|
||||
android:type="linear"
|
||||
android:useLevel="true" />
|
||||
<corners android:radius="19dp" />
|
||||
|
||||
</shape>
|
@@ -4,8 +4,10 @@
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:startColor="#6755E4"
|
||||
android:endColor="#796AE5"/>
|
||||
android:endColor="#197FEA"
|
||||
android:startColor="#701CE1"
|
||||
android:type="linear"
|
||||
android:useLevel="true" />
|
||||
<corners android:radius="19dp"/>
|
||||
|
||||
|
||||
|
@@ -2,8 +2,8 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:startColor="#735FFE"
|
||||
android:endColor="#8776FF"
|
||||
android:startColor="#7727E4"
|
||||
android:endColor="#218EFF"
|
||||
/>
|
||||
|
||||
|
||||
|
@@ -2,19 +2,20 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_1c1b22"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<com.yizhuan.erban.base.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_25"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<com.yizhuan.erban.common.widget.StatusLayout
|
||||
android:id="@+id/status_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@color/white"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_bar"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
|
@@ -8,10 +8,10 @@
|
||||
<TextView
|
||||
android:id="@+id/btn_cancel"
|
||||
android:layout_width="105dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_height="35dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/cancel"
|
||||
android:textColor="@color/color_7154EE"
|
||||
android:textColor="@color/color_4C5AF1"
|
||||
android:layout_marginEnd="@dimen/dp_18"
|
||||
android:background="@drawable/bg_common_cancel"
|
||||
android:textSize="15sp" />
|
||||
@@ -19,7 +19,7 @@
|
||||
<TextView
|
||||
android:id="@+id/btn_ok"
|
||||
android:layout_width="105dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_height="35dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/text_ok"
|
||||
android:textColor="@color/white"
|
||||
|
@@ -38,7 +38,7 @@
|
||||
android:layout_marginStart="39dp"
|
||||
android:layout_marginEnd="39dp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="13sp"
|
||||
android:textSize="15sp"
|
||||
android:layout_marginBottom="@dimen/dp_32"
|
||||
android:gravity="center_horizontal"
|
||||
tools:text="购买成功,是否立即驾驶sd水电费水电费?sfasdfasdfasdfasdfasdf" />
|
||||
|
@@ -554,4 +554,5 @@
|
||||
<color name="color_c6c6e9">#c6c6e9</color>
|
||||
<color name="color_4F516A">#4F516A</color>
|
||||
<color name="color_353548">#353548</color>
|
||||
<color name="color_4C5AF1">#4C5AF1</color>
|
||||
</resources>
|
||||
|
@@ -123,9 +123,6 @@ public class WorldDynamicAdapter extends BaseQuickAdapter<WorldDynamicBean, Base
|
||||
|
||||
DynamicNickDetailWidget widget = helper.getView(R.id.widget_nick_detail);
|
||||
widget.setData(item);
|
||||
widget.setNickColor(ContextCompat.getColor(context,R.color.color_333333));
|
||||
widget.setTimeColor(ContextCompat.getColor(context,R.color.color_999999));
|
||||
|
||||
View inOfficialMask = helper.getView(R.id.in_official_mask);
|
||||
if (!TextUtils.isEmpty(item.getNameplateWord()) && !TextUtils.isEmpty(item.getNameplatePic())) {
|
||||
inOfficialMask.setVisibility(View.VISIBLE);
|
||||
|
@@ -3,7 +3,6 @@
|
||||
android:id="@+id/cl_community_notice_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
@@ -56,7 +55,7 @@
|
||||
android:id="@+id/tv_name_community_notice_list"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:maxLines="1"
|
||||
android:maxEms="6"
|
||||
@@ -72,13 +71,12 @@
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_label_community_notice_list"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textColor="@color/color_4F516A"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:text="评论了你"
|
||||
android:visibility="gone"
|
||||
@@ -92,7 +90,7 @@
|
||||
android:maxLines="6"
|
||||
android:ellipsize="end"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textColor="@color/color_c6c6e9"
|
||||
android:layout_marginTop="8dp"
|
||||
tools:text="啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦"/>
|
||||
|
||||
@@ -103,7 +101,7 @@
|
||||
android:maxLines="6"
|
||||
android:ellipsize="end"
|
||||
android:textSize="@dimen/sp_11"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textColor="@color/color_4F516A"
|
||||
android:layout_marginTop="10.5dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
tools:text="2-30 12:22"/>
|
||||
@@ -113,7 +111,7 @@
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1px"
|
||||
android:background="@color/color_F4F4F4"
|
||||
android:background="@color/color_353548"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="15.5dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@@ -4,26 +4,26 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
|
||||
android:background="@drawable/bg_corner_shadow_12"
|
||||
tools:background="@color/color_1c1b22"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_top_line"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:background="#201F27"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_user_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="59dp"
|
||||
android:layout_marginTop="@dimen/dp_13"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
android:layout_height="60dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_top_line">
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_head_wear"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_head_wear"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_head_wear"
|
||||
@@ -31,57 +31,55 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_head_wear"
|
||||
android:layout_width="59dp"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.yizhuan.erban.community.widget.DynamicNickDetailWidget
|
||||
android:id="@+id/widget_nick_detail"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_head_wear"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_7"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="@dimen/dp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@id/widget_nick_detail"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:text="刚刚" />
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_avatar"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_head_wear"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/view_avatar_right"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="56dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/cl_user_info"
|
||||
app:layout_constraintStart_toStartOf="@id/cl_user_info"
|
||||
app:layout_constraintTop_toBottomOf="@id/cl_user_info" />
|
||||
|
||||
<com.yizhuan.erban.community.widget.ExpandableTextView
|
||||
android:id="@+id/etv_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:orientation="vertical"
|
||||
app:animAlphaStart="1"
|
||||
app:collapseIndicator="@string/collapse"
|
||||
app:expandIndicator="@string/expand"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
app:expandToggleOnTextClick="false"
|
||||
app:expandToggleType="TextView"
|
||||
app:layout_constraintTop_toBottomOf="@id/cl_user_info"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/view_avatar_right"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_avatar_right"
|
||||
app:maxCollapsedLines="6">
|
||||
|
||||
<com.netease.nim.uikit.business.session.widget.NimEmojiTextView
|
||||
android:id="@+id/expandable_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textColor="@color/color_c6c6e9"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<LinearLayout
|
||||
@@ -101,115 +99,80 @@
|
||||
|
||||
</com.yizhuan.erban.community.widget.ExpandableTextView>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_image"
|
||||
android:layout_width="match_parent"
|
||||
<com.yizhuan.erban.community.widget.GridImageWidget
|
||||
android:id="@+id/widget_image"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
app:layout_constraintTop_toBottomOf="@id/etv_content">
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/view_avatar_right"
|
||||
app:layout_constraintTop_toBottomOf="@id/etv_content"
|
||||
tools:layout_height="100dp" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
/>
|
||||
</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:orientation="horizontal"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
app:layout_constraintTop_toBottomOf="@id/fl_image"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_miniworld"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@drawable/bg_dynamic_topic"
|
||||
android:orientation="horizontal"
|
||||
android:paddingEnd="@dimen/dp_11"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mini_world_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
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"
|
||||
android:textSize="@dimen/sp_12"
|
||||
tools:text="话题名称话题名称话题名称" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<ImageView
|
||||
android:id="@+id/iv_in_room"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:src="@drawable/ic_dy_square_in_room"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/view_avatar_right"
|
||||
app:layout_constraintTop_toBottomOf="@id/widget_image"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_option"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_root_mini_world"
|
||||
>
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/view_avatar_right"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_in_room">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_like"
|
||||
android:layout_width="66dp"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_like_pic"
|
||||
android:layout_width="@dimen/dp_22"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/icon_dy_list_like_false"
|
||||
android:scaleType="centerInside" />
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_dy_list_like_false" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_like"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_marginStart="6.5dp"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_marginStart="2.5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textColor="@color/color_c6c6e9"
|
||||
android:textSize="@dimen/sp_12"
|
||||
tools:text="0" />
|
||||
tools:text="0123" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_comment"
|
||||
android:layout_width="66dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@id/ll_like"
|
||||
android:orientation="horizontal"
|
||||
android:paddingEnd="0dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_comment_pic"
|
||||
android:layout_width="@dimen/dp_22"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_dy_list_comment" />
|
||||
@@ -217,10 +180,10 @@
|
||||
<TextView
|
||||
android:id="@+id/tv_comment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_marginStart="6.5dp"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_marginStart="2.5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textColor="@color/color_c6c6e9"
|
||||
android:textSize="@dimen/sp_12"
|
||||
tools:text="0" />
|
||||
</LinearLayout>
|
||||
@@ -228,30 +191,52 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_share"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toEndOf="@id/ll_comment"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingStart="@dimen/dp_5"
|
||||
android:paddingEnd="0dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_22"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_dy_list_share"
|
||||
/>
|
||||
android:src="@drawable/icon_dy_list_share" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_more"
|
||||
<TextView
|
||||
android:id="@+id/tv_mini_world_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="@dimen/dp_6"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_dy_item_more"
|
||||
android:layout_height="24dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
tools:visibility="visible" />
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/shape_bg_mini_world_name"
|
||||
android:drawablePadding="6.5dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxWidth="150dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold"
|
||||
tools:text="话题名称话题名称话题名称话题名称话题名称话题名称" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:padding="@dimen/dp_6"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/icon_dy_item_more"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/cl_user_info"
|
||||
tools:visibility="visible" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -4,31 +4,31 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.NonNull;
|
||||
import com.google.android.material.appbar.AppBarLayout;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
import android.text.SpannableString;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextUtils;
|
||||
import android.text.style.StyleSpan;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.google.android.material.appbar.AppBarLayout;
|
||||
import com.google.android.material.appbar.CollapsingToolbarLayout;
|
||||
import com.netease.nim.uikit.StatusBarUtil;
|
||||
import com.trello.rxlifecycle3.android.ActivityEvent;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.UIHelper;
|
||||
import com.yizhuan.erban.base.BaseMvpActivity;
|
||||
import com.yizhuan.erban.base.TitleBar;
|
||||
import com.yizhuan.erban.community.dynamic.view.WorldDynamicFragment;
|
||||
import com.yizhuan.erban.community.publish.view.PublishActivity;
|
||||
import com.yizhuan.erban.friend.view.SelectFriendActivity;
|
||||
@@ -43,7 +43,6 @@ import com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator;
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.ViewPagerHelper;
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.UIUtil;
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator;
|
||||
import com.yizhuan.erban.utils.AppBarStateChangeListener;
|
||||
import com.yizhuan.xchat_android_constants.XChatConstants;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.home.bean.TabInfo;
|
||||
@@ -63,10 +62,7 @@ import com.yizhuan.xchat_android_core.utils.net.DontWarnObserver;
|
||||
import com.yizhuan.xchat_android_library.base.factory.CreatePresenter;
|
||||
import com.yizhuan.xchat_android_library.utils.JavaUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.SizeUtils;
|
||||
import com.zyyoona7.lib.EasyPopup;
|
||||
import com.zyyoona7.lib.HorizontalGravity;
|
||||
import com.zyyoona7.lib.VerticalGravity;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
@@ -96,16 +92,12 @@ public class TopicMainActivity extends BaseMvpActivity<IMiniWorldGuestPage, Mini
|
||||
ViewGroup layoutPage;
|
||||
@BindView(R.id.abl_mw_info)
|
||||
AppBarLayout ablMWInfo;
|
||||
|
||||
@BindView(R.id.tv_world_nick)
|
||||
TextView tvWorldNick;// 世界昵称
|
||||
@BindView(R.id.collapsing_toolbar)
|
||||
CollapsingToolbarLayout collapsingToolbarLayout;
|
||||
|
||||
@BindView(R.id.tv_world_description)
|
||||
TextView tvWorldDescription;// 世界描述
|
||||
|
||||
@BindView(R.id.layout_world_have_data)
|
||||
LinearLayout layoutWorldHaveData;// 显示隐藏
|
||||
|
||||
@BindView(R.id.mi_mini_world)
|
||||
MagicIndicator miMiniWorld;
|
||||
@BindView(R.id.vp_mini_world)
|
||||
@@ -114,6 +106,9 @@ public class TopicMainActivity extends BaseMvpActivity<IMiniWorldGuestPage, Mini
|
||||
@BindView(R.id.fl_iv_publish)
|
||||
FrameLayout flPublish;
|
||||
|
||||
@BindView(R.id.iv_back)
|
||||
View ivBack;
|
||||
|
||||
private EasyPopup easyPopup;// 点击更多弹窗
|
||||
|
||||
private String worldId;
|
||||
@@ -121,8 +116,6 @@ public class TopicMainActivity extends BaseMvpActivity<IMiniWorldGuestPage, Mini
|
||||
private boolean isFromRoom;
|
||||
|
||||
|
||||
|
||||
|
||||
public static void start(Context context, @NonNull String worldId) {
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_WORLD_VIEW_WORLD_PAGE_B, "进入话题客态页-区分世界:世界id:" + worldId);
|
||||
Intent intent = new Intent(context, TopicMainActivity.class);
|
||||
@@ -137,7 +130,6 @@ public class TopicMainActivity extends BaseMvpActivity<IMiniWorldGuestPage, Mini
|
||||
EventBus.getDefault().register(this);
|
||||
ButterKnife.bind(this);
|
||||
getMvpPresenter().attachMvpView(this);
|
||||
|
||||
if (getIntent() != null && getIntent().getStringExtra("world_id") != null) {
|
||||
worldId = getIntent().getStringExtra("world_id");
|
||||
} else {
|
||||
@@ -175,7 +167,6 @@ public class TopicMainActivity extends BaseMvpActivity<IMiniWorldGuestPage, Mini
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
vpMiniWorld.setOffscreenPageLimit(2);
|
||||
@@ -187,100 +178,20 @@ public class TopicMainActivity extends BaseMvpActivity<IMiniWorldGuestPage, Mini
|
||||
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
if (position == 0) {
|
||||
return WorldDynamicFragment.newInstance(JavaUtil.str2long(worldId),position);
|
||||
}
|
||||
return WorldDynamicFragment.newInstance(JavaUtil.str2long(worldId),position);
|
||||
return WorldDynamicFragment.newInstance(JavaUtil.str2long(worldId), position);
|
||||
}
|
||||
});
|
||||
vpMiniWorld.setCurrentItem(0);
|
||||
|
||||
|
||||
layoutWorldHaveData.setVisibility(View.GONE);
|
||||
|
||||
getDialogManager().showProgressDialog(context);
|
||||
getMvpPresenter().getWorldInfo(worldId);// 首次进入页面 获取世界信息
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initTitleBar() {
|
||||
super.initTitleBar();
|
||||
mTitleBar.setLeftImageResource(R.drawable.arrow_left_white);
|
||||
mTitleBar.setBackgroundColor(getResources().getColor(R.color.transparent));
|
||||
mTitleBar.setLeftTextColor(getResources().getColor(R.color.white));
|
||||
mTitleBar.setLeftTextSize(18F);
|
||||
mTitleBar.setLeftDrawPadding(SizeUtils.dp2px(this, 17f));
|
||||
mTitleBar.setLeftClickListener(v -> onLeftClickListener());
|
||||
// TitleBar.ActionList actionList = new TitleBar.ActionList();
|
||||
// actionList.add(new TitleBar.Action() {
|
||||
// @Override
|
||||
// public String getText() {
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int getDrawable() {
|
||||
// return R.drawable.ic_mini_world_guest_page_more;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int getTextColor() {
|
||||
// return 0;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int getTextDrawableLeft() {
|
||||
// return 0;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void performAction(View view) {
|
||||
// if (easyPopup != null) {
|
||||
// easyPopup.showAtAnchorView(view,
|
||||
// VerticalGravity.BELOW,
|
||||
// HorizontalGravity.ALIGN_RIGHT,
|
||||
// UIUtil.dip2px(context, -15),
|
||||
// UIUtil.dip2px(context, 15));
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// mTitleBar.addActions(actionList);
|
||||
}
|
||||
|
||||
/** 用于刷新页面判断控件是否展示;*/
|
||||
private AppBarStateChangeListener.State mState;
|
||||
private void setListeners() {
|
||||
flPublish.setOnClickListener(this);
|
||||
|
||||
ablMWInfo.addOnOffsetChangedListener(new AppBarStateChangeListener() {
|
||||
@Override
|
||||
public void onStateChanged(AppBarLayout appBarLayout, State state) {
|
||||
mState = state;
|
||||
|
||||
if (state == State.EXPANDED) {
|
||||
Log.i("OffsetChangedListener", "EXPANDED");
|
||||
//展开状态
|
||||
layoutWorldHaveData.setVisibility(View.VISIBLE);
|
||||
if (mTitleBar != null) {
|
||||
mTitleBar.setLeftText("");
|
||||
}
|
||||
|
||||
} else if (state == State.COLLAPSED) {
|
||||
//折叠状态
|
||||
Log.i("OffsetChangedListener", "COLLAPSED");
|
||||
layoutWorldHaveData.setVisibility(View.INVISIBLE);
|
||||
mTitleBar.setLeftText(getMvpPresenter().getWorldName());
|
||||
|
||||
} else {
|
||||
//中间状态
|
||||
Log.i("OffsetChangedListener", "state");
|
||||
layoutWorldHaveData.setVisibility(View.VISIBLE);
|
||||
mTitleBar.setLeftText("");
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
ablMWInfo.addOnOffsetChangedListener((appBarLayout, verticalOffset) -> tvWorldDescription.setAlpha((200 + verticalOffset) / 200f));
|
||||
ivBack.setOnClickListener(v -> finish());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -368,12 +279,6 @@ public class TopicMainActivity extends BaseMvpActivity<IMiniWorldGuestPage, Mini
|
||||
if (!showJoinDialog)
|
||||
dismissDialog();
|
||||
dismissDialog();
|
||||
|
||||
if (mState == null || mState == AppBarStateChangeListener.State.COLLAPSED) {
|
||||
layoutWorldHaveData.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
layoutWorldHaveData.setVisibility(View.VISIBLE);
|
||||
}
|
||||
// 初始化菜单
|
||||
initEasyPopMenu(infoVM.getUserType(), infoVM.isEnableReminder(), infoVM.isInGroupChat());
|
||||
// 高斯模糊背景 //loadImageWithBlurTransformation
|
||||
@@ -382,7 +287,7 @@ public class TopicMainActivity extends BaseMvpActivity<IMiniWorldGuestPage, Mini
|
||||
isSet = true;
|
||||
|
||||
// 世界昵称
|
||||
tvWorldNick.setText(infoVM.getWorldName());
|
||||
collapsingToolbarLayout.setTitle(infoVM.getWorldName());
|
||||
|
||||
// 世界描述
|
||||
tvWorldDescription.setText(infoVM.getWorldDescription());
|
||||
@@ -439,7 +344,7 @@ public class TopicMainActivity extends BaseMvpActivity<IMiniWorldGuestPage, Mini
|
||||
@Override
|
||||
public void showJoinTeamDialog(String title) {
|
||||
showConfirmDialog(title,
|
||||
"加入群聊后可以和话题的朋友们谈天说地,确认加入群聊吗?",
|
||||
"加入群聊后可以和话题的朋友们谈天说地,确认加入群聊吗?",
|
||||
"立即加入", "活跃度太低会被移出群聊哦~",
|
||||
new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -454,7 +359,7 @@ public class TopicMainActivity extends BaseMvpActivity<IMiniWorldGuestPage, Mini
|
||||
@Override
|
||||
public void showTeamMemberFullDialog(String title, String content) {
|
||||
showConfirmDialog(title,
|
||||
content,
|
||||
content,
|
||||
"知道了", "不要灰心,群聊会定期腾出空位置哦~",
|
||||
new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -742,4 +647,15 @@ public class TopicMainActivity extends BaseMvpActivity<IMiniWorldGuestPage, Mini
|
||||
"切换公告和动态tab:公告");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean needSteepStateBar() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setStatusBar() {
|
||||
super.setStatusBar();
|
||||
StatusBarUtil.transparencyBar(this);
|
||||
}
|
||||
}
|
||||
|
@@ -42,8 +42,8 @@ public class MWMagicIndicator extends CommonNavigatorAdapter {
|
||||
@Override
|
||||
public IPagerTitleView getTitleView(Context context, final int i) {
|
||||
ScaleTransitionPagerTitleView scaleTransitionPagerTitleView = new ScaleTransitionPagerTitleView(context);
|
||||
scaleTransitionPagerTitleView.setNormalColor(ContextCompat.getColor(mContext, R.color.color_666666));
|
||||
scaleTransitionPagerTitleView.setSelectedColor(ContextCompat.getColor(mContext, R.color.color_7154EE));
|
||||
scaleTransitionPagerTitleView.setNormalColor(ContextCompat.getColor(mContext, R.color.color_4F516A));
|
||||
scaleTransitionPagerTitleView.setSelectedColor(ContextCompat.getColor(mContext, R.color.color_white));
|
||||
scaleTransitionPagerTitleView.setMinScale(0.85f);
|
||||
scaleTransitionPagerTitleView.setTextSize(18);
|
||||
scaleTransitionPagerTitleView.setText(mTitleList.get(i).getName());
|
||||
@@ -58,16 +58,7 @@ public class MWMagicIndicator extends CommonNavigatorAdapter {
|
||||
|
||||
@Override
|
||||
public IPagerIndicator getIndicator(Context context) {
|
||||
LinePagerIndicator indicator = new LinePagerIndicator(context);
|
||||
indicator.setMode(LinePagerIndicator.MODE_EXACTLY);
|
||||
indicator.setLineHeight(UIUtil.dip2px(mContext, 5));
|
||||
indicator.setRoundRadius(UIUtil.dip2px(mContext, 2));
|
||||
indicator.setLineWidth(UIUtil.dip2px(mContext, 9));
|
||||
indicator.setColors(context.getResources().getColor(R.color.color_7154EE));
|
||||
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
lp.bottomMargin = mBottomMargin;
|
||||
indicator.setLayoutParams(lp);
|
||||
return indicator;
|
||||
return null;
|
||||
}
|
||||
|
||||
private OnItemSelectListener mOnItemSelectListener;
|
||||
|
@@ -1,182 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_world_guest_page"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:fitsSystemWindows="true"
|
||||
android:id="@+id/layout_world_guest_page"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_F9F9F9">
|
||||
android:background="@color/color_1c1b22"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="250dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:background="#ffffff"
|
||||
android:scaleType="fitXY"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="250dp"
|
||||
android:background="#40000000"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="250dp"
|
||||
android:background="@drawable/bg_topic_top"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="@dimen/dp_50">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/abl_mw_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="true"
|
||||
android:background="@color/transparent"
|
||||
app:elevation="0dp">
|
||||
app:elevation="0dp"
|
||||
app:layout_behavior="com.yizhuan.erban.ui.widget.AppBarLayoutBehavior">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:id="@+id/collapsing_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="true"
|
||||
app:collapsedTitleTextAppearance="@style/TitleTextAppearance"
|
||||
app:contentScrim="@color/transparent"
|
||||
app:expandedTitleMarginEnd="64dp"
|
||||
app:expandedTitleMarginStart="48dp"
|
||||
app:expandedTitleMarginBottom="120dp"
|
||||
app:expandedTitleTextAppearance="@style/TitleTextAppearance"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_world_have_data"
|
||||
<ImageView
|
||||
android:id="@+id/iv_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="225dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_collapseMode="parallax"
|
||||
app:layout_collapseParallaxMultiplier="0.4"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:src="@drawable/default_cover" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="225dp"
|
||||
android:background="#66000000" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_world_description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="68dp"
|
||||
android:visibility="gone"
|
||||
android:paddingStart="@dimen/dp_29"
|
||||
android:paddingEnd="0dp"
|
||||
tools:visibility="visible">
|
||||
android:layout_marginStart="@dimen/dp_32"
|
||||
android:layout_marginTop="112dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:lineSpacingExtra="5dp"
|
||||
android:textColor="#CCFFFFFF"
|
||||
android:textSize="13sp"
|
||||
app:layout_collapseMode="parallax"
|
||||
app:layout_collapseParallaxMultiplier="0.4"
|
||||
tools:text="故事的小黄花,从出生那年就飘着,童年的荡秋千,随记忆一直晃到现在故事的小黄花,从出生那年就飘着,童年的荡秋千,随记忆一直晃到现在~" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_world_nick"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="21sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="明媚的早晨明媚的早晨" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_world_description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:lineSpacingExtra="5dp"
|
||||
android:textColor="#CCFFFFFF"
|
||||
android:textSize="13sp"
|
||||
tools:text="故事的小黄花,从出生那年就飘着,童年的荡秋千,随记忆一直晃到现在故事的小黄花,从出生那年就飘着,童年的荡秋千,随记忆一直晃到现在~" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginBottom="@dimen/dp_15"
|
||||
tools:text="456.3W条动态"
|
||||
android:textColor="#CCFFFFFF"
|
||||
android:textSize="@dimen/sp_13" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_height="70dp"
|
||||
android:paddingTop="@dimen/dp_20"
|
||||
android:visibility="visible"
|
||||
app:contentInsetStart="0dp"
|
||||
app:layout_collapseMode="pin">
|
||||
|
||||
<com.yizhuan.erban.base.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@drawable/arrow_left_white" />
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
|
||||
<com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator
|
||||
android:id="@+id/mi_mini_world"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_marginEnd="12dp" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<LinearLayout
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/vp_mini_world"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" >
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/layout_world_no_data"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:visibility="gone"
|
||||
tools:visibility="gone">
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/scroll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_F9F9F9"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator
|
||||
android:id="@+id/mi_mini_world"
|
||||
android:layout_width="140dp"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_height="33dp" />
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/vp_mini_world"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
@@ -185,22 +104,21 @@
|
||||
android:id="@+id/fl_iv_publish"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:background="@drawable/bg_topic_publish_btn"
|
||||
>
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/bg_topic_publish_btn">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_publish"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/join_topic"
|
||||
android:drawableStart="@mipmap/ic_camera"
|
||||
android:drawablePadding="@dimen/dp_9"
|
||||
android:text="@string/join_topic"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_15"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</FrameLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</FrameLayout>
|
||||
|
||||
|
@@ -37,4 +37,9 @@
|
||||
<item name="android:textColorHint">#B1B1B3</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
</style>
|
||||
|
||||
<style name="TitleTextAppearance">
|
||||
<item name="android:textSize">20sp</item>
|
||||
<item name="android:textColor">@color/white</item>
|
||||
</style>
|
||||
</resources>
|
Submodule xplan-flutter updated: fee882d807...4789810755
Reference in New Issue
Block a user