use of net.iGap.helper.HelperToolbar in project iGap-Android by KianIranian-STDG.
the class FragmentCPayEdit method initToolbar.
private void initToolbar() {
HelperToolbar toolbar = HelperToolbar.create().setContext(getContext()).setLifecycleOwner(getViewLifecycleOwner()).setLogoShown(true).setDefaultTitle(getString(R.string.c_pay_title)).setLeftIcon(R.string.icon_back).setListener(this);
binding.fceToolbar.addView(toolbar.getView());
}
use of net.iGap.helper.HelperToolbar in project iGap-Android by KianIranian-STDG.
the class FragmentCPayInquiry method initToolbar.
private void initToolbar() {
HelperToolbar toolbar = HelperToolbar.create().setContext(getContext()).setLifecycleOwner(getViewLifecycleOwner()).setLogoShown(true).setDefaultTitle(getString(R.string.c_pay_title)).setLeftIcon(R.string.icon_back).setListener(this);
binding.fciToolbar.addView(toolbar.getView());
}
use of net.iGap.helper.HelperToolbar in project iGap-Android by KianIranian-STDG.
the class ChatRightsFragment method onCreateView.
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
if (getContext() == null)
return super.onCreateView(inflater, container, savedInstanceState);
HelperToolbar helperToolbar = HelperToolbar.create();
String title = currentMode == 0 || currentMode == 1 ? getResources().getString(R.string.admin_rights) : isRoom() ? getResources().getString(R.string.edit_room_rights) : getResources().getString(R.string.edit_member_rights);
View toolBar = helperToolbar.setContext(getContext()).setLogoShown(true).setListener(this).setRightIcons(R.string.icon_check_ok).setLeftIcon(R.string.icon_back).setDefaultTitle(getString(R.string.new_channel)).setDefaultTitle(title).getView();
FrameLayout rootView = new FrameLayout(getContext());
rootView.setBackgroundColor(Theme.getInstance().getDividerColor(getContext()));
rootView.addView(toolBar, LayoutCreator.createFrame(LayoutCreator.MATCH_PARENT, LayoutCreator.WRAP_CONTENT, Gravity.TOP));
progressView = new ProgressBar(getContext());
progressView.setVisibility(View.GONE);
rootView.addView(recyclerListView = new RecyclerListView(getContext()), LayoutCreator.createFrame(LayoutCreator.MATCH_PARENT, LayoutCreator.MATCH_PARENT, Gravity.TOP, 0, LayoutCreator.getDimen(R.dimen.toolbar_height), 0, 0));
rootView.addView(progressView, LayoutCreator.createFrame(LayoutCreator.WRAP_CONTENT, LayoutCreator.WRAP_CONTENT, Gravity.CENTER));
recyclerListView.setLayoutManager(new LinearLayoutManager(getContext(), RecyclerView.VERTICAL, false));
recyclerListView.setAdapter(new ListAdapter());
recyclerListView.setClipToPadding(false);
recyclerListView.setPadding(0, 0, 0, LayoutCreator.dp(30));
return rootView;
}
use of net.iGap.helper.HelperToolbar in project iGap-Android by KianIranian-STDG.
the class DailNumberFragment method onViewCreated.
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
HelperToolbar t = HelperToolbar.create().setContext(getContext()).setLeftIcon(R.string.icon_back).setLogoShown(true).setListener(new ToolbarListener() {
@Override
public void onLeftIconClickListener(View view) {
if (getActivity() != null) {
getActivity().onBackPressed();
}
}
});
binding.toolbar.addView(t.getView());
}
use of net.iGap.helper.HelperToolbar in project iGap-Android by KianIranian-STDG.
the class EditGroupFragment method onViewCreated.
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
viewModel.onCreateFragment(this);
HelperToolbar mHelperToolbar = HelperToolbar.create().setContext(getContext()).setLifecycleOwner(getViewLifecycleOwner()).setLogoShown(true).setLeftIcon(R.string.icon_back).setRightIcons(R.string.icon_sent).setDefaultTitle(G.context.getResources().getString(R.string.tab_edit)).setListener(new ToolbarListener() {
@Override
public void onLeftIconClickListener(View view) {
popBackStackFragment();
}
@Override
public void onRightIconClickListener(View view) {
viewModel.setData(binding.groupNameEditText.getEditableText().toString(), binding.groupDescriptionEditText.getEditableText().toString());
hideKeyboard();
}
});
binding.toolbar.addView(mHelperToolbar.getView());
// mHelperToolbar.getTextViewLogo().setText(R.string.tab_edit);
attachFile = new AttachFile(G.fragmentActivity);
viewModel.goToMembersPage.observe(getViewLifecycleOwner(), b -> {
if (b != null && b) {
showListForCustomRole(ProtoGroupGetMemberList.GroupGetMemberList.FilterRole.ALL.toString());
}
});
viewModel.goToAdministratorPage.observe(getViewLifecycleOwner(), b -> {
if (b != null && b) {
showListForCustomRole(ProtoGroupGetMemberList.GroupGetMemberList.FilterRole.ADMIN.toString());
}
});
viewModel.goToPermissionPage.observe(getViewLifecycleOwner(), new Observer<Boolean>() {
@Override
public void onChanged(@Nullable Boolean b) {
}
});
viewModel.goBack.observe(getViewLifecycleOwner(), aBoolean -> popBackStackFragment());
viewModel.showSelectImageDialog.observe(getViewLifecycleOwner(), aBoolean -> {
if (aBoolean != null && aBoolean) {
startDialogSelectPicture();
}
});
viewModel.closePageImediatly.observe(getViewLifecycleOwner(), isClose -> {
if (isClose == null || !isClose)
return;
popBackStackFragment();
});
viewModel.showDialogChatHistory.observe(getViewLifecycleOwner(), aBoolean -> {
if (getActivity() != null && aBoolean != null && aBoolean) {
showDialog();
}
});
viewModel.goToModeratorPage.observe(getViewLifecycleOwner(), aBoolean -> showListForCustomRole(ProtoGroupGetMemberList.GroupGetMemberList.FilterRole.MODERATOR.toString()));
viewModel.initEmoji.observe(getViewLifecycleOwner(), aBoolean -> {
// if (aBoolean != null) {
// emojiPopup.toggle();
// }
});
viewModel.showDialogLeaveGroup.observe(getViewLifecycleOwner(), aBoolean -> {
if (aBoolean != null && aBoolean) {
groupLeft();
}
});
viewModel.goToRoomListPage.observe(getViewLifecycleOwner(), go -> {
if (getActivity() instanceof ActivityMain && go != null && go) {
((ActivityMain) getActivity()).removeAllFragmentFromMain();
}
});
viewModel.getOnGroupAvatarUpdated().observe(getViewLifecycleOwner(), roomId -> {
if (roomId != null && roomId == viewModel.roomId) {
setAvatar();
}
});
// setUpEmojiPopup();
setAvatar();
}
Aggregations