|
|
@ -68,15 +68,18 @@ public class InstantActivity extends BaseActivity<ActivityInstantBinding, Instan |
|
|
|
protected void onCreate(Bundle savedInstanceState) { |
|
|
|
protected void onCreate(Bundle savedInstanceState) { |
|
|
|
super.onCreate(savedInstanceState); |
|
|
|
super.onCreate(savedInstanceState); |
|
|
|
super.mViewModel.mActivity = this; |
|
|
|
super.mViewModel.mActivity = this; |
|
|
|
mAdapter = new SoloChatRoomAdapter(); |
|
|
|
mViewModel.localPushChatMsg = getIntent().getParcelableExtra(CommonConstant.INSTANT_LAUNCHER_RESULT_KEY); |
|
|
|
|
|
|
|
mAdapter = new SoloChatRoomAdapter(mViewModel.localPushChatMsg); |
|
|
|
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(this); |
|
|
|
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(this); |
|
|
|
mRecyclerView = findViewById(R.id.instant_recycler); |
|
|
|
mRecyclerView = findViewById(R.id.instant_recycler); |
|
|
|
mRecyclerView.setLayoutManager(mLayoutManager); |
|
|
|
mRecyclerView.setLayoutManager(mLayoutManager); |
|
|
|
mRecyclerView.setAdapter(mAdapter); |
|
|
|
mRecyclerView.setAdapter(mAdapter); |
|
|
|
refreshLayout = findViewById(R.id.instant_smart_refresh); |
|
|
|
refreshLayout = findViewById(R.id.instant_smart_refresh); |
|
|
|
|
|
|
|
refreshLayout.setEnableRefresh(false); |
|
|
|
|
|
|
|
refreshLayout.setEnableAutoLoadMore(true); |
|
|
|
|
|
|
|
refreshLayout.setEnableNestedScroll(false); |
|
|
|
refreshLayout.setEnableScrollContentWhenLoaded(true); |
|
|
|
refreshLayout.setEnableScrollContentWhenLoaded(true); |
|
|
|
refreshLayout.setOnLoadMoreListener(mViewModel::loadMore); |
|
|
|
refreshLayout.setOnLoadMoreListener(mViewModel::loadMore); |
|
|
|
refreshLayout.setDisableContentWhenRefresh(true); |
|
|
|
|
|
|
|
input_box = findViewById(R.id.instant_input_box); |
|
|
|
input_box = findViewById(R.id.instant_input_box); |
|
|
|
input_box.setFilters(new InputFilter[]{ViewFilterUtil.getNoSpecialCharactersFilter()}); |
|
|
|
input_box.setFilters(new InputFilter[]{ViewFilterUtil.getNoSpecialCharactersFilter()}); |
|
|
|
more_line = findViewById(R.id.iv_more_line); |
|
|
|
more_line = findViewById(R.id.iv_more_line); |
|
|
@ -85,7 +88,6 @@ public class InstantActivity extends BaseActivity<ActivityInstantBinding, Instan |
|
|
|
more_fill.setOnClickListener(view -> changBottomType()); |
|
|
|
more_fill.setOnClickListener(view -> changBottomType()); |
|
|
|
bottom_grid = findViewById(R.id.instant_grid); |
|
|
|
bottom_grid = findViewById(R.id.instant_grid); |
|
|
|
layout_footer = findViewById(R.id.layout_footer); |
|
|
|
layout_footer = findViewById(R.id.layout_footer); |
|
|
|
mViewModel.localPushChatMsg = getIntent().getParcelableExtra(CommonConstant.INSTANT_LAUNCHER_RESULT_KEY); |
|
|
|
|
|
|
|
mViewModel.setTitleText(mViewModel.localPushChatMsg.getUserName()); |
|
|
|
mViewModel.setTitleText(mViewModel.localPushChatMsg.getUserName()); |
|
|
|
if ("2".equals(mViewModel.localPushChatMsg.getUserType()) || "5".equals(mViewModel.localPushChatMsg.getUserType()) || "0".equals(mViewModel.localPushChatMsg.getUserType())){ |
|
|
|
if ("2".equals(mViewModel.localPushChatMsg.getUserType()) || "5".equals(mViewModel.localPushChatMsg.getUserType()) || "0".equals(mViewModel.localPushChatMsg.getUserType())){ |
|
|
|
layout_footer.setVisibility(View.INVISIBLE); |
|
|
|
layout_footer.setVisibility(View.INVISIBLE); |
|
|
|