公會功能修改
This commit is contained in:
@@ -249,7 +249,7 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
|
||||
mMainTabLayout.setMainTabInfoList(mainTabInfos);
|
||||
}
|
||||
});
|
||||
AppUpgradeHelper.checkAppUpgrade(this, false, false);
|
||||
AppUpgradeHelper.checkAppUpgrade(this);
|
||||
initMaterialView();
|
||||
onParseIntent();
|
||||
updateDatas();
|
||||
|
@@ -62,7 +62,7 @@ public class GlobalHandleManager {
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onImPushUpdateAppEvent(ImPushUpdateAppEvent event) {
|
||||
AppUpgradeHelper.checkAppUpgrade((RxAppCompatActivity) getActivity(), false, true, event.getInfo());
|
||||
AppUpgradeHelper.checkAppUpgrade((RxAppCompatActivity) getActivity(), event.getInfo());
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
|
@@ -10,12 +10,12 @@ import com.yizhuan.xchat_android_core.bean.response.ListResult
|
||||
class AssociationViewModel : BaseViewModel() {
|
||||
|
||||
//公会列表
|
||||
private val _clanListLiveData = MutableLiveData<ListResult<ClanListInfo>?>()
|
||||
val clanListLiveData: MutableLiveData<ListResult<ClanListInfo>?> = _clanListLiveData
|
||||
private val _clanListLiveData = MutableLiveData<List<ClanListInfo>?>()
|
||||
val clanListLiveData: MutableLiveData<List<ClanListInfo>?> = _clanListLiveData
|
||||
|
||||
//牌照房列表
|
||||
private val _hallListLiveData = MutableLiveData<ListResult<HallListInfo>?>()
|
||||
val hallListLiveData: MutableLiveData<ListResult<HallListInfo>?> = _hallListLiveData
|
||||
private val _hallListLiveData = MutableLiveData<List<HallListInfo>?>()
|
||||
val hallListLiveData: MutableLiveData<List<HallListInfo>?> = _hallListLiveData
|
||||
|
||||
fun getClanList() {
|
||||
safeLaunch(
|
||||
|
@@ -2,6 +2,7 @@ package com.yizhuan.erban.association.adapter;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
@@ -17,19 +18,21 @@ public class AssociationAdapter extends BaseQuickAdapter<ClanListInfo, BaseViewH
|
||||
|
||||
public AssociationAdapter() {
|
||||
super(R.layout.item_association);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, ClanListInfo item) {
|
||||
if (helper.getAdapterPosition() == 0) {
|
||||
helper.getView(R.id.view_guild).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.tv_guild).setVisibility(View.GONE);
|
||||
helper.getView(R.id.view_guild).setBackgroundResource(R.drawable.guild_one);
|
||||
} else if (helper.getAdapterPosition() == 1) {
|
||||
helper.getView(R.id.view_guild).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.tv_guild).setVisibility(View.GONE);
|
||||
helper.getView(R.id.view_guild).setBackgroundResource(R.drawable.guild_two);
|
||||
} else if (helper.getAdapterPosition() == 2) {
|
||||
helper.getView(R.id.view_guild).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.tv_guild).setVisibility(View.GONE);
|
||||
helper.getView(R.id.view_guild).setBackgroundResource(R.drawable.guild_three);
|
||||
} else {
|
||||
helper.getView(R.id.view_guild).setVisibility(View.GONE);
|
||||
@@ -42,5 +45,19 @@ public class AssociationAdapter extends BaseQuickAdapter<ClanListInfo, BaseViewH
|
||||
ImageView iv_guild_image = helper.getView(R.id.iv_guild_image);
|
||||
ImageLoadUtilsV2.loadImage(iv_guild_image, item.getLevelIcon());
|
||||
|
||||
TextView tvApply = helper.getView(R.id.tvApply);
|
||||
if(item.getApplyBtnStatus() == 0){
|
||||
tvApply.setVisibility(View.GONE);
|
||||
}else if(item.getApplyBtnStatus() == 1){
|
||||
tvApply.setVisibility(View.VISIBLE);
|
||||
tvApply.setSelected(true);
|
||||
tvApply.setText(mContext.getString(R.string.apply_join));
|
||||
}else if(item.getApplyBtnStatus() == 2){
|
||||
tvApply.setVisibility(View.VISIBLE);
|
||||
tvApply.setSelected(false);
|
||||
tvApply.setText(mContext.getString(R.string.have_apply));
|
||||
}
|
||||
helper.addOnClickListener(R.id.tvApply);
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@ package com.yizhuan.erban.association.adapter;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||
import com.chad.library.adapter.base.BaseViewHolder;
|
||||
@@ -17,7 +18,7 @@ import com.yizhuan.xchat_android_core.association.HallListInfo;
|
||||
public class AssociationRoomAdapter extends BaseQuickAdapter<HallListInfo, BaseViewHolder> {
|
||||
|
||||
public AssociationRoomAdapter() {
|
||||
super(R.layout.item_association);
|
||||
super(R.layout.item_association_room);
|
||||
|
||||
}
|
||||
|
||||
@@ -25,12 +26,15 @@ public class AssociationRoomAdapter extends BaseQuickAdapter<HallListInfo, BaseV
|
||||
protected void convert(BaseViewHolder helper, HallListInfo item) {
|
||||
if (helper.getAdapterPosition() == 0) {
|
||||
helper.getView(R.id.view_guild).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.tv_guild).setVisibility(View.GONE);
|
||||
helper.getView(R.id.view_guild).setBackgroundResource(R.drawable.guild_one);
|
||||
} else if (helper.getAdapterPosition() == 1) {
|
||||
helper.getView(R.id.view_guild).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.tv_guild).setVisibility(View.GONE);
|
||||
helper.getView(R.id.view_guild).setBackgroundResource(R.drawable.guild_two);
|
||||
} else if (helper.getAdapterPosition() == 2) {
|
||||
helper.getView(R.id.view_guild).setVisibility(View.VISIBLE);
|
||||
helper.getView(R.id.tv_guild).setVisibility(View.GONE);
|
||||
helper.getView(R.id.view_guild).setBackgroundResource(R.drawable.guild_three);
|
||||
} else {
|
||||
helper.getView(R.id.view_guild).setVisibility(View.GONE);
|
||||
@@ -39,9 +43,21 @@ public class AssociationRoomAdapter extends BaseQuickAdapter<HallListInfo, BaseV
|
||||
}
|
||||
|
||||
ImageLoadUtilsV2.loadAvatar(helper.getView(R.id.iv_guild_icon), item.getOwnerAvatar());
|
||||
helper.setText(R.id.tv_name, item.getOwnerNick());
|
||||
ImageView iv_guild_image = helper.getView(R.id.iv_guild_image);
|
||||
// ImageLoadUtilsV2.loadImage(iv_guild_image, item.getLevelIcon());
|
||||
helper.setText(R.id.tv_name, item.getHallName());
|
||||
|
||||
TextView tvApply = helper.getView(R.id.tvApply);
|
||||
if(item.getApplyBtnStatus() == 0){
|
||||
tvApply.setVisibility(View.GONE);
|
||||
}else if(item.getApplyBtnStatus() == 1){
|
||||
tvApply.setVisibility(View.VISIBLE);
|
||||
tvApply.setSelected(true);
|
||||
tvApply.setText(mContext.getString(R.string.apply_join));
|
||||
}else if(item.getApplyBtnStatus() == 2){
|
||||
tvApply.setVisibility(View.VISIBLE);
|
||||
tvApply.setSelected(false);
|
||||
tvApply.setText(mContext.getString(R.string.have_apply));
|
||||
}
|
||||
helper.addOnClickListener(R.id.tvApply);
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -3,17 +3,19 @@ package com.yizhuan.erban.association.fragment
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.association.AssociationViewModel
|
||||
import com.yizhuan.erban.association.adapter.AssociationAdapter
|
||||
import com.yizhuan.erban.base.BaseViewBindingFragment
|
||||
import com.yizhuan.erban.common.EmptyViewHelper
|
||||
import com.yizhuan.erban.databinding.FragmentAssociationBinding
|
||||
import com.yizhuan.erban.association.AssociationViewModel
|
||||
import com.yizhuan.erban.association.adapter.AssociationAdapter
|
||||
import com.yizhuan.erban.module_hall.hall.activity.ModuleClanActivity
|
||||
import com.yizhuan.erban.ui.utils.RVDelegate
|
||||
import com.yizhuan.xchat_android_core.association.ClanListInfo
|
||||
import com.yizhuan.xchat_android_core.utils.Logger
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
|
||||
|
||||
@@ -31,11 +33,10 @@ class AssociationFragment : BaseViewBindingFragment<FragmentAssociationBinding>(
|
||||
private lateinit var associationAdapter: AssociationAdapter
|
||||
private lateinit var rvDelegate: RVDelegate<ClanListInfo>
|
||||
|
||||
private val associationViewModel: AssociationViewModel by activityViewModels()
|
||||
private val associationViewModel: AssociationViewModel by viewModels()
|
||||
|
||||
override fun init() {
|
||||
associationAdapter =
|
||||
AssociationAdapter()
|
||||
associationAdapter = AssociationAdapter()
|
||||
associationAdapter.onItemClickListener =
|
||||
BaseQuickAdapter.OnItemClickListener { _: BaseQuickAdapter<*, *>?, _: View?, position: Int ->
|
||||
val info = associationAdapter.getItem(position)
|
||||
@@ -44,7 +45,7 @@ class AssociationFragment : BaseViewBindingFragment<FragmentAssociationBinding>(
|
||||
}
|
||||
}
|
||||
rvDelegate = RVDelegate.Builder<ClanListInfo>()
|
||||
.setAdapter(associationAdapter)
|
||||
.setLayoutManager(LinearLayoutManager(context))
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setEmptyView(
|
||||
EmptyViewHelper.createEmptyView(
|
||||
@@ -52,12 +53,13 @@ class AssociationFragment : BaseViewBindingFragment<FragmentAssociationBinding>(
|
||||
ResUtil.getString(R.string.association_list_empty)
|
||||
)
|
||||
)
|
||||
.setLayoutManager(LinearLayoutManager(mContext))
|
||||
.setAdapter(associationAdapter)
|
||||
.build()
|
||||
|
||||
associationViewModel.clanListLiveData.observe(this) {
|
||||
rvDelegate.loadData(it)
|
||||
associationViewModel.clanListLiveData.observe(viewLifecycleOwner) {
|
||||
associationAdapter.setNewData(it)
|
||||
}
|
||||
|
||||
associationViewModel.getClanList()
|
||||
}
|
||||
|
||||
|
@@ -1,19 +1,26 @@
|
||||
package com.yizhuan.erban.association.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.text.TextUtils
|
||||
import android.view.KeyEvent
|
||||
import android.view.View
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.widget.TextView
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.association.AssociationViewModel
|
||||
import com.yizhuan.erban.association.adapter.AssociationRoomAdapter
|
||||
import com.yizhuan.erban.base.BaseViewBindingFragment
|
||||
import com.yizhuan.erban.common.EmptyViewHelper
|
||||
import com.yizhuan.erban.databinding.FragmentAssociationRoomBinding
|
||||
import com.yizhuan.erban.association.AssociationViewModel
|
||||
import com.yizhuan.erban.association.adapter.AssociationAdapter
|
||||
import com.yizhuan.erban.association.adapter.AssociationRoomAdapter
|
||||
import com.yizhuan.erban.module_hall.hall.activity.ModuleHallActivity
|
||||
import com.yizhuan.erban.ui.utils.RVDelegate
|
||||
import com.yizhuan.xchat_android_core.association.HallListInfo
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.HallModel
|
||||
import com.yizhuan.xchat_android_core.utils.net.BeanObserver
|
||||
import com.yizhuan.xchat_android_core.utils.net.RxHelper
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
|
||||
|
||||
@@ -31,14 +38,66 @@ class AssociationRoomFragment : BaseViewBindingFragment<FragmentAssociationRoomB
|
||||
private lateinit var associationRoomAdapter: AssociationRoomAdapter
|
||||
private lateinit var rvDelegate: RVDelegate<HallListInfo>
|
||||
|
||||
private val associationViewModel: AssociationViewModel by activityViewModels()
|
||||
private val associationViewModel: AssociationViewModel by viewModels()
|
||||
|
||||
override fun init() {
|
||||
binding.mTvSearch.setOnClickListener {
|
||||
if (!TextUtils.isEmpty(binding.etSearch.text.toString())) {
|
||||
val hallList = rvDelegate.adapter.data
|
||||
val list = hallList.filter { it.hallName.contains(binding.mTvSearch.text.toString()) }
|
||||
rvDelegate.setNewData(list)
|
||||
}else{
|
||||
toast(getString(R.string.search_input_room_or_id))
|
||||
}
|
||||
}
|
||||
binding.etSearch.setOnEditorActionListener(TextView.OnEditorActionListener { v, actionId, event -> //以下方法防止两次发送请求
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH && event != null || event != null && event.keyCode == KeyEvent.KEYCODE_ENTER) {
|
||||
if (event.action == KeyEvent.ACTION_UP) { //发送请求
|
||||
val newStr: String = binding.etSearch.text.toString().trim { it <= ' ' }
|
||||
if (!TextUtils.isEmpty(newStr)) {
|
||||
val hallList = rvDelegate.adapter.data
|
||||
val list = hallList.filter { it.hallName.contains(newStr) }
|
||||
rvDelegate.setNewData(list)
|
||||
} else {
|
||||
toast(getString(R.string.search_input_room_or_id))
|
||||
}
|
||||
return@OnEditorActionListener true //自己消费
|
||||
}
|
||||
return@OnEditorActionListener true
|
||||
}
|
||||
false
|
||||
})
|
||||
associationRoomAdapter = AssociationRoomAdapter()
|
||||
associationRoomAdapter.onItemClickListener =
|
||||
BaseQuickAdapter.OnItemClickListener { _: BaseQuickAdapter<*, *>?, _: View?, position: Int ->
|
||||
|
||||
val info = associationRoomAdapter.getItem(position)
|
||||
ModuleHallActivity.start(
|
||||
context,
|
||||
info?.hallId ?: 0L,
|
||||
info?.ownerUid ?: 0L
|
||||
)
|
||||
}
|
||||
associationRoomAdapter.setOnItemChildClickListener { adapter, view, position ->
|
||||
val bean = associationRoomAdapter.getItem(position)
|
||||
bean?.let {
|
||||
dialogManager.showProgressDialog(context)
|
||||
HallModel.get().applyJoinHall(it.hallId)
|
||||
.compose(RxHelper.bindFragment(this))
|
||||
.subscribe(object : BeanObserver<String?>() {
|
||||
override fun onErrorMsg(error: String) {
|
||||
dialogManager.dismissDialog()
|
||||
toast(error)
|
||||
}
|
||||
|
||||
override fun onSuccess(s: String) {
|
||||
dialogManager.dismissDialog()
|
||||
it.applyBtnStatus = 2
|
||||
associationRoomAdapter.notifyItemChanged(position)
|
||||
toast(s)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
rvDelegate = RVDelegate.Builder<HallListInfo>()
|
||||
.setAdapter(associationRoomAdapter)
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
@@ -52,9 +111,15 @@ class AssociationRoomFragment : BaseViewBindingFragment<FragmentAssociationRoomB
|
||||
.build()
|
||||
|
||||
associationViewModel.hallListLiveData.observe(this) {
|
||||
rvDelegate.loadData(it)
|
||||
rvDelegate.setNewData(it)
|
||||
}
|
||||
|
||||
associationViewModel.getHallList()
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
dialogManager.dismissDialog()
|
||||
}
|
||||
|
||||
}
|
@@ -12,6 +12,7 @@ import com.yizhuan.erban.base.BaseViewBindingActivity
|
||||
import com.yizhuan.erban.databinding.ActivityAssociationBinding
|
||||
import com.yizhuan.erban.association.fragment.AssociationFragment
|
||||
import com.yizhuan.erban.association.fragment.AssociationRoomFragment
|
||||
import com.yizhuan.erban.common.CommonPagerAdapter
|
||||
import com.yizhuan.erban.ui.user.adapter.CommonWrapIndicatorAdapter
|
||||
import com.yizhuan.erban.ui.user.adapter.UserInfoPagerAdapter
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator
|
||||
@@ -40,7 +41,7 @@ class AssociationActivity : BaseViewBindingActivity<ActivityAssociationBinding>(
|
||||
val viewPager: ViewPager = binding.viewPagerDetail
|
||||
val magicIndicator: MagicIndicator = binding.magicIndicator
|
||||
val fragmentList: MutableList<Fragment> = ArrayList()
|
||||
val pagerAdapter = UserInfoPagerAdapter(supportFragmentManager, fragmentList)
|
||||
val pagerAdapter = CommonPagerAdapter(supportFragmentManager, fragmentList)
|
||||
val tagList: MutableList<String> = ArrayList()
|
||||
tagList.add(getString(R.string.me_association))
|
||||
tagList.add(getString(R.string.me_room))
|
||||
|
@@ -333,8 +333,7 @@ class MeFragment : BaseFragment(), View.OnClickListener {
|
||||
ModuleHallActivity.start(
|
||||
context,
|
||||
clanAndHallInfo?.hall?.hallId ?: 0L,
|
||||
clanAndHallInfo?.hall?.ownerUid ?: 0L,
|
||||
clanAndHallInfo?.clan?.elderUid ?: 0L
|
||||
clanAndHallInfo?.hall?.ownerUid ?: 0L
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@@ -58,7 +58,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
||||
onFindViews();
|
||||
onSetListener();
|
||||
setProtocol();
|
||||
AppUpgradeHelper.checkAppUpgrade(this, false, false);
|
||||
AppUpgradeHelper.checkAppUpgrade(this);
|
||||
}
|
||||
|
||||
private void onFindViews() {
|
||||
|
@@ -139,7 +139,7 @@ public class SettingActivity extends BaseActivity implements View.OnClickListene
|
||||
PermissionGuideActivity.Companion.start(context);
|
||||
break;
|
||||
case R.id.rly_check:
|
||||
AppUpgradeHelper.checkAppUpgrade(this, true, false, getDialogManager());
|
||||
AppUpgradeHelper.checkAppUpgrade(this, getDialogManager());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -117,8 +117,7 @@ class UserInfoInfoFragment : BaseViewBindingFragment<FragmentUserinfoUserinfoBin
|
||||
ModuleHallActivity.start(
|
||||
context,
|
||||
hallInfo.hallId,
|
||||
hallInfo.ownerUid,
|
||||
vm.userId
|
||||
hallInfo.ownerUid
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:color="@color/color_FFFFFF" android:state_selected="true" />
|
||||
<item android:color="@color/color_6D6B89" />
|
||||
|
||||
</selector>
|
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:color="@color/color_9168FA" android:state_selected="true" />
|
||||
<item android:color="@color/color_B3B3C3" />
|
||||
|
||||
</selector>
|
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="@color/color_E6E6F0" />
|
||||
|
||||
<corners android:radius="@dimen/dp_3" />
|
||||
|
||||
</shape>
|
5
app/src/main/res/drawable/bg_time_date_select.xml
Normal file
5
app/src/main/res/drawable/bg_time_date_select.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/bg_time_date_select_normal" android:state_selected="true" />
|
||||
<item android:drawable="@drawable/bg_time_date_disable_select" android:state_selected="false" />
|
||||
</selector>
|
13
app/src/main/res/drawable/bg_time_date_select_normal.xml
Normal file
13
app/src/main/res/drawable/bg_time_date_select_normal.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#EEDCFF"
|
||||
android:startColor="#CCF8F9"
|
||||
android:type="linear"
|
||||
android:useLevel="true" />
|
||||
<corners android:radius="@dimen/dp_3" />
|
||||
|
||||
</shape>
|
7
app/src/main/res/drawable/shape_white_top_18dp.xml
Normal file
7
app/src/main/res/drawable/shape_white_top_18dp.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/white"/>
|
||||
<corners android:topLeftRadius="@dimen/dp_18"
|
||||
android:topRightRadius="@dimen/dp_18"/>
|
||||
</shape>
|
@@ -18,16 +18,11 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title_bar"/>
|
||||
android:layout_marginTop="@dimen/dp_10" />
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/viewPagerDetail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/magicIndicator"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</LinearLayout>
|
@@ -4,8 +4,55 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llSearch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="32dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:background="@drawable/bg_search_user"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etSearch"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="30dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:gravity="center_vertical"
|
||||
android:imeOptions="actionSearch"
|
||||
android:singleLine="true"
|
||||
android:hint="@string/search_room_or_id"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textColorHint="@color/text_color_secondary"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mTvSearch"
|
||||
android:text="@string/search"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/color_white"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:paddingEnd="@dimen/dp_20"
|
||||
android:paddingTop="@dimen/dp_3"
|
||||
android:paddingBottom="@dimen/dp_3"
|
||||
android:layout_marginEnd="@dimen/dp_3"
|
||||
android:background="@drawable/bg_common_confirm_press"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:layout_marginBottom="@dimen/dp_3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never"
|
||||
|
@@ -168,6 +168,8 @@
|
||||
<string name="no_attention_text">你還沒有關註任何Peko好友哦! \n快去添加關註吧!</string>
|
||||
<string name="search_hint">搜索昵稱或ID</string>
|
||||
<string name="search_user_id">搜索用戶ID</string>
|
||||
<string name="search_room_or_id">搜索房間名稱或ID</string>
|
||||
<string name="search_input_room_or_id">請輸入房間名稱或ID</string>
|
||||
<string name="online">在線中…</string>
|
||||
<string name="me_customer_server">客服</string>
|
||||
|
||||
@@ -4942,5 +4944,10 @@
|
||||
<string name="all_pay_diamond">總支出%s鉆</string>
|
||||
<string name="take_to_you_later">以後再説</string>
|
||||
<string name="no_gift_now">暫時沒有禮物</string>
|
||||
<string name="have_apply">已申請</string>
|
||||
<string name="apply_join">申請加入</string>
|
||||
<string name="clan_day">日</string>
|
||||
<string name="clan_week">周</string>
|
||||
<string name="clan_month">月</string>
|
||||
|
||||
</resources>
|
@@ -3,68 +3,79 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/cl_root"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginTop="@dimen/dp_18"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_18"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_guild"
|
||||
android:background="@drawable/guild_one"
|
||||
android:layout_width="@dimen/dp_22"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:background="@drawable/guild_one"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_guild"
|
||||
tools:text="1"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
tools:text="1" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/iv_guild_icon"
|
||||
android:src="@drawable/default_avatar"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"/>
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:src="@drawable/default_avatar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
tools:text="公會名稱"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textStyle="bold"
|
||||
tools:text="公會名稱" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"/>
|
||||
android:layout_weight="1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_guild_image"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"/>
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="@dimen/dp_6" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvApply"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="25dp"
|
||||
android:background="@drawable/bg_common_select"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_selector_6d6b89_false_ffffff"
|
||||
android:textSize="@dimen/sp_12"
|
||||
tools:text="@string/have_apply" />
|
||||
|
||||
</LinearLayout>
|
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/cl_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_18"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_guild"
|
||||
android:layout_width="@dimen/dp_22"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:background="@drawable/guild_one"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_guild"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="1" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/iv_guild_icon"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:src="@drawable/default_avatar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textStyle="bold"
|
||||
tools:text="公會名稱" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvApply"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/bg_common_select"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_selector_6d6b89_false_ffffff"
|
||||
android:textSize="@dimen/sp_12"
|
||||
tools:text="@string/have_apply" />
|
||||
|
||||
</LinearLayout>
|
@@ -283,5 +283,6 @@ public class ClanIncomeActivity extends BaseMvpActivity<IIncomeStatisticsView, C
|
||||
protected void setStatusBar() {
|
||||
super.setStatusBar();
|
||||
StatusBarUtil.transparencyBar(this);
|
||||
StatusBarUtil.StatusBarLightMode(this);
|
||||
}
|
||||
}
|
||||
|
@@ -164,7 +164,7 @@ public class ModuleClanActivity extends BaseActivity implements View.OnClickList
|
||||
hallListAdapter.setOnItemClickListener((adapter, view, position) -> {
|
||||
HallInfo hallInfo = hallListAdapter.getItem(position);
|
||||
if (hallInfo != null) {
|
||||
ModuleHallActivity.start(context, hallInfo.getHallId(), hallInfo.getOwnerUid(), otherUid);
|
||||
ModuleHallActivity.start(context, hallInfo.getHallId(), hallInfo.getOwnerUid());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -63,7 +63,6 @@ public class ModuleHallActivity extends BaseMvpActivity<IModuleHallView, ModuleH
|
||||
private boolean isSelfHall;
|
||||
private long hallId;
|
||||
private long ownerUid;
|
||||
private long otherUid;
|
||||
|
||||
@Nullable
|
||||
private HallInfo hallInfo;
|
||||
@@ -72,18 +71,17 @@ public class ModuleHallActivity extends BaseMvpActivity<IModuleHallView, ModuleH
|
||||
private long mTargetUid;
|
||||
private int mCount;
|
||||
|
||||
public static void start(Context context, long hallId, long ownerUid, long otherUid) {
|
||||
public static void start(Context context, long hallId, long ownerUid) {
|
||||
Intent intent = new Intent(context, ModuleHallActivity.class);
|
||||
intent.putExtra(KEY_HALL_ID, hallId);
|
||||
intent.putExtra(KEY_OWNER_UID, ownerUid);
|
||||
intent.putExtra(KEY_OTHER_UID, otherUid);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public static void start(Context context) {
|
||||
StatisticManager.Instance().onEvent(BasicConfig.INSTANCE.getAppContext(),
|
||||
StatisticsProtocol.MY_HALL_CLICK, ResUtil.getString(R.string.hall_activity_modulehallactivity_01), null);
|
||||
start(context, HallModel.get().getHallId(), AuthModel.get().getCurrentUid(), AuthModel.get().getCurrentUid());
|
||||
start(context, HallModel.get().getHallId(), AuthModel.get().getCurrentUid());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -98,7 +96,6 @@ public class ModuleHallActivity extends BaseMvpActivity<IModuleHallView, ModuleH
|
||||
binding.tvExit.setOnClickListener(this);
|
||||
hallId = getIntent().getLongExtra(KEY_HALL_ID, HallModel.get().getHallId());
|
||||
ownerUid = getIntent().getLongExtra(KEY_OWNER_UID, AuthModel.get().getCurrentUid());
|
||||
otherUid = getIntent().getLongExtra(KEY_OTHER_UID, AuthModel.get().getCurrentUid());
|
||||
isSelfHall = hallId == HallModel.get().getHallId();
|
||||
binding.recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||
binding.recyclerView.setFocusable(false);
|
||||
|
@@ -22,9 +22,11 @@ import com.jzxiang.pickerview.data.Type;
|
||||
import com.jzxiang.pickerview.data.WheelCalendar;
|
||||
import com.jzxiang.pickerview.listener.OnDateSetListener;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.UIUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.TimeUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.UIUtils;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
@@ -36,6 +38,9 @@ public class TimePickerDialog extends DialogFragment implements View.OnClickList
|
||||
RelativeLayout rlWeekGroup;
|
||||
TextView tvWeekFirstDay;
|
||||
TextView tvWeekLastDay;
|
||||
TextView tvDay;
|
||||
TextView tvWeek;
|
||||
TextView tvMonth;
|
||||
private TimeWheel mTimeWheel;
|
||||
private long mCurrentMillSeconds;
|
||||
private long mFirstMs;
|
||||
@@ -108,10 +113,10 @@ public class TimePickerDialog extends DialogFragment implements View.OnClickList
|
||||
Context context = view.getContext();
|
||||
TextView cancel = view.findViewById(R.id.tv_cancel);
|
||||
cancel.setOnClickListener(this);
|
||||
cancel.setTextColor(context.getResources().getColor(R.color.color_999999));
|
||||
cancel.setTextColor(context.getResources().getColor(R.color.color_b3b3b3));
|
||||
TextView sure = view.findViewById(R.id.tv_sure);
|
||||
sure.setOnClickListener(this);
|
||||
sure.setTextColor(context.getResources().getColor(R.color.app_248cfe));
|
||||
sure.setTextColor(context.getResources().getColor(R.color.color_1F1A4E));
|
||||
TextView title = view.findViewById(R.id.tv_title);
|
||||
View toolbar = view.findViewById(R.id.toolbar);
|
||||
|
||||
@@ -122,6 +127,14 @@ public class TimePickerDialog extends DialogFragment implements View.OnClickList
|
||||
tvWeekLastDay.setSelected(mIsWeek);
|
||||
rlWeekGroup.setVisibility(mIsWeek || isDay ? View.VISIBLE : View.GONE);
|
||||
|
||||
tvDay = view.findViewById(R.id.tvDay);
|
||||
tvWeek = view.findViewById(R.id.tvWeek);
|
||||
tvMonth = view.findViewById(R.id.tvMonth);
|
||||
tvDay.setOnClickListener(this);
|
||||
tvWeek.setOnClickListener(this);
|
||||
tvMonth.setOnClickListener(this);
|
||||
tvDay.setSelected(true);
|
||||
|
||||
if (isDay) {
|
||||
if (mDayFirstTime != mDayLastTime) {
|
||||
tvWeekLastDay.setText(TimeUtils.getDateTimeString(mDayLastTime, TimeUtils.DATE_FORMAT));
|
||||
@@ -145,7 +158,7 @@ public class TimePickerDialog extends DialogFragment implements View.OnClickList
|
||||
if (isMonth) {
|
||||
mPickerConfig.mType = Type.YEAR_MONTH;
|
||||
}
|
||||
toolbar.setBackgroundColor(context.getResources().getColor(R.color.white));
|
||||
toolbar.setBackgroundResource(R.drawable.shape_white_top_18dp);
|
||||
|
||||
mTimeWheel = new TimeWheel(view, mPickerConfig);
|
||||
Calendar currCalendar = Calendar.getInstance();
|
||||
@@ -207,6 +220,23 @@ public class TimePickerDialog extends DialogFragment implements View.OnClickList
|
||||
dismiss();
|
||||
} else if (i == R.id.tv_sure) {
|
||||
sureClicked();
|
||||
}else if(i == R.id.tvDay) {
|
||||
tvDay.setSelected(true);
|
||||
tvWeek.setSelected(false);
|
||||
tvMonth.setSelected(false);
|
||||
isDay = true;
|
||||
|
||||
}else if(i == R.id.tvWeek) {
|
||||
tvDay.setSelected(false);
|
||||
tvWeek.setSelected(true);
|
||||
tvMonth.setSelected(false);
|
||||
mIsWeek = true;
|
||||
|
||||
}else if(i == R.id.tvMonth) {
|
||||
tvDay.setSelected(false);
|
||||
tvWeek.setSelected(false);
|
||||
tvMonth.setSelected(true);
|
||||
isMonth = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 428 B |
Binary file not shown.
Before Width: | Height: | Size: 418 B |
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#363E45"
|
||||
android:startColor="#2B4658"
|
||||
android:type="linear"
|
||||
android:useLevel="true" />
|
||||
<corners android:radius="@dimen/dp_10" />
|
||||
|
||||
</shape>
|
@@ -3,6 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@color/bg_normal_1c1b22"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -23,23 +24,23 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="81dp"
|
||||
android:layout_height="75dp"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:background="@drawable/bg_income">
|
||||
android:background="@drawable/bg_gradient_363e45_2b4658_r10">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_year"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:textColor="@color/white_transparent_80"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textSize="@dimen/sp_10"
|
||||
tools:text="@string/layout_activity_clan_income_01" />
|
||||
|
||||
<LinearLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/ll_day_group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="31dp"
|
||||
@@ -54,60 +55,68 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_15"
|
||||
tools:text="@string/layout_activity_clan_income_02" />
|
||||
android:textSize="@dimen/sp_14"
|
||||
tools:text="@string/layout_activity_clan_income_02"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_month_day_end"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_month_day_end"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:visibility="gone"
|
||||
tools:text="@string/layout_activity_clan_income_03" />
|
||||
tools:text="@string/layout_activity_clan_income_03"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_month_day_start"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
</LinearLayout>
|
||||
<ImageView
|
||||
android:id="@+id/iv_date_arrow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/icon_date_arrow"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_month_day_start"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_month_day_start"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_month_day_start"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_date_arrow"
|
||||
android:layout_width="11dp"
|
||||
android:layout_height="7dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="@dimen/dp_18"
|
||||
android:layout_marginBottom="21dp"
|
||||
android:layout_toEndOf="@id/ll_day_group"
|
||||
android:src="@drawable/icon_date_arrow" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line"
|
||||
android:layout_width="2px"
|
||||
android:layout_height="31dp"
|
||||
android:layout_width="0.5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="@dimen/dp_18"
|
||||
android:layout_marginBottom="@dimen/dp_9"
|
||||
android:layout_toEndOf="@id/iv_date_arrow"
|
||||
android:background="@color/white" />
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_13"
|
||||
android:layout_marginBottom="13dp"
|
||||
android:layout_toEndOf="@id/ll_day_group"
|
||||
android:background="@color/white_transparent_10" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAllIncome"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_19"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_28"
|
||||
android:layout_toEndOf="@id/view_line"
|
||||
android:text="@string/all_income"
|
||||
android:textColor="@color/white_transparent_80"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_total"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="@dimen/dp_19"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:layout_toEndOf="@id/view_line"
|
||||
android:layout_below="@+id/tvAllIncome"
|
||||
tools:text="1,000,000,000"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="24dp" />
|
||||
android:textSize="@dimen/sp_16" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
@@ -3,6 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:gravity="bottom"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -10,6 +11,54 @@
|
||||
android:id="@+id/toolbar"
|
||||
layout="@layout/timepicker_toolbar" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:paddingTop="@dimen/dp_20"
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
android:background="@color/white"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDay"
|
||||
android:text="@string/clan_day"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="24dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/bg_time_date_select"
|
||||
android:textColor="@color/color_selector_9168fa_false_b3b3c3"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tvWeek"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvWeek"
|
||||
android:text="@string/clan_week"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="24dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/bg_time_date_select"
|
||||
android:textColor="@color/color_selector_9168fa_false_b3b3c3"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/tvDay"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tvMonth"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMonth"
|
||||
android:text="@string/clan_month"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="24dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/bg_time_date_select"
|
||||
android:textColor="@color/color_selector_9168fa_false_b3b3c3"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/tvWeek"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_week_group"
|
||||
android:layout_width="match_parent"
|
||||
|
@@ -10,8 +10,10 @@ import com.yizhuan.xchat_android_core.upgrade.bean.NewestVersionInfo;
|
||||
import com.yizhuan.xchat_android_core.upgrade.bean.UpgradeCache;
|
||||
import com.yizhuan.xchat_android_core.upgrade.model.UpgradeModel;
|
||||
import com.yizhuan.xchat_android_core.utils.ActivityUtil;
|
||||
import com.yizhuan.xchat_android_core.utils.Logger;
|
||||
import com.yizhuan.xchat_android_library.utils.AppMetaDataUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
|
||||
import com.yizhuan.xchat_android_library.utils.config.BasicConfig;
|
||||
|
||||
/**
|
||||
* @author jack
|
||||
@@ -22,23 +24,10 @@ public class AppUpgradeHelper {
|
||||
|
||||
/**
|
||||
* 点击设置
|
||||
*
|
||||
* @param isUserAuto ture 表示,是用户主动发起的请求,比如设置页点更新
|
||||
* @param isPush ture 表示是后台推送
|
||||
*/
|
||||
@SuppressLint("CheckResult")
|
||||
public static void checkAppUpgrade(RxAppCompatActivity activity, boolean isUserAuto,
|
||||
boolean isPush, DialogManager dialogManager) {
|
||||
|
||||
if (isPush) {
|
||||
//如果是后台推送,统一拦截
|
||||
} else {
|
||||
if (!isUserAuto && UpgradeModel.get().isHasShowDialog()) {
|
||||
//如果已经弹窗过,则不再调用接口了
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public static void checkAppUpgrade(RxAppCompatActivity activity,
|
||||
DialogManager dialogManager) {
|
||||
dialogManager.showProgressDialog(activity);
|
||||
UpgradeModel.get()
|
||||
.checkUpgrade()
|
||||
@@ -51,47 +40,15 @@ public class AppUpgradeHelper {
|
||||
if (!ActivityUtil.isCanShowAppCompatDialog(activity)) {
|
||||
return;
|
||||
}
|
||||
//如果是强更就直接弹,不走限制的逻辑
|
||||
boolean forceUpdate = newestVersionInfo.getUpdateStatus()
|
||||
== NewestVersionInfo.STATUS_FORCE_UPDATE;
|
||||
|
||||
if (isPush && !forceUpdate) {
|
||||
//如果收到推送,但是获取到不是强更版本,不处理
|
||||
if (AppVersionUtil.compareVersion(newestVersionInfo.getUpdateVersion(), BasicConfig.getLocalVersionName(activity)) <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
boolean needShow = true;
|
||||
if (!forceUpdate) {
|
||||
//是否需要计入缓存
|
||||
boolean isNeedCount = !isUserAuto && !isPush;
|
||||
|
||||
|
||||
if (isNeedCount) {
|
||||
UpgradeCache cache = AppUpgradeDataMrg.getCache();
|
||||
needShow = AppUpgradeDataMrg.isNeedDialog(
|
||||
cache, newestVersionInfo.getUpdateVersion());
|
||||
if (needShow) {
|
||||
//保存缓存
|
||||
AppUpgradeDataMrg.saveCache(cache,
|
||||
newestVersionInfo.getUpdateVersion());
|
||||
}
|
||||
}
|
||||
}
|
||||
//如果是强更,一定要弹窗
|
||||
if (forceUpdate || needShow) {
|
||||
AppUpdateDialog appUpdateDialog = new AppUpdateDialog();
|
||||
appUpdateDialog.setNewestVersionInfo(newestVersionInfo);
|
||||
appUpdateDialog.show(activity.getSupportFragmentManager());
|
||||
UpgradeModel.get().setHasShowDialog(true);
|
||||
}
|
||||
AppUpdateDialog appUpdateDialog = new AppUpdateDialog();
|
||||
appUpdateDialog.setNewestVersionInfo(newestVersionInfo);
|
||||
appUpdateDialog.show(activity.getSupportFragmentManager());
|
||||
}
|
||||
} else {
|
||||
if (!isUserAuto) {
|
||||
return;
|
||||
}
|
||||
if (isPush) {
|
||||
return;
|
||||
}
|
||||
Logger.error("AppUpgradeHelper",throwable.getMessage());
|
||||
SingleToastUtil.showToastShort(throwable.getMessage());
|
||||
}
|
||||
});
|
||||
@@ -99,20 +56,13 @@ public class AppUpgradeHelper {
|
||||
|
||||
/**
|
||||
* 非用户主动点击
|
||||
*
|
||||
* @param isUserAuto ture 表示,是用户主动发起的请求,比如设置页点更新
|
||||
* @param isPush ture 表示是后台推送
|
||||
*/
|
||||
@SuppressLint("CheckResult")
|
||||
public static void checkAppUpgrade(RxAppCompatActivity activity, boolean isUserAuto, boolean isPush) {
|
||||
public static void checkAppUpgrade(RxAppCompatActivity activity) {
|
||||
|
||||
if (isPush) {
|
||||
//如果是后台推送,统一拦截
|
||||
} else {
|
||||
if (!isUserAuto && UpgradeModel.get().isHasShowDialog()) {
|
||||
//如果已经弹窗过,则不再调用接口了
|
||||
return;
|
||||
}
|
||||
if (UpgradeModel.get().isHasShowDialog()) {
|
||||
//如果已经弹窗过,则不再调用接口了
|
||||
return;
|
||||
}
|
||||
|
||||
UpgradeModel.get()
|
||||
@@ -125,29 +75,22 @@ public class AppUpgradeHelper {
|
||||
if (!ActivityUtil.isCanShowAppCompatDialog(activity)) {
|
||||
return;
|
||||
}
|
||||
if (AppVersionUtil.compareVersion(newestVersionInfo.getUpdateVersion(), BasicConfig.getLocalVersionName(activity)) <= 0) {
|
||||
return;
|
||||
}
|
||||
//如果是强更就直接弹,不走限制的逻辑
|
||||
boolean forceUpdate = newestVersionInfo.getUpdateStatus()
|
||||
== NewestVersionInfo.STATUS_FORCE_UPDATE;
|
||||
|
||||
if (isPush && !forceUpdate) {
|
||||
//如果收到推送,但是获取到不是强更版本,不处理
|
||||
return;
|
||||
}
|
||||
|
||||
boolean needShow = true;
|
||||
if (!forceUpdate) {
|
||||
//是否需要计入缓存
|
||||
boolean isNeedCount = !isUserAuto && !isPush;
|
||||
|
||||
if (isNeedCount) {
|
||||
UpgradeCache cache = AppUpgradeDataMrg.getCache();
|
||||
needShow = AppUpgradeDataMrg.isNeedDialog(
|
||||
cache, newestVersionInfo.getUpdateVersion());
|
||||
if (needShow) {
|
||||
//保存缓存
|
||||
AppUpgradeDataMrg.saveCache(cache,
|
||||
newestVersionInfo.getUpdateVersion());
|
||||
}
|
||||
UpgradeCache cache = AppUpgradeDataMrg.getCache();
|
||||
needShow = AppUpgradeDataMrg.isNeedDialog(
|
||||
cache, newestVersionInfo.getUpdateVersion());
|
||||
if (needShow) {
|
||||
//保存缓存
|
||||
AppUpgradeDataMrg.saveCache(cache,
|
||||
newestVersionInfo.getUpdateVersion());
|
||||
}
|
||||
}
|
||||
//如果是强更,一定要弹窗
|
||||
@@ -159,27 +102,17 @@ public class AppUpgradeHelper {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!isUserAuto) {
|
||||
return;
|
||||
}
|
||||
if (isPush) {
|
||||
return;
|
||||
}
|
||||
SingleToastUtil.showToastShort(throwable.getMessage());
|
||||
Logger.error("AppUpgradeHelper",throwable.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送
|
||||
*
|
||||
* @param isUserAuto ture 表示,是用户主动发起的请求,比如设置页点更新
|
||||
* @param isPush ture 表示是后台推送
|
||||
* @param newestVersionInfo 后台返回数据
|
||||
*/
|
||||
@SuppressLint("CheckResult")
|
||||
public static void checkAppUpgrade(RxAppCompatActivity activity, boolean isUserAuto,
|
||||
boolean isPush, NewestVersionInfo newestVersionInfo) {
|
||||
public static void checkAppUpgrade(RxAppCompatActivity activity, NewestVersionInfo newestVersionInfo) {
|
||||
if (newestVersionInfo.getUpdateStatus() == NewestVersionInfo.STATUS_FORCE_UPDATE ||
|
||||
newestVersionInfo.getUpdateStatus() == NewestVersionInfo.STATUS_RECOMMEND_UPDATE) {
|
||||
if (!ActivityUtil.isCanShowAppCompatDialog(activity)) {
|
||||
@@ -188,29 +121,22 @@ public class AppUpgradeHelper {
|
||||
if (!newestVersionInfo.getUpdateOs().equals(Constants.ANDROID) || !newestVersionInfo.getUpdateChannel().equals(AppMetaDataUtil.getChannelID())) {
|
||||
return;
|
||||
}
|
||||
if (AppVersionUtil.compareVersion(newestVersionInfo.getUpdateVersion(), BasicConfig.getLocalVersionName(activity)) <= 0) {
|
||||
return;
|
||||
}
|
||||
//如果是强更就直接弹,不走限制的逻辑
|
||||
boolean forceUpdate = newestVersionInfo.getUpdateStatus()
|
||||
== NewestVersionInfo.STATUS_FORCE_UPDATE;
|
||||
|
||||
if (isPush && !forceUpdate) {
|
||||
//如果收到推送,但是获取到不是强更版本,不处理
|
||||
return;
|
||||
}
|
||||
|
||||
boolean needShow = true;
|
||||
if (!forceUpdate) {
|
||||
//是否需要计入缓存
|
||||
boolean isNeedCount = !isUserAuto && !isPush;
|
||||
|
||||
if (isNeedCount) {
|
||||
UpgradeCache cache = AppUpgradeDataMrg.getCache();
|
||||
needShow = AppUpgradeDataMrg.isNeedDialog(
|
||||
cache, newestVersionInfo.getUpdateVersion());
|
||||
if (needShow) {
|
||||
//保存缓存
|
||||
AppUpgradeDataMrg.saveCache(cache,
|
||||
newestVersionInfo.getUpdateVersion());
|
||||
}
|
||||
UpgradeCache cache = AppUpgradeDataMrg.getCache();
|
||||
needShow = AppUpgradeDataMrg.isNeedDialog(
|
||||
cache, newestVersionInfo.getUpdateVersion());
|
||||
if (needShow) {
|
||||
//保存缓存
|
||||
AppUpgradeDataMrg.saveCache(cache,
|
||||
newestVersionInfo.getUpdateVersion());
|
||||
}
|
||||
}
|
||||
//如果是强更,一定要弹窗
|
||||
@@ -218,7 +144,6 @@ public class AppUpgradeHelper {
|
||||
AppUpdateDialog appUpdateDialog = new AppUpdateDialog();
|
||||
appUpdateDialog.setNewestVersionInfo(newestVersionInfo);
|
||||
appUpdateDialog.show(activity.getSupportFragmentManager());
|
||||
UpgradeModel.get().setHasShowDialog(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -11,12 +11,12 @@ object AssociationModel : BaseModel() {
|
||||
|
||||
private val api = RxNet.create(Api::class.java)
|
||||
|
||||
suspend fun getClanList(): ListResult<ClanListInfo>? =
|
||||
suspend fun getClanList(): List<ClanListInfo>? =
|
||||
launchRequest {
|
||||
api.getClanList()
|
||||
}
|
||||
|
||||
suspend fun getHallList(): ListResult<HallListInfo>? =
|
||||
suspend fun getHallList(): List<HallListInfo>? =
|
||||
launchRequest {
|
||||
api.getHallList()
|
||||
}
|
||||
@@ -27,13 +27,13 @@ object AssociationModel : BaseModel() {
|
||||
* 获取公會周榜
|
||||
*/
|
||||
@GET("/clan/list")
|
||||
suspend fun getClanList(): ServiceResult<ListResult<ClanListInfo>>
|
||||
suspend fun getClanList(): ServiceResult<List<ClanListInfo>>
|
||||
|
||||
/**
|
||||
* 获取牌照房
|
||||
*/
|
||||
@GET("/hall/list")
|
||||
suspend fun getHallList(): ServiceResult<ListResult<HallListInfo>>
|
||||
suspend fun getHallList(): ServiceResult<List<HallListInfo>>
|
||||
|
||||
}
|
||||
|
||||
|
@@ -587,7 +587,7 @@
|
||||
<string name="community_dynamic_dynamicmodel_08">點贊</string>
|
||||
<string name="community_dynamic_dynamicmodel_09">取消贊</string>
|
||||
<string name="module_hall_hall_hallmodel_01">公會成員啟動應用</string>
|
||||
<string name="module_hall_hall_hallmodel_02">申請成功</string>
|
||||
<string name="module_hall_hall_hallmodel_02">發送成功,請耐心等待</string>
|
||||
<string name="module_hall_hall_hallmodel_03">移除廳成員成功</string>
|
||||
<string name="module_hall_hall_hallmodel_04">您的申請已提交</string>
|
||||
<string name="module_hall_hall_hallmodel_05">邀請成功</string>
|
||||
|
@@ -24,5 +24,5 @@ only_arm64=false
|
||||
|
||||
channel_file=channel.txt
|
||||
|
||||
version_name=1.1.3
|
||||
version_code=113
|
||||
version_name=1.1.7
|
||||
version_code=117
|
Reference in New Issue
Block a user