[Modify]移除无用图片和代码
@@ -30,7 +30,6 @@ import com.yizhuan.erban.base.TitleBar;
|
||||
import com.yizhuan.erban.common.widget.dialog.DialogManager;
|
||||
import com.yizhuan.erban.databinding.ActivityVoiceMatchBinding;
|
||||
import com.yizhuan.erban.ui.im.avtivity.NimP2PMessageActivity;
|
||||
import com.yizhuan.erban.ui.widget.higuide.TuTuGuideHelper;
|
||||
import com.yizhuan.xchat_android_core.audio.AudioModel;
|
||||
import com.yizhuan.xchat_android_core.audio.bean.HistoryVoiceInfo;
|
||||
import com.yizhuan.xchat_android_core.audio.bean.VoiceMatchInfo;
|
||||
@@ -38,10 +37,8 @@ import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.music.model.PlayerModel;
|
||||
import com.yizhuan.xchat_android_core.user.UserModel;
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo;
|
||||
import com.yizhuan.xchat_android_core.utils.ActivityUtil;
|
||||
import com.yizhuan.xchat_android_core.utils.SharedPreferenceUtils;
|
||||
import com.yizhuan.xchat_android_core.utils.net.DontWarnObserver;
|
||||
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
|
||||
|
||||
@@ -160,23 +157,6 @@ public class VoiceMatchActivity extends BaseViewBindingActivity<ActivityVoiceMat
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示引导图的时机
|
||||
* 1. 首次进入页面(isNeedHiGuide)
|
||||
* 2. 请求数据且数据不为空时
|
||||
*/
|
||||
private void showGuide() {
|
||||
/*引导图*/
|
||||
binding.svgaGroupVoiceLike.postDelayed(() -> {
|
||||
if (!ActivityUtil.isValidContext(context)) {
|
||||
return;
|
||||
}
|
||||
TuTuGuideHelper guideHelper = new TuTuGuideHelper(context);
|
||||
guideHelper.createHiGuide(() -> guideHelper.createVoiceMatchGuide(binding.svgaGroupVoiceLike, binding.layoutMyVoiceEntrance));
|
||||
TuTuGuideHelper.setNoNeedHiGuide(TuTuGuideHelper.KEY_GUIDE_VOICE_MATCH);
|
||||
}, 500);
|
||||
}
|
||||
|
||||
private void queryHistoryVoice() {
|
||||
AudioModel.get().queryHistoryVoice(AuthModel.get().getCurrentUid())
|
||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||
@@ -377,10 +357,6 @@ public class VoiceMatchActivity extends BaseViewBindingActivity<ActivityVoiceMat
|
||||
if (isFinishing() || isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
if (TuTuGuideHelper.isNeedHiGuide(TuTuGuideHelper.KEY_GUIDE_VOICE_MATCH)
|
||||
&& !ListUtils.isListEmpty(voiceMatchInfos)) {
|
||||
showGuide();// 首次进入页面(isNeedHiGuide)且 请求成功数据不为空时,显示引导图
|
||||
}
|
||||
if (voiceMatchInfos != null) {
|
||||
if (voiceMatchInfos.size() == 0) {
|
||||
binding.groupVoiceLayout.setVisibility(View.INVISIBLE);
|
||||
|
@@ -58,14 +58,4 @@ public class ImpactValueLayout extends RelativeLayout {
|
||||
removeAllViews();
|
||||
}
|
||||
|
||||
public void addImpact(int impactValue) {
|
||||
View view = LayoutInflater.from(getContext()).inflate(R.layout.monster_impact_value_view, null);
|
||||
StrokeTextView impactValueView = view.findViewById(R.id.room_monster_impact_value);
|
||||
LayoutParams layoutParams= new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
layoutParams.addRule(RelativeLayout.CENTER_IN_PARENT,RelativeLayout.TRUE);
|
||||
impactValueView.setLayoutParams(layoutParams);
|
||||
impactValueView.setText("-" + String.valueOf(impactValue));
|
||||
mAnimator.start(impactValueView, this);
|
||||
}
|
||||
|
||||
}
|
@@ -1,80 +0,0 @@
|
||||
package com.yizhuan.erban.monsterhunting;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils;
|
||||
import com.yizhuan.xchat_android_core.monsterhunting.bean.MonsterInfo;
|
||||
import com.yizhuan.xchat_android_core.monsterhunting.manager.MonsterDataManager;
|
||||
|
||||
/**
|
||||
* Created by MadisonRong on 03/04/2018.
|
||||
*/
|
||||
|
||||
public class MonsterEscapeDialog extends DialogFragment implements View.OnClickListener {
|
||||
|
||||
private static final String TAG = "MonsterEscapeDialog";
|
||||
|
||||
private ImageView monsterImageView;
|
||||
private TextView confirmView;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
Window window = getDialog().getWindow();
|
||||
// setup window and width
|
||||
View view = inflater.inflate(R.layout.dialog_monster_escape, window.findViewById(android.R.id.content), false);
|
||||
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
// window.setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, UIUtil.dip2px(getContext(), 327));
|
||||
setCancelable(false);
|
||||
init(view);
|
||||
return view;
|
||||
}
|
||||
|
||||
private void init(View view) {
|
||||
monsterImageView = view.findViewById(R.id.iv_monster_image);
|
||||
confirmView = view.findViewById(R.id.tv_operation_ok);
|
||||
confirmView.setOnClickListener(this);
|
||||
|
||||
MonsterInfo monsterInfo = MonsterDataManager.get().getCurrentRoomMonsterInfo();
|
||||
ImageLoadUtils.loadImage(getContext(), monsterInfo.getMonsterImg(), monsterImageView);
|
||||
}
|
||||
|
||||
public void show(FragmentManager fragmentManager) {
|
||||
this.show(fragmentManager, TAG);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void show(FragmentManager manager, String tag) {
|
||||
if (manager.findFragmentByTag(tag) == null) {
|
||||
manager.beginTransaction()
|
||||
.add(this, tag)
|
||||
.commitAllowingStateLoss();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.tv_operation_ok:
|
||||
dismissAllowingStateLoss();
|
||||
if (getActivity() != null) {
|
||||
getActivity().finish();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,156 +0,0 @@
|
||||
package com.yizhuan.erban.monsterhunting;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.OrientationHelper;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.UIHelper;
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils;
|
||||
import com.yizhuan.xchat_android_core.monsterhunting.bean.MonsterHunter;
|
||||
import com.yizhuan.xchat_android_core.monsterhunting.bean.MonsterHuntingResult;
|
||||
import com.yizhuan.xchat_android_core.monsterhunting.bean.MonsterHuntingReward;
|
||||
import com.yizhuan.xchat_android_core.monsterhunting.bean.MonsterInfo;
|
||||
import com.yizhuan.xchat_android_core.monsterhunting.manager.MonsterDataManager;
|
||||
import com.yizhuan.xchat_android_core.monsterhunting.model.MonsterHuntingModel;
|
||||
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
/**
|
||||
* Created by MadisonRong on 02/04/2018.
|
||||
*/
|
||||
|
||||
public class MonsterHuntingRewardDialog extends DialogFragment implements View.OnClickListener {
|
||||
|
||||
private static final String TAG = "MonsterHuntingRewardDia";
|
||||
|
||||
private ImageView closeView;
|
||||
private ImageView avatarView;
|
||||
private TextView usernameView;
|
||||
private TextView userIdView;
|
||||
private TextView impactValueView;
|
||||
private TextView rewardCountView;
|
||||
private RecyclerView rewardRecyclerView;
|
||||
private ImageView moreRewardView;
|
||||
private TextView checkDamageView;
|
||||
private MonsterHuntingRewardsAdapter rewardsAdapter;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
Window window = getDialog().getWindow();
|
||||
// setup window and width
|
||||
View view = inflater.inflate(R.layout.dialog_monster_hunting_reward, window.findViewById(android.R.id.content), false);
|
||||
window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
// window.setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, UIUtil.dip2px(getContext(), 375));
|
||||
setCancelable(false);
|
||||
init(view);
|
||||
return view;
|
||||
}
|
||||
|
||||
private void init(View view) {
|
||||
closeView = view.findViewById(R.id.iv_monster_hunting_exit);
|
||||
avatarView = view.findViewById(R.id.iv_luck_man_avatar);
|
||||
usernameView = view.findViewById(R.id.tv_luck_man_name);
|
||||
userIdView = view.findViewById(R.id.tv_luck_man_id);
|
||||
impactValueView = view.findViewById(R.id.tv_impact_value);
|
||||
rewardCountView = view.findViewById(R.id.tv_reward_title);
|
||||
rewardRecyclerView = view.findViewById(R.id.rv_reward_things);
|
||||
moreRewardView = view.findViewById(R.id.iv_reward_things_more);
|
||||
checkDamageView = view.findViewById(R.id.rl_check_damage);
|
||||
|
||||
closeView.setOnClickListener(this);
|
||||
moreRewardView.setOnClickListener(this);
|
||||
checkDamageView.setOnClickListener(this);
|
||||
|
||||
MonsterInfo monsterInfo = MonsterDataManager.get().getCurrentRoomMonsterInfo();
|
||||
if (monsterInfo != null) {
|
||||
MonsterHuntingModel.get().getRoomMonsterHuntingResult(String.valueOf(monsterInfo.getMonsterId()))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe((monsterHuntingResultServiceResult, throwable) -> {
|
||||
if (throwable != null) {
|
||||
throwable.printStackTrace();
|
||||
} else if (monsterHuntingResultServiceResult != null && monsterHuntingResultServiceResult.isSuccess()) {
|
||||
if (monsterHuntingResultServiceResult.getData() != null) {
|
||||
displayResult(monsterHuntingResultServiceResult.getData());
|
||||
}
|
||||
} else if (monsterHuntingResultServiceResult != null && !monsterHuntingResultServiceResult.isSuccess()) {
|
||||
SingleToastUtil.showToast(monsterHuntingResultServiceResult.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void displayResult(MonsterHuntingResult monsterHuntingResult) {
|
||||
Log.e(TAG, "displayResult() called with: monsterHuntingReward = [" + monsterHuntingResult + "]");
|
||||
// 幸运儿
|
||||
MonsterHunter luckDog = monsterHuntingResult.getLuckyDog();
|
||||
if (luckDog != null) {
|
||||
ImageLoadUtils.loadAvatar(getContext(), luckDog.getAvatar(), avatarView, true);
|
||||
usernameView.setText(luckDog.getNick());
|
||||
userIdView.setText(String.format(Locale.getDefault(), getContext().getString(R.string.text_user_id),
|
||||
luckDog.getErbanNo()));
|
||||
impactValueView.setText(luckDog.getHurt());
|
||||
}
|
||||
// 获得的奖励
|
||||
List<MonsterHuntingReward> awards = monsterHuntingResult.getAwards();
|
||||
if (awards != null) {
|
||||
rewardCountView.setText(String.format(Locale.getDefault(),
|
||||
rewardCountView.getText().toString(), awards.size()));
|
||||
rewardsAdapter = new MonsterHuntingRewardsAdapter(awards, getContext());
|
||||
rewardRecyclerView.setAdapter(rewardsAdapter);
|
||||
rewardRecyclerView.setLayoutManager(new LinearLayoutManager(getContext(), OrientationHelper.HORIZONTAL, false));
|
||||
moreRewardView.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
public void show(FragmentManager fragmentManager) {
|
||||
this.show(fragmentManager, TAG);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void show(FragmentManager manager, String tag) {
|
||||
if (manager.findFragmentByTag(tag) == null) {
|
||||
manager.beginTransaction()
|
||||
.add(this, tag)
|
||||
.commitAllowingStateLoss();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.iv_monster_hunting_exit:
|
||||
dismissAllowingStateLoss();
|
||||
if (getActivity() != null) {
|
||||
getActivity().finish();
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.rl_check_damage:
|
||||
UIHelper.showMonsterResult(getContext(), String.valueOf(MonsterDataManager.get().getCurrentRoomMonsterInfo().getMonsterId()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@@ -3,10 +3,7 @@ package com.yizhuan.erban.radish.task.activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewStub;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
@@ -24,7 +21,6 @@ import com.yizhuan.erban.ui.widget.magicindicator.ViewPagerHelper;
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator;
|
||||
import com.yizhuan.xchat_android_core.radish.task.bean.PrizeAnim;
|
||||
import com.yizhuan.xchat_android_core.radish.task.bean.TaskInfo;
|
||||
import com.yizhuan.xchat_android_core.utils.SharedPreferenceUtils;
|
||||
import com.yizhuan.xchat_android_library.base.factory.CreatePresenter;
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
||||
|
||||
@@ -43,11 +39,6 @@ public class TaskCenterActivity extends BaseMvpActivity<ITaskCenterView, TaskCen
|
||||
String RADISH_NOT_ENOUGH_DIALOG = ResUtil.getString(R.string.task_activity_taskcenteractivity_03);
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务中心是否第一次启动
|
||||
*/
|
||||
public final static String KEY_TASK_CENTER_FIRST_START = "task_center_first_start";
|
||||
|
||||
private MagicIndicator magicIndicator;
|
||||
private ViewPager viewPager;
|
||||
private ViewStub vsStartTips;
|
||||
@@ -130,38 +121,4 @@ public class TaskCenterActivity extends BaseMvpActivity<ITaskCenterView, TaskCen
|
||||
|
||||
private int indexTips = 0;
|
||||
|
||||
/**
|
||||
* 首次启动展示 提示图
|
||||
*/
|
||||
private void showStartTips() {
|
||||
boolean isFirst = (boolean) SharedPreferenceUtils.get(KEY_TASK_CENTER_FIRST_START, true);
|
||||
if (!isFirst) {
|
||||
return;
|
||||
}
|
||||
SharedPreferenceUtils.put(KEY_TASK_CENTER_FIRST_START, false);
|
||||
View llTaskTtartContainer = vsStartTips.inflate();
|
||||
int[] topTipsRes = new int[]{R.drawable.cover_task_top_first, R.drawable.cover_task_top_second,
|
||||
R.drawable.cover_task_top_third, R.drawable.cover_task_top_fourth};
|
||||
|
||||
ImageView ivTipsTop = llTaskTtartContainer.findViewById(R.id.iv_tips_top);
|
||||
ivTipsTop.setImageResource(topTipsRes[indexTips++]);
|
||||
|
||||
TextView tv_skip_guide = llTaskTtartContainer.findViewById(R.id.tv_skip_guide);
|
||||
tv_skip_guide.setOnClickListener(v ->
|
||||
llTaskTtartContainer.setVisibility(View.GONE));
|
||||
tv_skip_guide.setVisibility(View.VISIBLE);
|
||||
llTaskTtartContainer.setOnClickListener(v -> {
|
||||
if (indexTips < topTipsRes.length) {
|
||||
if (indexTips == topTipsRes.length - 1) {
|
||||
tv_skip_guide.setVisibility(View.GONE);
|
||||
} else {
|
||||
tv_skip_guide.setVisibility(View.VISIBLE);
|
||||
}
|
||||
ivTipsTop.setImageResource(topTipsRes[indexTips++]);
|
||||
} else {
|
||||
llTaskTtartContainer.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,58 +0,0 @@
|
||||
package com.yizhuan.erban.relation.cp.dialog
|
||||
|
||||
import android.content.Context
|
||||
import android.text.Editable
|
||||
import android.view.View
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.databinding.DialogCpMpBinding
|
||||
import com.yizhuan.erban.treasure_box.widget.dialog.BaseBindingDialog
|
||||
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes
|
||||
import com.yizhuan.xchat_android_library.utils.TextWatcherWrapper
|
||||
|
||||
@ActLayoutRes(R.layout.dialog_cp_mp)
|
||||
class CpMpDialog(context: Context, private val type: Int) :
|
||||
BaseBindingDialog<DialogCpMpBinding>(context),
|
||||
View.OnClickListener {
|
||||
//type:0 申请 1 定制
|
||||
override fun init() {
|
||||
binding.pageType = type
|
||||
binding.click = this
|
||||
// binding.data = ?
|
||||
binding.editCpMpCustomized.addTextChangedListener(textWatcher)
|
||||
}
|
||||
|
||||
override fun onClick(v: View) {
|
||||
when (v.id) {
|
||||
R.id.btn_require_current -> {
|
||||
//申请名牌
|
||||
}
|
||||
R.id.btn_require_next -> {
|
||||
//申请名牌
|
||||
}
|
||||
R.id.iv_cp_mp_customized -> {
|
||||
//定制名牌
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
binding.editCpMpCustomized.removeTextChangedListener(textWatcher)
|
||||
}
|
||||
|
||||
private val textWatcher = object : TextWatcherWrapper() {
|
||||
private var hasEnabled = false
|
||||
override fun afterTextChanged(editable: Editable?) {
|
||||
super.afterTextChanged(editable)
|
||||
if (editable?.length ?: 0 > 0) {
|
||||
if (!hasEnabled) {
|
||||
binding.customizeEnable = true
|
||||
hasEnabled = true
|
||||
}
|
||||
} else {
|
||||
binding.customizeEnable = false
|
||||
hasEnabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,42 +0,0 @@
|
||||
package com.yizhuan.erban.ui.im.actions;
|
||||
|
||||
import android.os.Handler;
|
||||
|
||||
import com.netease.nim.uikit.business.session.actions.BaseAction;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.ui.widget.higuide.TuTuGuideHelper;
|
||||
import com.yizhuan.xchat_android_core.im.chatterbox.ChatterBoxHelper;
|
||||
import com.yizhuan.xchat_android_core.im.chatterbox.HideInputEvent;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
public class ChatterBoxAction extends BaseAction {
|
||||
|
||||
private long lastClick = 0L;
|
||||
public static String sessionId;
|
||||
|
||||
public ChatterBoxAction() {
|
||||
super(R.drawable.chat_icon_say, R.string.chat_action);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick() {
|
||||
long currentClick = System.currentTimeMillis();
|
||||
|
||||
if (currentClick - lastClick > 1000L) {
|
||||
|
||||
EventBus.getDefault().post(new HideInputEvent());
|
||||
lastClick = currentClick;
|
||||
|
||||
if (TuTuGuideHelper.isNeedHiGuide(TuTuGuideHelper.KEY_GUIDE_CHATTER_BOX)) {
|
||||
new Handler().post(() -> {
|
||||
TuTuGuideHelper helper = new TuTuGuideHelper(getActivity());
|
||||
helper.createHiGuide(() -> helper.createDiceOverLayer());
|
||||
TuTuGuideHelper.setNoNeedHiGuide(TuTuGuideHelper.KEY_GUIDE_CHATTER_BOX);
|
||||
});
|
||||
}
|
||||
ChatterBoxHelper.topicBoxCanSend();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,84 +0,0 @@
|
||||
package com.yizhuan.erban.ui.user.adapter;
|
||||
|
||||
import static com.yizhuan.xchat_android_core.decoration.car.bean.CarInfo.STATUS_OFF_SHELF;
|
||||
import static com.yizhuan.xchat_android_core.decoration.car.bean.CarInfo.STATUS_OUT_OF_DATE;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils;
|
||||
import com.yizhuan.xchat_android_core.bean.CarButtonInfo;
|
||||
import com.yizhuan.xchat_android_core.bean.UserInfoItem;
|
||||
import com.yizhuan.xchat_android_core.decoration.car.bean.CarInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class UserInfoCarAdapter extends UserTabBaseAdapter {
|
||||
|
||||
public UserInfoCarAdapter(Context context, List<UserInfoItem> data) {
|
||||
super(context, data);
|
||||
|
||||
addItemType(UserInfoItem.TYPE_CAR_ITEM, R.layout.user_info_my_car_item);
|
||||
addItemType(UserInfoItem.TYPE_CAR_BUTTON, R.layout.layout_car_button);
|
||||
addItemType(UserInfoItem.TYPE_CAR_EMPTY, R.layout.user_info_car_empty);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, UserInfoItem item) {
|
||||
if (item == null)
|
||||
return;
|
||||
|
||||
super.convert(helper, item);
|
||||
|
||||
switch (item.getItemType()) {
|
||||
case UserInfoItem.TYPE_CAR_ITEM:
|
||||
setCarItem(helper, item);
|
||||
break;
|
||||
|
||||
case UserInfoItem.TYPE_CAR_BUTTON:
|
||||
setCarButton(helper, item);
|
||||
break;
|
||||
|
||||
case UserInfoItem.TYPE_CAR_EMPTY:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void setCarItem(BaseViewHolder helper, UserInfoItem item) {
|
||||
|
||||
CarInfo carInfo = (CarInfo) item.getData();
|
||||
|
||||
if (carInfo == null)
|
||||
return;
|
||||
|
||||
int resId = -1;
|
||||
if (carInfo.getStatus() == STATUS_OUT_OF_DATE) {
|
||||
resId = R.drawable.ic_car_expire;
|
||||
} else if (carInfo.getStatus() == STATUS_OFF_SHELF) {
|
||||
resId = R.drawable.ic_car_down;
|
||||
}
|
||||
|
||||
helper.setVisible(R.id.user_info_car_flag,
|
||||
carInfo.getStatus() == STATUS_OUT_OF_DATE || carInfo.getStatus() == STATUS_OFF_SHELF)
|
||||
.addOnClickListener(R.id.user_info_car_pic);
|
||||
if (resId != -1) {
|
||||
helper.setImageResource(R.id.user_info_car_flag, resId);
|
||||
}
|
||||
ImageView carPic = helper.getView(R.id.user_info_car_pic);
|
||||
ImageLoadUtils.loadImage(mContext, carInfo.getPic(), carPic);
|
||||
}
|
||||
|
||||
private void setCarButton(BaseViewHolder helper, UserInfoItem item) {
|
||||
CarButtonInfo carButtonInfo = (CarButtonInfo) item.getData();
|
||||
if (carButtonInfo == null)
|
||||
return;
|
||||
|
||||
helper.setText(R.id.tv_send_car, carButtonInfo.getContext()).addOnClickListener(R.id.tv_send_car);
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -1,235 +0,0 @@
|
||||
package com.yizhuan.erban.ui.user.fragment;
|
||||
|
||||
import android.graphics.Rect;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.trello.rxlifecycle3.android.FragmentEvent;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.base.BaseBindingFragment;
|
||||
import com.yizhuan.erban.databinding.LayoutUserCarStoreBinding;
|
||||
import com.yizhuan.erban.decoration.view.DecorationStoreActivity;
|
||||
import com.yizhuan.erban.decoration.view.MyDecorationActivity;
|
||||
import com.yizhuan.erban.ui.user.adapter.UserInfoCarAdapter;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.bean.CarButtonInfo;
|
||||
import com.yizhuan.xchat_android_core.bean.GiftTitleInfo;
|
||||
import com.yizhuan.xchat_android_core.bean.UserInfoItem;
|
||||
import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
|
||||
import com.yizhuan.xchat_android_core.decoration.car.CarModel;
|
||||
import com.yizhuan.xchat_android_core.decoration.car.bean.CarInfo;
|
||||
import com.yizhuan.xchat_android_core.user.UserInfoUiMgr;
|
||||
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes;
|
||||
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.SizeUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.SingleObserver;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
@ActLayoutRes(R.layout.layout_user_car_store)
|
||||
public class UserInfoCarFragment extends BaseBindingFragment<LayoutUserCarStoreBinding> {
|
||||
|
||||
private long userId;
|
||||
|
||||
private UserInfoCarAdapter mUserInfoCarAdapter;
|
||||
private List<UserInfoItem> mList = new ArrayList<>();
|
||||
private Observer mObserver;
|
||||
|
||||
public static UserInfoCarFragment newInstance() {
|
||||
return new UserInfoCarFragment();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
|
||||
mObserver = new Observer<Long>() {
|
||||
@Override
|
||||
public void onChanged(@Nullable Long o) {
|
||||
if (o != null) {
|
||||
userId = o;
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
UserInfoUiMgr.get().registerUid(this, mObserver);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUserVisibleHint(boolean isVisibleToUser) {
|
||||
super.setUserVisibleHint(isVisibleToUser);
|
||||
|
||||
if (isVisibleToUser) {
|
||||
initData();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onInitArguments(Bundle bundle) {
|
||||
super.onInitArguments(bundle);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSetListener() {
|
||||
super.onSetListener();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initiate() {
|
||||
|
||||
mBinding.rvCar.setLayoutManager(new GridLayoutManager(mContext, 2));
|
||||
|
||||
final int px = SizeUtils.dp2px(mContext, 15);
|
||||
int spanCount = ((GridLayoutManager) mBinding.rvCar.getLayoutManager()).getSpanCount();
|
||||
mBinding.rvCar.addItemDecoration(new RecyclerView.ItemDecoration() {
|
||||
@Override
|
||||
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
|
||||
super.getItemOffsets(outRect, view, parent, state);
|
||||
int pos = parent.getChildAdapterPosition(view);
|
||||
|
||||
if (pos == 0) {
|
||||
outRect.set(-px, 0, 0, 0);
|
||||
|
||||
} else {
|
||||
|
||||
int left, right;
|
||||
if ((pos - 1) % spanCount == 0) { //第一列
|
||||
left = 0;
|
||||
right = px / 2;
|
||||
} else {
|
||||
left = px / 2;
|
||||
right = 0;
|
||||
}
|
||||
outRect.set(left, 0, right, px);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
mUserInfoCarAdapter = new UserInfoCarAdapter(mContext, mList);
|
||||
mUserInfoCarAdapter.bindToRecyclerView(mBinding.rvCar);
|
||||
mUserInfoCarAdapter.setSpanSizeLookup(new BaseQuickAdapter.SpanSizeLookup() {
|
||||
@Override
|
||||
public int getSpanSize(GridLayoutManager gridLayoutManager, int position) {
|
||||
|
||||
List<UserInfoItem> list = mUserInfoCarAdapter.getData();
|
||||
if (ListUtils.isListEmpty(list))
|
||||
return 2;
|
||||
|
||||
UserInfoItem userInfoItem = list.get(position);
|
||||
int type = userInfoItem.getItemType();
|
||||
if (type == UserInfoItem.TYPE_TITLE
|
||||
|| type == UserInfoItem.TYPE_CAR_BUTTON
|
||||
|| type == UserInfoItem.TYPE_CAR_EMPTY
|
||||
|| type == UserInfoItem.TYPE_DIV) {
|
||||
return 2;
|
||||
|
||||
} else
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
|
||||
mUserInfoCarAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
|
||||
@Override
|
||||
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
||||
List<UserInfoItem> list = mUserInfoCarAdapter.getData();
|
||||
if (ListUtils.isListEmpty(list))
|
||||
return;
|
||||
|
||||
UserInfoItem userInfoItem = list.get(position);
|
||||
if (userInfoItem.getItemType() == UserInfoItem.TYPE_CAR_ITEM) {
|
||||
|
||||
if (AuthModel.get().getCurrentUid() == userId) {
|
||||
MyDecorationActivity.start(mContext, 1);
|
||||
|
||||
} else {
|
||||
CarInfo carInfo = (CarInfo) userInfoItem.getData();
|
||||
if (carInfo.getStatus() == CarInfo.STATUS_OFF_SHELF) {
|
||||
toast(R.string.car_user_info_off_shelf);
|
||||
} else {
|
||||
DecorationStoreActivity.start(mContext, DecorationStoreActivity.TAB_CAR);
|
||||
}
|
||||
}
|
||||
|
||||
} else if (userInfoItem.getItemType() == UserInfoItem.TYPE_CAR_BUTTON) {
|
||||
DecorationStoreActivity.start(mContext, DecorationStoreActivity.TAB_CAR);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
// 获取车库数据
|
||||
CarModel.get().getUserCarsV2(userId)
|
||||
.compose(bindUntilEvent(FragmentEvent.DESTROY_VIEW))
|
||||
.subscribe(new SingleObserver<ServiceResult<List<CarInfo>>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(ServiceResult<List<CarInfo>> listServiceResult) {
|
||||
if (listServiceResult.isSuccess()) {
|
||||
getGarageCarsSuccessView(listServiceResult.getData());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void getGarageCarsSuccessView(List<CarInfo> carInfoList) {
|
||||
mList.clear();
|
||||
|
||||
if (ListUtils.isListEmpty(carInfoList)) {
|
||||
initCarTitle(0);
|
||||
|
||||
UserInfoItem emptyItem = new UserInfoItem(UserInfoItem.TYPE_CAR_EMPTY);
|
||||
mList.add(emptyItem);
|
||||
|
||||
} else {
|
||||
initCarTitle(carInfoList.size());
|
||||
|
||||
for (CarInfo carInfo : carInfoList) {
|
||||
UserInfoItem<CarInfo> carItem = new UserInfoItem<>(UserInfoItem.TYPE_CAR_ITEM, carInfo);
|
||||
mList.add(carItem);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
CarButtonInfo carButtonInfo = new CarButtonInfo();
|
||||
if (AuthModel.get().getCurrentUid() == userId) {
|
||||
carButtonInfo.setContext(ResUtil.getString(R.string.ui_user_userinfocarfragment_01));
|
||||
} else {
|
||||
carButtonInfo.setContext(ResUtil.getString(R.string.ui_user_userinfocarfragment_02));
|
||||
}
|
||||
UserInfoItem<CarButtonInfo> carButtonItem = new UserInfoItem<>(UserInfoItem.TYPE_CAR_BUTTON, carButtonInfo);
|
||||
mList.add(carButtonItem);
|
||||
mUserInfoCarAdapter.setNewData(mList);
|
||||
mUserInfoCarAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
private void initCarTitle(int size) {
|
||||
GiftTitleInfo giftTitleInfo = new GiftTitleInfo();
|
||||
giftTitleInfo.setTitle(ResUtil.getString(R.string.ui_user_userinfocarfragment_03));
|
||||
giftTitleInfo.setNum(String.valueOf(size));
|
||||
UserInfoItem<GiftTitleInfo> userInfoItem = new UserInfoItem<>(UserInfoItem.TYPE_TITLE, giftTitleInfo);
|
||||
mList.add(userInfoItem);
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -1,393 +0,0 @@
|
||||
package com.yizhuan.erban.ui.widget.higuide;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.RectF;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.UIUtil;
|
||||
import com.yizhuan.xchat_android_core.utils.ActivityUtil;
|
||||
import com.yizhuan.xchat_android_core.utils.SharedPreferenceUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* create by lvzebiao @2019/5/21
|
||||
*/
|
||||
public class TuTuGuideHelper {
|
||||
|
||||
public final static String KEY_GUIDE_CHATTER_BOX = "key_guide_chatter_box";
|
||||
|
||||
/**
|
||||
* 是否需要显示声音匹配的引导
|
||||
*/
|
||||
public final static String KEY_GUIDE_VOICE_MATCH = "key_guide_voice_match";
|
||||
|
||||
/**
|
||||
* 话题首页引导
|
||||
*/
|
||||
public final static String KEY_GUIDE_MINI_WORLD_MAIN = "key_guide_mini_world_main";
|
||||
/**
|
||||
* 话题客态页引导-未加入世界
|
||||
*/
|
||||
public final static String KEY_GUIDE_MINI_WORLD_DETAIL_GUEST = "key_guide_mini_world_detail_guest";
|
||||
/**
|
||||
* 话题客态页引导-已加入世界
|
||||
*/
|
||||
public final static String KEY_GUIDE_MINI_WORLD_DETAIL_MEMBER = "key_guide_mini_world_detail_member";
|
||||
|
||||
private ViewGroup mRootView;
|
||||
|
||||
private TuTuGuideView guideParent;
|
||||
|
||||
private Context context;
|
||||
|
||||
public TuTuGuideHelper(Context context) {
|
||||
this.context = context;
|
||||
if (!ActivityUtil.isValidContext(context)) {
|
||||
return;
|
||||
}
|
||||
View contentView = ((Activity) context).findViewById(android.R.id.content);
|
||||
if (contentView instanceof ViewGroup) {
|
||||
mRootView = (ViewGroup) contentView;
|
||||
}
|
||||
}
|
||||
|
||||
public TuTuGuideHelper(Context context, Dialog dialog) {
|
||||
this.context = context;
|
||||
if (!ActivityUtil.isValidContext(context)) {
|
||||
return;
|
||||
}
|
||||
if (dialog == null || dialog.getWindow() == null) {
|
||||
return;
|
||||
}
|
||||
View contentView = dialog.getWindow().getDecorView();
|
||||
if (contentView instanceof ViewGroup) {
|
||||
mRootView = (ViewGroup) contentView;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建高亮引导的通用入口
|
||||
*/
|
||||
public void createHiGuide(IGuideLayoutListener listener) {
|
||||
createHiGuide(listener, null);
|
||||
}
|
||||
|
||||
public void createHiGuide(IGuideLayoutListener listener, TuTuGuideView.IGuideShowFinishListener showFinishListener) {
|
||||
try {
|
||||
if (mRootView == null) {
|
||||
return;
|
||||
}
|
||||
guideParent = new TuTuGuideView(context);
|
||||
mRootView.addView(guideParent, createLayoutParams());
|
||||
mRootView.post(() -> {
|
||||
try {
|
||||
if (listener == null) {
|
||||
return;
|
||||
}
|
||||
List<OverLayer> list = listener.onCreateList();
|
||||
if (ListUtils.isListEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
for (OverLayer overLayer : list) {
|
||||
guideParent.addOverLayer(overLayer);
|
||||
}
|
||||
start();
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
});
|
||||
if (showFinishListener != null) {
|
||||
guideParent.setShowFinishListener(showFinishListener);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public interface IGuideLayoutListener {
|
||||
List<OverLayer> onCreateList();
|
||||
}
|
||||
|
||||
public List<OverLayer> createVoiceMatchGuide(View likeButtonView, View myVoiceView) {
|
||||
List<OverLayer> list = new ArrayList<>();
|
||||
if (likeButtonView == null) {
|
||||
return list;
|
||||
}
|
||||
// 喜欢按钮 高亮
|
||||
OverLayer overLayer = new OverLayer();
|
||||
list.add(overLayer);
|
||||
|
||||
LightConfig lightConfig;
|
||||
lightConfig = new LightConfig(likeButtonView);
|
||||
int radius = UIUtil.dip2px(context, 1) + likeButtonView.getWidth() / 2;
|
||||
lightConfig.setRadius(new float[]{radius, radius, radius, radius, radius, radius, radius, radius});
|
||||
lightConfig.setHPadding(UIUtil.dip2px(context, 1));
|
||||
lightConfig.setVPadding(UIUtil.dip2px(context, 1));
|
||||
HiLightInfo info;
|
||||
info = calcHiLightInfo(lightConfig);
|
||||
if (info == null) {
|
||||
return list;
|
||||
}
|
||||
List<HiLightInfo> hiLightInfoList;
|
||||
hiLightInfoList = new ArrayList<>();
|
||||
hiLightInfoList.add(info);
|
||||
overLayer.addHiLightInfo(hiLightInfoList);
|
||||
|
||||
ImageView imageView;
|
||||
imageView = new ImageView(context);
|
||||
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||
imageView.setImageResource(R.drawable.icon_guide_to_like_voice_tips);
|
||||
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
|
||||
UIUtil.dip2px(context, 216), UIUtil.dip2px(context, 96)
|
||||
);
|
||||
params.gravity = Gravity.END;
|
||||
params.rightMargin = UIUtil.dip2px(context, 60);
|
||||
params.topMargin = (int) info.getRectF().top - UIUtil.dip2px(context, 21) - UIUtil.dip2px(context, 96);
|
||||
imageView.setLayoutParams(params);
|
||||
overLayer.addTipsView(imageView);
|
||||
|
||||
params = createNextParams(context);
|
||||
params.gravity = Gravity.END;
|
||||
params.rightMargin = UIUtil.dip2px(context, 60);
|
||||
params.topMargin = (int) info.getRectF().top - UIUtil.dip2px(context, 138) - UIUtil.dip2px(context, 34);
|
||||
overLayer.setNextParams(params);
|
||||
|
||||
overLayer.setNeedSkip(true);
|
||||
// 我的声音入口 高亮
|
||||
if (myVoiceView == null) {
|
||||
return list;
|
||||
}
|
||||
overLayer = new OverLayer();
|
||||
list.add(overLayer);
|
||||
|
||||
lightConfig = new LightConfig(myVoiceView);
|
||||
radius = UIUtil.dip2px(context, 25);
|
||||
lightConfig.setRadius(new float[]{radius, radius, 0, 0, 0, 0, radius, radius});
|
||||
float leftPadding = myVoiceView.getWidth() / 3 * 1.8f;
|
||||
lightConfig.setLeftPadding((int) -leftPadding);
|
||||
info = calcHiLightInfo(lightConfig);
|
||||
if (info == null) {
|
||||
return list;
|
||||
}
|
||||
hiLightInfoList = new ArrayList<>();
|
||||
hiLightInfoList.add(info);
|
||||
overLayer.addHiLightInfo(hiLightInfoList);
|
||||
|
||||
imageView = new ImageView(context);
|
||||
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||
imageView.setImageResource(R.drawable.icon_guide_to_record_voice_tips);
|
||||
params = new FrameLayout.LayoutParams(
|
||||
UIUtil.dip2px(context, 190), UIUtil.dip2px(context, 97)
|
||||
);
|
||||
params.gravity = Gravity.END;
|
||||
params.rightMargin = UIUtil.dip2px(context, 36);
|
||||
params.topMargin = (int) info.getRectF().bottom + UIUtil.dip2px(context, 21);
|
||||
imageView.setLayoutParams(params);
|
||||
overLayer.addTipsView(imageView);
|
||||
|
||||
params = createKnowedParams(context);
|
||||
params.gravity = Gravity.END;
|
||||
params.rightMargin = UIUtil.dip2px(context, 36);
|
||||
params.topMargin = (int) info.getRectF().bottom + UIUtil.dip2px(context, 139);
|
||||
overLayer.setKnowedParams(params);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<OverLayer> createMiniWorldGuestPageGuestGuide(View addWorldLayout) {
|
||||
List<OverLayer> list = new ArrayList<>();
|
||||
if (addWorldLayout == null) {
|
||||
return list;
|
||||
}
|
||||
// 底部布局 高亮
|
||||
OverLayer overLayer = new OverLayer();
|
||||
list.add(overLayer);
|
||||
|
||||
LightConfig lightConfig;
|
||||
lightConfig = new LightConfig(addWorldLayout);
|
||||
int radius = UIUtil.dip2px(context, 5) + addWorldLayout.getWidth() / 2;
|
||||
lightConfig.setRadius(new float[]{radius, radius, radius, radius, radius, radius, radius, radius});
|
||||
lightConfig.setHPadding(UIUtil.dip2px(context, 5));
|
||||
lightConfig.setVPadding(UIUtil.dip2px(context, 5));
|
||||
HiLightInfo info = calcHiLightInfo(lightConfig);
|
||||
if (info == null) {
|
||||
return list;
|
||||
}
|
||||
List<HiLightInfo> hiLightInfoList = new ArrayList<>();
|
||||
hiLightInfoList.add(info);
|
||||
overLayer.addHiLightInfo(hiLightInfoList);
|
||||
|
||||
ImageView imageView;
|
||||
imageView = new ImageView(context);
|
||||
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||
imageView.setImageResource(R.drawable.icon_guide_to_add_world_tips);
|
||||
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
|
||||
UIUtil.dip2px(context, 277), UIUtil.dip2px(context, 115)
|
||||
);
|
||||
params.gravity = Gravity.END;
|
||||
params.rightMargin = UIUtil.dip2px(context, 60);
|
||||
params.topMargin = (int) info.getRectF().top - UIUtil.dip2px(context, 25) - UIUtil.dip2px(context, 115);
|
||||
imageView.setLayoutParams(params);
|
||||
overLayer.addTipsView(imageView);
|
||||
|
||||
params = createKnowedParams(context);
|
||||
params.gravity = Gravity.END;
|
||||
params.rightMargin = UIUtil.dip2px(context, 60);
|
||||
params.topMargin = (int) info.getRectF().top - UIUtil.dip2px(context, 45) - UIUtil.dip2px(context, 34);
|
||||
overLayer.setKnowedParams(params);
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<OverLayer> createMiniWorldGuestPageMemberGuide(View memberChatLayout) {
|
||||
List<OverLayer> list = new ArrayList<>();
|
||||
if (memberChatLayout == null) {
|
||||
return list;
|
||||
}
|
||||
// 底部布局 高亮
|
||||
OverLayer overLayer = new OverLayer();
|
||||
list.add(overLayer);
|
||||
|
||||
LightConfig lightConfig;
|
||||
lightConfig = new LightConfig(memberChatLayout);
|
||||
int radius = UIUtil.dip2px(context, 5) + memberChatLayout.getWidth() / 2;
|
||||
lightConfig.setRadius(new float[]{radius, radius, radius, radius, radius, radius, radius, radius});
|
||||
lightConfig.setHPadding(UIUtil.dip2px(context, 30));
|
||||
lightConfig.setVPadding(UIUtil.dip2px(context, 5));
|
||||
HiLightInfo info = calcHiLightInfo(lightConfig);
|
||||
if (info == null) {
|
||||
return list;
|
||||
}
|
||||
List<HiLightInfo> hiLightInfoList = new ArrayList<>();
|
||||
hiLightInfoList.add(info);
|
||||
overLayer.addHiLightInfo(hiLightInfoList);
|
||||
|
||||
ImageView imageView;
|
||||
imageView = new ImageView(context);
|
||||
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||
imageView.setImageResource(R.drawable.icon_guide_to_chat_in_world_tips);
|
||||
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
|
||||
UIUtil.dip2px(context, 278), UIUtil.dip2px(context, 114)
|
||||
);
|
||||
params.gravity = Gravity.END;
|
||||
params.rightMargin = UIUtil.dip2px(context, 60);
|
||||
params.topMargin = (int) info.getRectF().top - UIUtil.dip2px(context, 25) - UIUtil.dip2px(context, 114);
|
||||
imageView.setLayoutParams(params);
|
||||
overLayer.addTipsView(imageView);
|
||||
|
||||
params = createKnowedParams(context);
|
||||
params.gravity = Gravity.END;
|
||||
params.rightMargin = UIUtil.dip2px(context, 60);
|
||||
params.topMargin = (int) info.getRectF().top - UIUtil.dip2px(context, 45) - UIUtil.dip2px(context, 34);
|
||||
overLayer.setKnowedParams(params);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据需要的配置,计算好高亮的区域信息
|
||||
*
|
||||
* @param lightConfig
|
||||
* @return
|
||||
*/
|
||||
private HiLightInfo calcHiLightInfo(LightConfig lightConfig) {
|
||||
if (lightConfig == null || lightConfig.getView() == null) {
|
||||
return null;
|
||||
}
|
||||
View hiLightView = lightConfig.getView();
|
||||
int[] parentLoca = new int[2];
|
||||
guideParent.getLocationOnScreen(parentLoca);
|
||||
int[] lightLoca = new int[2];
|
||||
hiLightView.getLocationOnScreen(lightLoca);
|
||||
HiLightInfo info = new HiLightInfo();
|
||||
int top = lightLoca[1] - parentLoca[1] - lightConfig.getTopPadding();
|
||||
int left = lightLoca[0] - parentLoca[0] - lightConfig.getLeftPadding();
|
||||
int bottom = top + hiLightView.getHeight() + lightConfig.getTopPadding() + lightConfig.getBottomPadding();
|
||||
int right = left + lightConfig.getLeftPadding() + lightConfig.getRightPadding() + hiLightView.getWidth();
|
||||
RectF rectF = new RectF(left, top, right, bottom);
|
||||
info.setRectF(rectF);
|
||||
if (lightConfig.getRadius() != null) {
|
||||
info.setRadis(lightConfig.getRadius());
|
||||
info.setShapeType(HiLightInfo.ROUND_RECT);
|
||||
} else {
|
||||
info.setShapeType(HiLightInfo.NORMAL_RECT);
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
public List<OverLayer> createDiceOverLayer() {
|
||||
List<OverLayer> list = new ArrayList<>();
|
||||
//第一层
|
||||
OverLayer overLayer = new OverLayer();
|
||||
View view = View.inflate(context, R.layout.layout_dice_guide, null);
|
||||
view.setLayoutParams(createLayoutParams());
|
||||
overLayer.addTipsView(view);
|
||||
|
||||
list.add(overLayer);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public static ViewGroup.LayoutParams createLayoutParams() {
|
||||
return new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
}
|
||||
|
||||
public static FrameLayout.LayoutParams createSkipParams(Context context) {
|
||||
return new FrameLayout.LayoutParams(
|
||||
UIUtil.dip2px(context, 46), UIUtil.dip2px(context, 25)
|
||||
);
|
||||
}
|
||||
|
||||
public static FrameLayout.LayoutParams createKnowedParams(Context context) {
|
||||
return new FrameLayout.LayoutParams(
|
||||
UIUtil.dip2px(context, 76), UIUtil.dip2px(context, 34)
|
||||
);
|
||||
}
|
||||
|
||||
public static FrameLayout.LayoutParams createNextParams(Context context) {
|
||||
return new FrameLayout.LayoutParams(
|
||||
UIUtil.dip2px(context, 76), UIUtil.dip2px(context, 34)
|
||||
);
|
||||
}
|
||||
|
||||
public void start() {
|
||||
if (mRootView == null || guideParent == null) {
|
||||
return;
|
||||
}
|
||||
guideParent.next();
|
||||
}
|
||||
|
||||
|
||||
public static boolean isNeedHiGuide(String type) {
|
||||
boolean result = true;
|
||||
if (TextUtils.isEmpty(type)) {
|
||||
return false;
|
||||
}
|
||||
Boolean cache = (Boolean) SharedPreferenceUtils.get(type, true);
|
||||
if (cache != null) {
|
||||
result = cache;
|
||||
}
|
||||
// return result;
|
||||
return false;// 20190727 所有新手引导去掉
|
||||
}
|
||||
|
||||
public static void setNoNeedHiGuide(String type) {
|
||||
if (TextUtils.isEmpty(type)) {
|
||||
return;
|
||||
}
|
||||
SharedPreferenceUtils.put(type, false);
|
||||
}
|
||||
|
||||
}
|
@@ -1,170 +0,0 @@
|
||||
package com.yizhuan.erban.ui.widget.higuide;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Path;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.UIUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* create by lvzebiao @2019/5/21
|
||||
*/
|
||||
public class TuTuGuideView extends FrameLayout {
|
||||
|
||||
private int currentPage;
|
||||
|
||||
private Path lightPath;
|
||||
|
||||
private Path bgPath;
|
||||
|
||||
private Paint paint;
|
||||
|
||||
private Context context;
|
||||
|
||||
public TuTuGuideView(@NonNull Context context) {
|
||||
super(context);
|
||||
this.context = context;
|
||||
lightPath = new Path();
|
||||
lightPath.addRect(0, 0, 0, 0, Path.Direction.CW);
|
||||
|
||||
bgPath = new Path();
|
||||
//init Paint
|
||||
paint = new Paint();
|
||||
paint.setColor(context.getResources().getColor(R.color.black_transparent_65));
|
||||
paint.setAntiAlias(true);
|
||||
paint.setDither(true);
|
||||
setWillNotDraw(false);
|
||||
|
||||
lightList = new ArrayList<>();
|
||||
layerList = new ArrayList<>();
|
||||
setOnClickListener(v -> next());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
bgPath.reset();
|
||||
bgPath.addRect(0, 0, getWidth(), getHeight(), Path.Direction.CW);
|
||||
|
||||
//添加高亮
|
||||
if (lightList != null) {
|
||||
for (HiLightInfo info : lightList) {
|
||||
lightPath.reset();
|
||||
if (info.getShapeType() == HiLightInfo.ROUND_RECT) {
|
||||
lightPath.addRoundRect(info.getRectF(), info.getRadis(), Path.Direction.CW);
|
||||
} else {
|
||||
lightPath.addRect(info.getRectF(), Path.Direction.CW);
|
||||
}
|
||||
bgPath.op(lightPath, Path.Op.XOR);
|
||||
}
|
||||
}
|
||||
canvas.drawPath(bgPath, paint);
|
||||
}
|
||||
|
||||
public void addOverLayer(OverLayer overLayer) {
|
||||
layerList.add(overLayer);
|
||||
}
|
||||
|
||||
public void remove() {
|
||||
ViewGroup parent = (ViewGroup) getParent();
|
||||
if (parent != null) {
|
||||
parent.removeView(TuTuGuideView.this);
|
||||
}
|
||||
}
|
||||
|
||||
public void show() {
|
||||
invalidate();
|
||||
}
|
||||
|
||||
private List<HiLightInfo> lightList;
|
||||
|
||||
private List<OverLayer> layerList;
|
||||
|
||||
public void next() {
|
||||
removeAllViews();
|
||||
if (currentPage < layerList.size()) {
|
||||
OverLayer overLayer = layerList.get(currentPage);
|
||||
|
||||
lightList = overLayer.hiLightInfoList;
|
||||
for (View index : overLayer.tipsViewList) {
|
||||
addView(index);
|
||||
}
|
||||
if (overLayer.needSkip) {
|
||||
TextView textView = new TextView(context);
|
||||
textView.setText(R.string.skip_guide);
|
||||
int padding = UIUtil.dip2px(context, 5);
|
||||
textView.setPadding(padding, padding, padding, padding);
|
||||
textView.setGravity(Gravity.CENTER);
|
||||
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 13);
|
||||
textView.setTextColor(context.getResources().getColor(R.color.white_transparent_30));
|
||||
textView.setOnClickListener(v -> {
|
||||
remove();// 跳过
|
||||
if (showFinishListener != null) {
|
||||
showFinishListener.onSkip();
|
||||
}
|
||||
});
|
||||
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
params.gravity = Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL;
|
||||
params.bottomMargin = UIUtil.dip2px(context, 60);
|
||||
addView(textView, params);
|
||||
}
|
||||
if (overLayer.knowedParams != null) {
|
||||
ImageView imageView = new ImageView(context);
|
||||
imageView.setImageResource(R.drawable.icon_guide_knowed);
|
||||
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||
addView(imageView, overLayer.knowedParams);
|
||||
}
|
||||
if (overLayer.nextParams != null) {
|
||||
ImageView imageView = new ImageView(context);
|
||||
imageView.setImageResource(R.drawable.icon_guide_next);
|
||||
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
||||
addView(imageView, overLayer.nextParams);
|
||||
}
|
||||
invalidate();
|
||||
currentPage++;
|
||||
} else {
|
||||
remove();// 全部展示完毕
|
||||
if (showFinishListener != null) {
|
||||
showFinishListener.onGuideFinish();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private IGuideShowFinishListener showFinishListener;
|
||||
|
||||
public void setShowFinishListener(IGuideShowFinishListener showFinishListener) {
|
||||
this.showFinishListener = showFinishListener;
|
||||
}
|
||||
|
||||
public interface IGuideShowFinishListener {
|
||||
/**
|
||||
* 跳过
|
||||
*/
|
||||
void onSkip();
|
||||
|
||||
/**
|
||||
* 引导图已经全部展示完毕
|
||||
*/
|
||||
default void onGuideFinish() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Before Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1016 B |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 100 B |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 162 B |
@@ -1,235 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<RelativeLayout
|
||||
android:fitsSystemWindows="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_countdown"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="27dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:background="@drawable/monster_hunting_countdown"
|
||||
android:gravity="end|bottom"
|
||||
android:paddingBottom="3dp"
|
||||
android:visibility="invisible"
|
||||
android:paddingEnd="6dp"
|
||||
android:text="2:30"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_16"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_monster_hunting_exit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:visibility="invisible"
|
||||
android:layout_marginEnd="27dp"
|
||||
android:layout_marginTop="28dp"
|
||||
android:src="@drawable/monster_hunting_exit" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_monster_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:visibility="invisible"
|
||||
android:layout_height="300dp"
|
||||
android:layout_above="@+id/rl_monster_info"
|
||||
android:layout_marginBottom="36dp">
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/room_monster_svga"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:scaleType="centerCrop"
|
||||
app:fillMode="Forward"
|
||||
app:autoPlay="true" />
|
||||
|
||||
<!--<include layout="@layout/monster_impact_value_view" />-->
|
||||
|
||||
<com.yizhuan.erban.monsterhunting.ImpactValueLayout
|
||||
android:id="@+id/rl_monster_impact_value"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_monster_info"
|
||||
android:layout_width="327dp"
|
||||
android:layout_height="50dp"
|
||||
android:visibility="invisible"
|
||||
android:layout_above="@+id/rl_dialog_bottom_magic"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="7dp"
|
||||
android:background="@drawable/monster_info_panel_background">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_monster_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/v_monster_info_centre"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="24dp"
|
||||
android:paddingBottom="-1dp"
|
||||
android:text="@string/layout_activity_monster_hunting_01"
|
||||
android:textColor="@color/color_aa3b29"
|
||||
android:textSize="@dimen/dp_14"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pb_monster_hp"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
android:layout_width="195dp"
|
||||
android:layout_height="7dp"
|
||||
android:layout_below="@+id/v_monster_info_centre"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="21dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:max="100"
|
||||
android:progress="70"
|
||||
android:progressDrawable="@drawable/progress_monster_hp"
|
||||
android:secondaryProgress="50" />
|
||||
|
||||
<View
|
||||
android:id="@+id/v_monster_info_centre"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_centerInParent="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_monster_total_hp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/v_monster_info_centre"
|
||||
android:layout_alignEnd="@+id/pb_monster_hp"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="20000"
|
||||
android:textColor="@color/color_f33636"
|
||||
android:textSize="12dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_monster_hp_delimiter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/v_monster_info_centre"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@+id/tv_monster_total_hp"
|
||||
android:text="/"
|
||||
android:textColor="@color/color_f33636"
|
||||
android:textSize="12dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_monster_hp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/v_monster_info_centre"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@+id/tv_monster_hp_delimiter"
|
||||
android:text="1000"
|
||||
android:textColor="@color/color_f33636"
|
||||
android:textSize="12dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_monster_hunting_introduction"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:src="@drawable/monster_hunting_introduction" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_dialog_bottom_magic"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dialog_magic_height"
|
||||
android:visibility="invisible"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="#dd0c0c0c">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_magic_action"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:gravity="center"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:text="@string/layout_activity_monster_hunting_02"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13dp" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view_avatar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_toEndOf="@+id/tv_magic_action" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_charge"
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_toEndOf="@id/tv_gold"
|
||||
android:gravity="center"
|
||||
android:text="@string/layout_activity_monster_hunting_03"
|
||||
android:textColor="@color/color_magic_dialog_selector" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="45dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="10dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/layout_activity_monster_hunting_04"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/font_medium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_send"
|
||||
android:layout_width="59dp"
|
||||
android:layout_height="29dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="@drawable/bg_magic_dialog_button_send"
|
||||
android:gravity="center"
|
||||
android:text="@string/layout_activity_monster_hunting_05" />
|
||||
|
||||
<com.yizhuan.erban.ui.widget.MagicRecyclerView
|
||||
android:id="@+id/recycler_view_magic"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/tv_charge"
|
||||
android:layout_below="@id/recycler_view_avatar"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ViewStub
|
||||
android:id="@+id/vs_magic_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout="@layout/common_gift2_view_layout"
|
||||
tools:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
</layout>
|
@@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@color/transparent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_car_dialog_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:src="@mipmap/ic_car_dialog_close" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="36dp"
|
||||
android:src="@mipmap/ic_car_dialog_title" />
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/svga_car_dialog_guide"
|
||||
android:layout_width="match_parent"
|
||||
android:scaleType="centerInside"
|
||||
app:source="car_home_red.svga"
|
||||
app:autoPlay="true"
|
||||
android:layout_height="306dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/car_dialog_content_before"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="2dp"
|
||||
android:text="@string/car_dialog_content_after"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btn_car_go_shop"
|
||||
android:layout_width="203dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="@drawable/common_yellow_btn_bg"
|
||||
android:text="@string/car_shop_name"
|
||||
android:textColor="@color/color_1A1A1A"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
@@ -1,181 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<!--0 申请 1 定制-->
|
||||
<variable
|
||||
name="pageType"
|
||||
type="Integer" />
|
||||
|
||||
<import type="com.yizhuan.erban.R" />
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="customize_enable"
|
||||
type="Boolean" />
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="android.view.View.OnClickListener" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="316dp"
|
||||
android:layout_height="188dp"
|
||||
android:background="@{pageType==0?R.mipmap.bg_cp_mp_card_apply:R.mipmap.bg_cp_mp_card_customized}"
|
||||
android:paddingLeft="@dimen/dp_15"
|
||||
android:paddingRight="@dimen/dp_15">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_mp_current"
|
||||
android:layout_width="137dp"
|
||||
android:layout_height="86dp"
|
||||
android:layout_marginTop="@dimen/dp_45"
|
||||
android:background="@drawable/bg_cp_mp_card"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/layout_mp_next"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_level_current"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/bg_cp_level_label"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/dp_8"
|
||||
android:paddingRight="@dimen/dp_8"
|
||||
android:textColor="#9372FF"
|
||||
android:textSize="@dimen/dp_12"
|
||||
app:layout_constraintDimensionRatio="h,54:16"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="CP Lv.1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_cp_level_current"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_36"
|
||||
android:layout_marginRight="@dimen/dp_23"
|
||||
app:layout_constraintDimensionRatio="98:30"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_mp_next"
|
||||
android:layout_width="137dp"
|
||||
android:layout_height="86dp"
|
||||
android:layout_marginTop="@dimen/dp_45"
|
||||
android:background="@drawable/bg_cp_mp_card"
|
||||
app:layout_constraintLeft_toRightOf="@id/layout_mp_current"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_level_next"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/bg_cp_level_label"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/dp_8"
|
||||
android:paddingRight="@dimen/dp_8"
|
||||
android:textColor="#9372FF"
|
||||
android:textSize="@dimen/dp_12"
|
||||
app:layout_constraintDimensionRatio="h,54:16"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="CP Lv.1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_cp_level_next"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_36"
|
||||
android:layout_marginRight="@dimen/dp_23"
|
||||
app:layout_constraintDimensionRatio="98:30"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_require_current"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="26dp"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
app:layout_constraintLeft_toLeftOf="@id/layout_mp_current"
|
||||
app:layout_constraintRight_toRightOf="@id/layout_mp_current"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_mp_current" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_require_next"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="26dp"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
app:layout_constraintLeft_toLeftOf="@id/layout_mp_next"
|
||||
app:layout_constraintRight_toRightOf="@id/layout_mp_next"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_mp_next" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit_cp_mp_customized"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:layout_marginRight="@dimen/dp_12"
|
||||
android:background="#AB96FF"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="h,276:24"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cp_mp_customized"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_4"
|
||||
android:text="@string/layout_dialog_cp_mp_01"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toTopOf="@id/edit_cp_mp_customized"
|
||||
app:layout_constraintLeft_toLeftOf="@id/edit_cp_mp_customized" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_cp_mp_customized"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_marginBottom="@dimen/dp_16"
|
||||
android:onClick="@{click}"
|
||||
android:src="@{customize_enable?R.mipmap.ic_cp_mp_customized_enable:R.mipmap.ic_cp_mp_customized_disable}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/group_apply"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="@{pageType==1?View.GONE:View.VISIBLE}"
|
||||
app:constraint_referenced_ids="layout_mp_current,layout_mp_next,btn_require_current,btn_require_next" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/group_customized"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="@{pageType==0?View.GONE:View.VISIBLE}"
|
||||
app:constraint_referenced_ids="edit_cp_mp_customized,tv_cp_mp_customized,iv_cp_mp_customized" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
@@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/dp_15">
|
||||
|
||||
<LinearLayout
|
||||
android:background="@drawable/monster_escape_background"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="321dp"
|
||||
android:layout_height="276dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_monster_image"
|
||||
android:src="@drawable/monster_default_image"
|
||||
android:layout_marginTop="53dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="160dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_marginTop="13dp"
|
||||
android:text="@string/layout_dialog_monster_escape_01"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textColor="@color/color_2f4663"
|
||||
android:gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_operation_ok"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="@drawable/monster_escape_confirm"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/layout_dialog_monster_escape_02"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:layout_width="172dp"
|
||||
android:layout_height="45dp" />
|
||||
|
||||
</LinearLayout>
|
@@ -1,182 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_result_layout"
|
||||
android:layout_width="337dp"
|
||||
android:layout_height="324dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/monster_hunting_result_background">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_monster_hunting_exit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="25dp"
|
||||
android:src="@drawable/monster_hunting_exit" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_lucky_man"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="90dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="62dp"
|
||||
android:background="@drawable/monster_hunting_lucky_man_background">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_luck_man_avatar"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
tools:src="@drawable/default_avatar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_luck_man_name"
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/view_centre_holder"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="7dp"
|
||||
android:layout_toEndOf="@+id/iv_luck_man_avatar"
|
||||
android:textColor="@color/color_91400d"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/dp_14"
|
||||
tools:ignore="SpUsage"
|
||||
tools:text="@string/layout_dialog_monster_hunting_reward_01" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_centre_holder"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_centerVertical="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_luck_man_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/view_centre_holder"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="7dp"
|
||||
android:layout_toEndOf="@+id/iv_luck_man_avatar"
|
||||
android:textColor="@color/color_91400d"
|
||||
android:textSize="@dimen/dp_11"
|
||||
tools:ignore="SpUsage"
|
||||
tools:text="888888" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_impact_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/view_centre_holder"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:textColor="@color/color_ff3d42"
|
||||
android:textSize="@dimen/dp_15"
|
||||
tools:ignore="SpUsage"
|
||||
tools:text="888888" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_below="@+id/view_centre_holder"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:text="@string/layout_dialog_monster_hunting_reward_02"
|
||||
android:textColor="@color/color_ff3d42"
|
||||
android:textSize="@dimen/dp_10"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="155dp"
|
||||
android:layout_below="@+id/rl_lucky_man"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@drawable/monster_hunting_reward_background">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_reward_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_toStartOf="@+id/tv_reward_title"
|
||||
android:rotation="180"
|
||||
android:src="@drawable/monster_hunting_reward_decoration" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_reward_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginEnd="7.5dp"
|
||||
android:layout_marginStart="7.5dp"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:gravity="center"
|
||||
android:text="@string/title_monster_hunting_reward"
|
||||
android:textColor="@color/color_91400d"
|
||||
android:textSize="@dimen/dp_15"
|
||||
tools:ignore="SpUsage" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_toEndOf="@+id/tv_reward_title"
|
||||
android:src="@drawable/monster_hunting_reward_decoration" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/rl_reward_title"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginStart="@dimen/dp_20">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_reward_things"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginTop="@dimen/dp_14" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_reward_things_more"
|
||||
android:layout_width="9dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_margin="@dimen/dp_5"
|
||||
android:src="@drawable/double_arrow_right"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rl_check_damage"
|
||||
android:layout_width="172dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="@drawable/monster_hunting_check_damage"
|
||||
android:gravity="center"
|
||||
android:text="@string/text_check_damage"
|
||||
android:textColor="@color/color_fff7d4"
|
||||
android:textSize="@dimen/dp_14"
|
||||
tools:ignore="SpUsage" />
|
||||
</LinearLayout>
|
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/tv_send_car"
|
||||
android:layout_width="196dp"
|
||||
android:layout_height="39dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/bg_solid_car_send"
|
||||
android:gravity="center"
|
||||
tools:text="@string/layout_layout_car_button_01"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_tips_top"
|
||||
android:src="@drawable/dice_guide"
|
||||
android:scaleType="centerCrop"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<View
|
||||
android:id="@+id/iv_tips_bottom"
|
||||
android:background="@drawable/dice_guide_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp" />
|
||||
|
||||
</LinearLayout>
|
@@ -13,7 +13,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:background="@mipmap/bg_pk_board"
|
||||
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_car"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="10dp" />
|
||||
</layout>
|
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.yizhuan.erban.ui.gift.widget.StrokeTextView xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/room_monster_impact_value"
|
||||
app:innnerColor="@color/color_e93028"
|
||||
app:outerColor="@color/white"
|
||||
android:textSize="@dimen/dp_20"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:showIn="@layout/activity_monster_hunting" />
|
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/icon_common_failure" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_no_car"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
@@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="110dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bg_car_item">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/user_info_car_pic"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="79dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
<View
|
||||
android:id="@+id/car_user_gray_view"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="79dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@color/color_black_000000_30_transparent"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/user_info_car_flag"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginTop="15dp"
|
||||
tools:src="@drawable/ic_car_expire"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</FrameLayout>
|
@@ -1,56 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/ll_gift_value_start_tips"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gv_status_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/icon_gv_status_bar" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gv_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_gv_start_top_0" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/icon_gv_start_middle_0" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_gv_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/icon_gv_start_bottom_0" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_skip_guide"
|
||||
android:layout_marginBottom="57dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:padding="@dimen/dp_5"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:text="@string/skip_guide"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:textColor="@color/white_transparent_30"
|
||||
android:layout_height="wrap_content" />
|
||||
</FrameLayout>
|
@@ -1,89 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_jewel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="30dp"
|
||||
android:src="@drawable/wallet_jewel" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_jewel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/iv_jewel"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/my_jewel"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_diamondNum"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tv_jewel"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="10dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:text="0"
|
||||
android:textColor="@color/appColor"
|
||||
android:textSize="20sp" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tip_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:text="@string/jewel_withdraw" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/wallet_jewel_tixian"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_above="@id/tip_text"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:background="@drawable/shape_semi_round_gray_solid_empty"
|
||||
android:text="@string/layout_wallet_fragment_jewel_01"
|
||||
android:textColor="@color/color_1A1A1A"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/wallet_jewel_exchange"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_above="@id/wallet_jewel_tixian"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:background="@drawable/shape_semi_round_gray_solid"
|
||||
android:text="@string/layout_wallet_fragment_jewel_02"
|
||||
android:textColor="@color/color_FFFFFF"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="174dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_above="@id/wallet_jewel_exchange"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:scaleType="fitEnd"
|
||||
android:src="@drawable/icon_exchange_tip" />
|
||||
|
||||
</RelativeLayout>
|
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 144 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 880 B |
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 1.6 KiB |
@@ -53,7 +53,6 @@ import com.yizhuan.erban.miniworld.widget.MWMagicIndicator;
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils;
|
||||
import com.yizhuan.erban.ui.webview.CommonWebViewActivity;
|
||||
import com.yizhuan.erban.ui.widget.ShareDialog;
|
||||
import com.yizhuan.erban.ui.widget.higuide.TuTuGuideHelper;
|
||||
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;
|
||||
@@ -74,7 +73,6 @@ import com.yizhuan.xchat_android_core.miniworld.event.OpenedMyMiniWorldEvent;
|
||||
import com.yizhuan.xchat_android_core.miniworld.model.MiniWorldModel;
|
||||
import com.yizhuan.xchat_android_core.share.ShareModel;
|
||||
import com.yizhuan.xchat_android_core.share.bean.SessionType;
|
||||
import com.yizhuan.xchat_android_core.utils.ActivityUtil;
|
||||
import com.yizhuan.xchat_android_core.utils.SharedPreferenceUtils;
|
||||
import com.yizhuan.xchat_android_core.utils.net.DontWarnObserver;
|
||||
import com.yizhuan.xchat_android_library.base.factory.CreatePresenter;
|
||||
@@ -545,7 +543,6 @@ public class MiniWorldGuestPageActivity extends BaseMvpActivity<IMiniWorldGuestP
|
||||
layoutWorldBottom.setVisibility(View.VISIBLE);
|
||||
|
||||
}
|
||||
showGuide(isWorldOriginatorOrMember(infoVM.getUserType()));
|
||||
checkJoinFirstIn();
|
||||
|
||||
int onlineNum = infoVM.getOnlineNum();
|
||||
@@ -570,40 +567,6 @@ public class MiniWorldGuestPageActivity extends BaseMvpActivity<IMiniWorldGuestP
|
||||
getDialogManager().dismissDialog();
|
||||
}
|
||||
|
||||
private void showGuide(boolean isWorldOriginatorOrMember) {
|
||||
if (isWorldOriginatorOrMember) {
|
||||
showMemberGuide();
|
||||
} else {
|
||||
showGuestGuide();
|
||||
}
|
||||
}
|
||||
|
||||
private void showMemberGuide() {
|
||||
if (TuTuGuideHelper.isNeedHiGuide(TuTuGuideHelper.KEY_GUIDE_MINI_WORLD_DETAIL_MEMBER)) {
|
||||
layoutWorldBottomChat.postDelayed(() -> {
|
||||
if (!ActivityUtil.isValidContext(context)) {
|
||||
return;
|
||||
}
|
||||
TuTuGuideHelper guideHelper = new TuTuGuideHelper(context);
|
||||
guideHelper.createHiGuide(() -> guideHelper.createMiniWorldGuestPageMemberGuide(layoutWorldBottomChat));
|
||||
TuTuGuideHelper.setNoNeedHiGuide(TuTuGuideHelper.KEY_GUIDE_MINI_WORLD_DETAIL_MEMBER);
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
private void showGuestGuide() {
|
||||
if (TuTuGuideHelper.isNeedHiGuide(TuTuGuideHelper.KEY_GUIDE_MINI_WORLD_DETAIL_GUEST)) {
|
||||
layoutWorldBottom.postDelayed(() -> {
|
||||
if (!ActivityUtil.isValidContext(context)) {
|
||||
return;
|
||||
}
|
||||
TuTuGuideHelper guideHelper = new TuTuGuideHelper(context);
|
||||
guideHelper.createHiGuide(() -> guideHelper.createMiniWorldGuestPageGuestGuide(layoutWorldBottom));
|
||||
TuTuGuideHelper.setNoNeedHiGuide(TuTuGuideHelper.KEY_GUIDE_MINI_WORLD_DETAIL_GUEST);
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showCompleteOperationDialog(String contentMsg) {
|
||||
View view = LayoutInflater.from(context).inflate(R.layout.dialog_mini_world_guest_page_complete_operation, null);
|
||||
|
@@ -9,7 +9,6 @@ import android.graphics.drawable.GradientDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@@ -24,7 +23,6 @@ import com.yizhuan.erban.miniworld.adapter.MiniWorldMainAdapter;
|
||||
import com.yizhuan.erban.miniworld.listener.DoubleClickCheckListener;
|
||||
import com.yizhuan.erban.miniworld.presenter.MiniWorldMainPresenter;
|
||||
import com.yizhuan.erban.miniworld.view.IMiniWorldMainView;
|
||||
import com.yizhuan.erban.ui.widget.higuide.TuTuGuideHelper;
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.UIUtil;
|
||||
import com.yizhuan.erban.ui.widget.rollviewpager.RollPagerView;
|
||||
import com.yizhuan.erban.ui.widget.rollviewpager.Util;
|
||||
@@ -261,30 +259,6 @@ public class MiniWorldMainActivity extends BaseMvpActivity<IMiniWorldMainView, M
|
||||
isFirstLoad = false;
|
||||
}
|
||||
hideStatus();
|
||||
checkGuide();
|
||||
}
|
||||
|
||||
private void checkGuide() {
|
||||
if (TuTuGuideHelper.isNeedHiGuide(TuTuGuideHelper.KEY_GUIDE_MINI_WORLD_MAIN)) {
|
||||
mRecyclerView.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
View rootView = getWindow().getDecorView().findViewById(android.R.id.content);
|
||||
if (!(rootView instanceof FrameLayout)) {
|
||||
return;
|
||||
}
|
||||
View guideView = getLayoutInflater().inflate(R.layout.layout_mini_world_main_guide, null);
|
||||
((FrameLayout) rootView).addView(guideView);
|
||||
guideView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
((FrameLayout) rootView).removeView(v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 500);
|
||||
TuTuGuideHelper.setNoNeedHiGuide(TuTuGuideHelper.KEY_GUIDE_MINI_WORLD_MAIN);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 13 KiB |
@@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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="#A6000000"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<ImageView
|
||||
android:id="@+id/iv_logo"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/icon_guide_logo_left_bottom"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="55dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:src="@drawable/icon_guide_knowed"
|
||||
app:layout_constraintBottom_toTopOf="@+id/iv_logo"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="55dp"
|
||||
android:layout_marginStart="55dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:src="@drawable/ic_guide_mini_world_main_copywriting"
|
||||
app:layout_constraintBottom_toTopOf="@+id/imageView2"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -43,9 +43,6 @@
|
||||
</FrameLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/center_view"
|
||||
android:layout_width="0dp"
|
||||
|