UI修改:1.云信私聊页面2.部分UI细节优化

This commit is contained in:
huangjian
2021-04-07 16:48:10 +08:00
parent 8c6e6fb852
commit b076995203
129 changed files with 61 additions and 71 deletions

View File

@@ -1074,17 +1074,6 @@ public class MessageView extends FrameLayout {
} }
}, new ForegroundColorSpan(roomTipNickColor)) }, new ForegroundColorSpan(roomTipNickColor))
.append("关注房主不迷路哦") .append("关注房主不迷路哦")
// .append("关注", new RoundBackgroundSpan(tvContent.getContext(), ContextCompat.getColor(tvContent.getContext(), R.color.appColor), Color.WHITE, SizeUtils.dp2px(tvContent.getContext(), 8)))
// .append(follow ? "已关注" : "关注",
// new TagSpan(Color.WHITE, ContextCompat.getColor(tvContent.getContext(), follow ? R.color.gray7 : R.color.appColor), (int) tvContent.getTextSize(), SizeUtils.dp2px(tvContent.getContext(), 8)),
// follow ? null : new OriginalDrawStatusClickSpan() {
// @Override
// public void onClick(@NonNull View widget) {
// if (onClick != null) {
// onClick.onFollowClick(position);
// }
// }
// });
.append(follow ? "已关注" : "关注", .append(follow ? "已关注" : "关注",
new RadiusBackgroundSpan(follow ? Color.parseColor("#4cFFFFFF") : ContextCompat.getColor(tvContent.getContext(), R.color.appColor), SizeUtils.dp2px(tvContent.getContext(), 8), follow ? Color.parseColor("#D8FFFFFF") : Color.WHITE, (int) (tvContent.getTextSize() - SizeUtils.sp2px(tvContent.getContext(), 2) - .5f), SizeUtils.dp2px(tvContent.getContext(), 8), SizeUtils.dp2px(tvContent.getContext(), 4)), new RadiusBackgroundSpan(follow ? Color.parseColor("#4cFFFFFF") : ContextCompat.getColor(tvContent.getContext(), R.color.appColor), SizeUtils.dp2px(tvContent.getContext(), 8), follow ? Color.parseColor("#D8FFFFFF") : Color.WHITE, (int) (tvContent.getTextSize() - SizeUtils.sp2px(tvContent.getContext(), 2) - .5f), SizeUtils.dp2px(tvContent.getContext(), 8), SizeUtils.dp2px(tvContent.getContext(), 4)),
follow ? null : new OriginalDrawStatusClickSpan() { follow ? null : new OriginalDrawStatusClickSpan() {

View File

@@ -39,6 +39,10 @@ public class BannerAdapter extends StaticPagerAdapter {
mInflater = LayoutInflater.from(context); mInflater = LayoutInflater.from(context);
} }
public void setBannerInfoList(List<BannerInfo> bannerInfoList) {
this.bannerInfoList = bannerInfoList;
}
public void setHomeGame(boolean homeGame) { public void setHomeGame(boolean homeGame) {
isHomeGame = homeGame; isHomeGame = homeGame;
} }

View File

@@ -143,6 +143,8 @@ public class HomeFragment extends BaseMvpFragment<IMainFragmentView, MainFragmen
private HomeAddFriendsAdapter addFriendsAdapter; private HomeAddFriendsAdapter addFriendsAdapter;
private BannerAdapter bannerAdapter;
@Nullable @Nullable
private Disposable addFriendsDisposable; private Disposable addFriendsDisposable;
@@ -823,35 +825,36 @@ public class HomeFragment extends BaseMvpFragment<IMainFragmentView, MainFragmen
return; return;
} }
mBinding.rollView.setVisibility(View.VISIBLE); mBinding.rollView.setVisibility(View.VISIBLE);
if (bannerAdapter == null) {
mBinding.rollView.setHintView(new ColorPointHintView(mContext, Color.WHITE, mContext.getResources().getColor(R.color.color_66FFFFFF)) {
@Override
public Drawable makeFocusDrawable() {
GradientDrawable dotFocus = new GradientDrawable();
dotFocus.setColor(Color.WHITE);
dotFocus.setCornerRadius(Util.dip2px(getContext(), 2));
dotFocus.setSize(Util.dip2px(getContext(), 9), Util.dip2px(getContext(), 4));
return dotFocus;
}
mBinding.rollView.setHintView(new ColorPointHintView(mContext, Color.WHITE, mContext.getResources().getColor(R.color.color_66FFFFFF)) { @Override
@Override public Drawable makeNormalDrawable() {
public Drawable makeFocusDrawable() { GradientDrawable dotNormal = new GradientDrawable();
GradientDrawable dotFocus = new GradientDrawable(); dotNormal.setColor(mContext.getResources().getColor(R.color.color_66FFFFFF));
dotFocus.setColor(Color.WHITE); dotNormal.setCornerRadius(Util.dip2px(getContext(), 2));
dotFocus.setCornerRadius(Util.dip2px(getContext(), 2)); dotNormal.setSize(Util.dip2px(getContext(), 4), Util.dip2px(getContext(), 4));
dotFocus.setSize(Util.dip2px(getContext(), 9), Util.dip2px(getContext(), 4)); return dotNormal;
return dotFocus; }
} });
@Override bannerAdapter = new BannerAdapter(bannerList,mContext);
public Drawable makeNormalDrawable() { bannerAdapter.setRoundingRadius(ScreenUtil.dip2px(12));
GradientDrawable dotNormal = new GradientDrawable(); bannerAdapter.setHomeGame(true);
dotNormal.setColor(mContext.getResources().getColor(R.color.color_66FFFFFF)); mBinding.rollView.setAdapter(bannerAdapter);
dotNormal.setCornerRadius(Util.dip2px(getContext(), 2)); mBinding.rollView.setPlayDelay(3000);
dotNormal.setSize(Util.dip2px(getContext(), 4), Util.dip2px(getContext(), 4)); //设置透明度
return dotNormal; mBinding.rollView.setAnimationDurtion(500);
} }
}); bannerAdapter.setBannerInfoList(bannerList);
BannerAdapter bannerAdapter = new BannerAdapter(bannerList, mContext);
bannerAdapter.setRoundingRadius(ScreenUtil.dip2px(12));
bannerAdapter.setHomeGame(true);
mBinding.rollView.setAdapter(bannerAdapter);
mBinding.rollView.setPlayDelay(3000);
//设置透明度
mBinding.rollView.setAnimationDurtion(500);
mBinding.rollView.setVisibility(View.VISIBLE);
bannerAdapter.notifyDataSetChanged(); bannerAdapter.notifyDataSetChanged();
} }

