"我的"页面

This commit is contained in:
oujunhui
2020-04-03 10:20:08 +08:00
parent ea1a07b314
commit 6d104effe5
7 changed files with 489 additions and 431 deletions

View File

@@ -233,30 +233,30 @@ public class MeFragment extends BaseFragment implements View.OnClickListener {
mBinding.tvConstellation.setText(star);
// 头像遮罩
GlideApp.with(mContext)
.load(mUserInfo.getAvatar())
.dontAnimate()
.centerInside()
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.listener(new RequestListener<Drawable>() {
@Override
public boolean onLoadFailed(@Nullable GlideException e, Object o,
Target<Drawable> target, boolean b) {
return false;
}
@Override
public boolean onResourceReady(Drawable drawable, Object o,
Target<Drawable> target, DataSource dataSource, boolean b) {
drawable.setColorFilter(mContext.getResources().getColor(R.color.black_transparent_20), PorterDuff.Mode.DARKEN);
ViewTarget<ImageView, Drawable> viewTarget = (ViewTarget<ImageView, Drawable>) target;
viewTarget.getView().setImageDrawable(drawable);
return true;
}
})
// “23”设置模糊度(在0.0到25.0之间)默认”25";"4":图片缩放比例,默认“1”。
.transforms(new BlurTransformation(mContext, 25, 1))
.into(mBinding.ivUserAvatarShadow);
// GlideApp.with(mContext)
// .load(mUserInfo.getAvatar())
// .dontAnimate()
// .centerInside()
// .diskCacheStrategy(DiskCacheStrategy.RESOURCE)
// .listener(new RequestListener<Drawable>() {
// @Override
// public boolean onLoadFailed(@Nullable GlideException e, Object o,
// Target<Drawable> target, boolean b) {
// return false;
// }
//
// @Override
// public boolean onResourceReady(Drawable drawable, Object o,
// Target<Drawable> target, DataSource dataSource, boolean b) {
// drawable.setColorFilter(mContext.getResources().getColor(R.color.black_transparent_20), PorterDuff.Mode.DARKEN);
// ViewTarget<ImageView, Drawable> viewTarget = (ViewTarget<ImageView, Drawable>) target;
// viewTarget.getView().setImageDrawable(drawable);
// return true;
// }
// })
// // “23”设置模糊度(在0.0到25.0之间)默认”25";"4":图片缩放比例,默认“1”。
// .transforms(new BlurTransformation(mContext, 25, 1))
// .into(mBinding.ivUserAvatarShadow);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 574 B

After

Width:  |  Height:  |  Size: 802 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

View File

@@ -515,6 +515,9 @@
<color name="color_E0E0E0">#E0E0E0</color>
<color name="color_F3F2F5">#F3F2F5</color>
<color name="color_FFF044">#FFF044</color>
<color name="color_CEC0FF">#CEC0FF</color>
<color name="color_shadow">#05a5a5a5</color>
</resources>

View File

@@ -350,7 +350,7 @@
<string name="text_check_damage">查看伤害排行榜</string>
<string name="title_monster_hunting_reward">获得奖励(%s)</string>
<string name="currency_unit">金币</string>
<string name="text_user_id">ID:%s</string>
<string name="text_user_id">66号:%s</string>
<string name="format_monster_hunting_impact">伤害 %s 点/次</string>
<string name="format_monster_hunting_magic_value">(%s金币)</string>
<string name="exchange_gold_tips">钻石可以兑换金币兑换比率1钻石=%s金币\n</string>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/color_shadow"/>
<corners android:radius="@dimen/dp_20"/>
</shape>
</item>
<item
android:bottom="5dp"
android:left="1dp"
android:right="1dp"
android:top="1dp">
<shape android:shape="rectangle">
<solid android:color="@android:color/white"/>
<corners android:radius="@dimen/dp_12"/>
</shape>
</item>
</layer-list>