View File

@@ -105,8 +105,6 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
private UserInfoActivity mActivity; private UserInfoActivity mActivity;
private long userId = 0; private long userId = 0;
private UserInfo userInfo; private UserInfo userInfo;
Drawable mAttenDrawable;
Drawable mAttenedDrawable;
private boolean mIslike = false; private boolean mIslike = false;
private int flag = 0; private int flag = 0;
@@ -149,9 +147,6 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
} }
private void initAttentionView() { private void initAttentionView() {
mAttenDrawable = ContextCompat.getDrawable(this, R.drawable.icon_new_attention);
mAttenedDrawable = ContextCompat.getDrawable(this, R.drawable.ic_attened);
if (AuthModel.get().getCurrentUid() == userId) { if (AuthModel.get().getCurrentUid() == userId) {
identityState = IdentityState.OWN; identityState = IdentityState.OWN;
mBinding.tvFansCount.setOnClickListener(this); mBinding.tvFansCount.setOnClickListener(this);
@@ -685,11 +680,7 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
private void setLikedText(boolean isliked) { private void setLikedText(boolean isliked) {
mIslike = isliked; mIslike = isliked;
attentionLayout.setCompoundDrawablesWithIntrinsicBounds(
(!isliked) ? mAttenDrawable : mAttenedDrawable, null, null, null);
attentionLayout.setText(getString((isliked) ? R.string.already_attention : R.string.attention)); attentionLayout.setText(getString((isliked) ? R.string.already_attention : R.string.attention));
attentionLayout.setTextColor(isliked ? getResources().getColor(R.color.app_248cfe) : getResources().getColor(R.color.text_title_white));
attentionLayout.setBackground(isliked ? getResources().getDrawable(R.drawable.bg_common_disable) : getResources().getDrawable(R.drawable.bg_common_confirm));
} }
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)

Binary file not shown.

After

Width:  |  Height:  |  Size: 913 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 B

View File

@@ -99,7 +99,7 @@
android:layout_weight="1" android:layout_weight="1"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:gravity="center_vertical" android:gravity="center_vertical"
android:textColor="@color/color_999999" android:textColor="@color/text_normal_c6c6e9"
android:textSize="@dimen/sp_15" android:textSize="@dimen/sp_15"
tools:text="0" /> tools:text="0" />
</LinearLayout> </LinearLayout>

View File

@@ -187,7 +187,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical|right" android:layout_gravity="center_vertical|right"
android:layout_marginTop="2dp" android:layout_marginTop="6dp"
android:textColor="@color/text_secondary_4f516a" android:textColor="@color/text_secondary_4f516a"
android:textSize="11dp" android:textSize="11dp"
tools:text="just now" /> tools:text="just now" />

View File

@@ -3,49 +3,47 @@
android:id="@+id/bottom_view_layout" android:id="@+id/bottom_view_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center"
android:background="@color/transparent" android:background="@color/transparent"
android:gravity="center"
android:orientation="horizontal"> android:orientation="horizontal">
<LinearLayout <LinearLayout
android:layout_width="164dp" android:layout_width="164dp"
android:layout_height="74dp" android:layout_height="74dp"
android:gravity="center" android:gravity="center"
android:orientation="vertical" android:orientation="vertical">
android:background="@drawable/ic_projection">
<com.yizhuan.xchat_android_library.widget.DrawableCenterTextView <com.yizhuan.xchat_android_library.widget.DrawableCenterTextView
android:id="@+id/send_msg_layout" android:id="@+id/send_msg_layout"
android:layout_width="129dp" android:layout_width="129dp"
android:layout_height="39dp" android:layout_height="39dp"
android:background="@drawable/bg_common_cancel"
android:drawableLeft="@mipmap/icon_chat" android:drawableLeft="@mipmap/icon_chat"
android:drawablePadding="5dp" android:drawablePadding="5dp"
android:gravity="center" android:gravity="center"
android:text="@string/send_msg" android:text="@string/send_msg"
android:textColor="@color/appColor" android:textColor="@color/appColor"
android:textSize="15sp" android:textSize="15sp" />
android:background="@drawable/bg_common_cancel"/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="164dp" android:layout_width="164dp"
android:layout_height="74dp" android:layout_height="74dp"
android:orientation="vertical"
android:gravity="center" android:gravity="center"
android:background="@drawable/ic_projection"> android:orientation="vertical">
<com.yizhuan.xchat_android_library.widget.DrawableCenterTextView <com.yizhuan.xchat_android_library.widget.DrawableCenterTextView
android:id="@+id/attention_layout" android:id="@+id/attention_layout"
android:layout_width="129dp" android:layout_width="129dp"
android:layout_height="39dp" android:layout_height="39dp"
android:drawablePadding="5dp" android:background="@drawable/bg_common_confirm"
android:drawableStart="@drawable/icon_new_attention" android:drawableStart="@drawable/icon_new_attention"
android:drawablePadding="5dp"
android:gravity="center" android:gravity="center"
android:text="@string/attention" android:text="@string/attention"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="15sp" android:textSize="15sp" />
android:background="@drawable/bg_common_confirm"/>
</LinearLayout> </LinearLayout>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 920 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1018 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1018 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 561 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 968 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 506 B

After

Width:  |  Height:  |  Size: 506 B

View File

Before

Width:  |  Height:  |  Size: 310 B

After

Width:  |  Height:  |  Size: 310 B

View File

Before

Width:  |  Height:  |  Size: 336 B

After

Width:  |  Height:  |  Size: 336 B

View File

Before

Width:  |  Height:  |  Size: 430 B

After

Width:  |  Height:  |  Size: 430 B

View File

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 282 B

View File

Before

Width:  |  Height:  |  Size: 906 B

After

Width:  |  Height:  |  Size: 906 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 872 B

After

Width:  |  Height:  |  Size: 872 B

View File

Before

Width:  |  Height:  |  Size: 408 B

After

Width:  |  Height:  |  Size: 408 B

View File

Before

Width:  |  Height:  |  Size: 641 B

After

Width:  |  Height:  |  Size: 641 B

View File

Before

Width:  |  Height:  |  Size: 552 B

After

Width:  |  Height:  |  Size: 552 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 583 B

After

Width:  |  Height:  |  Size: 583 B

View File

Before

Width:  |  Height:  |  Size: 851 B

After

Width:  |  Height:  |  Size: 851 B

View File

Before

Width:  |  Height:  |  Size: 611 B

After

Width:  |  Height:  |  Size: 611 B

View File

Before

Width:  |  Height:  |  Size: 1007 B

After

Width:  |  Height:  |  Size: 1007 B

View File

Before

Width:  |  Height:  |  Size: 871 B

After

Width:  |  Height:  |  Size: 871 B

View File

Before

Width:  |  Height:  |  Size: 229 B

After

Width:  |  Height:  |  Size: 229 B

View File

Before

Width:  |  Height:  |  Size: 217 B

After

Width:  |  Height:  |  Size: 217 B

View File

Before

Width:  |  Height:  |  Size: 715 B

After

Width:  |  Height:  |  Size: 715 B

View File

Before

Width:  |  Height:  |  Size: 398 B

After

Width:  |  Height:  |  Size: 398 B

View File

Before

Width:  |  Height:  |  Size: 828 B

After

Width:  |  Height:  |  Size: 828 B

View File

Before

Width:  |  Height:  |  Size: 488 B

After

Width:  |  Height:  |  Size: 488 B

View File

Before

Width:  |  Height:  |  Size: 164 B

After

Width:  |  Height:  |  Size: 164 B

View File

Before

Width:  |  Height:  |  Size: 270 B

After

Width:  |  Height:  |  Size: 270 B

View File

Before

Width:  |  Height:  |  Size: 408 B

After

Width:  |  Height:  |  Size: 408 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 690 B

After

Width:  |  Height:  |  Size: 690 B

View File

Before

Width:  |  Height:  |  Size: 520 B

After

Width:  |  Height:  |  Size: 520 B

View File

Before

Width:  |  Height:  |  Size: 259 B

After

Width:  |  Height:  |  Size: 259 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 808 B

After

Width:  |  Height:  |  Size: 808 B

Some files were not shown because too many files have changed in this diff Show More