Search in sources :

Example 1 with RealmMember

use of net.iGap.realm.RealmMember in project iGap-Android by KianIranian-STDG.

the class FragmentShowMember method getMemberList.

private void getMemberList() {
    mMemberCount = listMembers.size();
    infoUpdateListenerCount = (result, messageOne, MessageTow) -> {
        if (MessageTow.contains("OK")) {
            new Handler(Looper.getMainLooper()).post(() -> DbManager.getInstance().doRealmTask(realm -> {
                realm.executeTransactionAsync(realm12 -> {
                    final RealmList<RealmMember> newMemberList = new RealmList<>();
                    RealmRoom realmRoom = realm12.where(RealmRoom.class).equalTo("id", mRoomID).findFirst();
                    if (realmRoom != null) {
                        if (realmRoom.getType() == GROUP) {
                            for (ProtoGroupGetMemberList.GroupGetMemberListResponse.Member member : listMembers) {
                                if (Long.parseLong(messageOne) == member.getUserId()) {
                                    mCurrentUpdateCount++;
                                    newMemberList.add(RealmMember.put(realm12, member));
                                    newMemberList.addAll(0, realmRoom.getGroupRoom().getMembers());
                                    realmRoom.getGroupRoom().setMembers(newMemberList);
                                    newMemberList.clear();
                                    break;
                                }
                            }
                        } else {
                            for (ProtoChannelGetMemberList.ChannelGetMemberListResponse.Member member : listMembersChannal) {
                                if (Long.parseLong(messageOne) == member.getUserId()) {
                                    mCurrentUpdateCount++;
                                    newMemberList.add(RealmMember.put(realm12, member));
                                    newMemberList.addAll(0, realmRoom.getChannelRoom().getMembers());
                                    realmRoom.getChannelRoom().setMembers(newMemberList);
                                    newMemberList.clear();
                                    break;
                                }
                            }
                        }
                    }
                }, () -> fillItem());
            }));
        } else {
            mCurrentUpdateCount++;
        }
    };
    G.onGroupGetMemberList = new OnGroupGetMemberList() {

        @Override
        public void onGroupGetMemberList(final List<ProtoGroupGetMemberList.GroupGetMemberListResponse.Member> members) {
            mMemberCount = members.size();
            if (mMemberCount > 0) {
                listMembers.clear();
                for (final ProtoGroupGetMemberList.GroupGetMemberListResponse.Member member : members) {
                    listMembers.add(member);
                    new RequestUserInfo().userInfoWithCallBack(infoUpdateListenerCount, member.getUserId(), "" + member.getUserId());
                }
            } else {
                G.handler.post(() -> {
                    if (progressBar != null) {
                        progressBar.setVisibility(View.GONE);
                    }
                });
                isOne = true;
                if (isFirstFill) {
                    fillAdapter();
                    isFirstFill = false;
                }
            }
        }

        @Override
        public void onError(int majorCode, int minorCode) {
            G.handler.post(() -> {
                if (progressBar != null)
                    progressBar.setVisibility(View.GONE);
                HelperError.showSnackMessage(G.currentActivity.getString(R.string.AccessBan), false);
            });
        }

        @Override
        public void onTimeOut() {
            G.handler.post(() -> {
                if (progressBar != null)
                    progressBar.setVisibility(View.GONE);
                HelperError.showSnackMessage(G.currentActivity.getString(R.string.time_out), false);
            });
        }
    };
    G.onChannelGetMemberList = new OnChannelGetMemberList() {

        @Override
        public void onChannelGetMemberList(List<ProtoChannelGetMemberList.ChannelGetMemberListResponse.Member> members) {
            mMemberCount = members.size();
            if (mMemberCount > 0) {
                listMembersChannal.clear();
                for (final ProtoChannelGetMemberList.ChannelGetMemberListResponse.Member member : members) {
                    listMembersChannal.add(member);
                    new RequestUserInfo().userInfoWithCallBack(infoUpdateListenerCount, member.getUserId(), "" + member.getUserId());
                }
            } else {
                G.handler.post(() -> {
                    if (progressBar != null) {
                        progressBar.setVisibility(View.GONE);
                    }
                });
                isOne = true;
                if (isFirstFill) {
                    fillAdapter();
                    isFirstFill = false;
                }
            }
        }

        @Override
        public void onError(int majorCode, int minorCode) {
            G.handler.post(() -> {
                if (progressBar != null) {
                    progressBar.setVisibility(View.GONE);
                    HelperError.showSnackMessage(requireActivity().getString(R.string.AccessBan), false);
                }
            });
        }

        @Override
        public void onTimeOut() {
            G.handler.post(() -> {
                if (progressBar != null)
                    progressBar.setVisibility(View.GONE);
                HelperError.showSnackMessage(requireActivity().getString(R.string.time_out), false);
            });
        }
    };
    G.handler.post(() -> {
        mCurrentUpdateCount = 0;
        DbManager.getInstance().doRealmTask(realm -> {
            realm.executeTransactionAsync(realm1 -> RealmMember.deleteAllMembers(realm1, mRoomID, selectedRole), () -> {
                if (roomType == GROUP) {
                    new RequestGroupGetMemberList().getMemberList(mRoomID, offset, limit, ProtoGroupGetMemberList.GroupGetMemberList.FilterRole.valueOf(selectedRole));
                } else {
                    new RequestChannelGetMemberList().channelGetMemberList(mRoomID, offset, limit, ProtoChannelGetMemberList.ChannelGetMemberList.FilterRole.valueOf(selectedRole));
                }
            });
        });
    });
}
Also used : LinearLayout(android.widget.LinearLayout) Bundle(android.os.Bundle) AppUtils(net.iGap.module.AppUtils) ToolbarListener(net.iGap.observers.interfaces.ToolbarListener) ProgressBar(android.widget.ProgressBar) LastSeenTimeUtil(net.iGap.module.LastSeenTimeUtil) Theme(net.iGap.module.Theme) G(net.iGap.G) RequestGroupGetMemberList(net.iGap.request.RequestGroupGetMemberList) GroupChatRole(net.iGap.module.enums.GroupChatRole) RealmChannelRoom(net.iGap.realm.RealmChannelRoom) Handler(android.os.Handler) Looper(android.os.Looper) Fragment(androidx.fragment.app.Fragment) View(android.view.View) OnGroupKickMember(net.iGap.observers.interfaces.OnGroupKickMember) HelperError(net.iGap.helper.HelperError) RecyclerView(androidx.recyclerview.widget.RecyclerView) HelperFragment(net.iGap.helper.HelperFragment) RequestGroupAddMember(net.iGap.request.RequestGroupAddMember) ParamWithAvatarType(net.iGap.helper.avatar.ParamWithAvatarType) RealmMember(net.iGap.realm.RealmMember) AsyncTask(android.os.AsyncTask) OnComplete(net.iGap.observers.interfaces.OnComplete) RealmRoom(net.iGap.realm.RealmRoom) RealmGroupRoom(net.iGap.realm.RealmGroupRoom) ViewGroup(android.view.ViewGroup) CHANNEL(net.iGap.proto.ProtoGlobal.Room.Type.CHANNEL) OnGroupGetMemberList(net.iGap.observers.interfaces.OnGroupGetMemberList) List(java.util.List) TextView(android.widget.TextView) Nullable(androidx.annotation.Nullable) RealmRegisteredInfo(net.iGap.realm.RealmRegisteredInfo) RealmRecyclerViewAdapter(io.realm.RealmRecyclerViewAdapter) RequestChannelAddMember(net.iGap.request.RequestChannelAddMember) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) TextCell(net.iGap.adapter.items.cells.TextCell) MaterialDialog(com.afollestad.materialdialogs.MaterialDialog) ProtoGroupGetMemberList(net.iGap.proto.ProtoGroupGetMemberList) NotNull(org.jetbrains.annotations.NotNull) EndlessRecyclerViewScrollListener(net.iGap.module.EndlessRecyclerViewScrollListener) TextWatcher(android.text.TextWatcher) HelperToolbar(net.iGap.helper.HelperToolbar) Context(android.content.Context) RequestChannelGetMemberList(net.iGap.request.RequestChannelGetMemberList) RealmList(io.realm.RealmList) AccountManager(net.iGap.module.accountManager.AccountManager) StructContactInfo(net.iGap.module.structs.StructContactInfo) Dialog(android.app.Dialog) Editable(android.text.Editable) DeviceUtils(net.iGap.module.DeviceUtils) ArrayList(java.util.ArrayList) ProtoChannelGetMemberList(net.iGap.proto.ProtoChannelGetMemberList) LayoutCreator(net.iGap.helper.LayoutCreator) Contacts(net.iGap.module.Contacts) RealmRoomMessage(net.iGap.realm.RealmRoomMessage) RequestUserInfo(net.iGap.request.RequestUserInfo) AvatarHandler(net.iGap.helper.avatar.AvatarHandler) OnSelectedList(net.iGap.observers.interfaces.OnSelectedList) RealmRoomAccess(net.iGap.realm.RealmRoomAccess) LayoutInflater(android.view.LayoutInflater) RealmResults(io.realm.RealmResults) CircleImageView(net.iGap.module.CircleImageView) PreCachingLayoutManager(net.iGap.module.PreCachingLayoutManager) Gravity(android.view.Gravity) ProtoGlobal(net.iGap.proto.ProtoGlobal) R(net.iGap.R) ChannelChatRole(net.iGap.module.enums.ChannelChatRole) OnChannelGetMemberList(net.iGap.observers.interfaces.OnChannelGetMemberList) GROUP(net.iGap.proto.ProtoGlobal.Room.Type.GROUP) DbManager(net.iGap.module.accountManager.DbManager) RequestGroupKickMember(net.iGap.request.RequestGroupKickMember) EditText(android.widget.EditText) RequestChannelKickMember(net.iGap.request.RequestChannelKickMember) RealmList(io.realm.RealmList) Handler(android.os.Handler) AvatarHandler(net.iGap.helper.avatar.AvatarHandler) RequestGroupGetMemberList(net.iGap.request.RequestGroupGetMemberList) OnGroupGetMemberList(net.iGap.observers.interfaces.OnGroupGetMemberList) RequestUserInfo(net.iGap.request.RequestUserInfo) RequestChannelGetMemberList(net.iGap.request.RequestChannelGetMemberList) OnChannelGetMemberList(net.iGap.observers.interfaces.OnChannelGetMemberList) RealmRoom(net.iGap.realm.RealmRoom) ProtoChannelGetMemberList(net.iGap.proto.ProtoChannelGetMemberList) OnGroupKickMember(net.iGap.observers.interfaces.OnGroupKickMember) RequestGroupAddMember(net.iGap.request.RequestGroupAddMember) RealmMember(net.iGap.realm.RealmMember) RequestChannelAddMember(net.iGap.request.RequestChannelAddMember) RequestGroupKickMember(net.iGap.request.RequestGroupKickMember) RequestChannelKickMember(net.iGap.request.RequestChannelKickMember) ProtoGroupGetMemberList(net.iGap.proto.ProtoGroupGetMemberList)

Example 2 with RealmMember

use of net.iGap.realm.RealmMember in project iGap-Android by KianIranian-STDG.

the class FragmentShowMember method goToAddMember.

private void goToAddMember() {
    List<StructContactInfo> userList = Contacts.retrieve(null);
    RealmList<RealmMember> memberList = DbManager.getInstance().doRealmTask(realm -> {
        return RealmMember.getMembers(realm, mRoomID);
    });
    for (int i = 0; i < memberList.size(); i++) {
        for (int j = 0; j < userList.size(); j++) {
            if (userList.get(j).peerId == memberList.get(i).getPeerId()) {
                userList.remove(j);
                break;
            }
        }
    }
    if (getActivity() != null) {
        ShowCustomList showCustomListFragment = new ShowCustomList();
        showCustomListFragment.setFields(roomType, userList, new OnSelectedList() {

            @Override
            public void getSelectedList(boolean result, String message, int countForShowLastMessage, final ArrayList<StructContactInfo> list) {
                if (isGroup) {
                    for (int i = 0; i < list.size(); i++) {
                        new RequestGroupAddMember().groupAddMember(mRoomID, list.get(i).peerId, RealmRoomMessage.findCustomMessageId(mRoomID, countForShowLastMessage));
                    }
                } else {
                    for (int i = 0; i < list.size(); i++) {
                        new RequestChannelAddMember().channelAddMember(mRoomID, list.get(i).peerId);
                    }
                }
            }
        });
        Bundle bundle = new Bundle();
        bundle.putBoolean("DIALOG_SHOWING", true);
        bundle.putLong("COUNT_MESSAGE", 0);
        showCustomListFragment.setArguments(bundle);
        new HelperFragment(getActivity().getSupportFragmentManager(), showCustomListFragment).setReplace(false).load();
    }
}
Also used : StructContactInfo(net.iGap.module.structs.StructContactInfo) Bundle(android.os.Bundle) OnSelectedList(net.iGap.observers.interfaces.OnSelectedList) RequestGroupAddMember(net.iGap.request.RequestGroupAddMember) HelperFragment(net.iGap.helper.HelperFragment) RealmMember(net.iGap.realm.RealmMember) RequestChannelAddMember(net.iGap.request.RequestChannelAddMember)

Example 3 with RealmMember

use of net.iGap.realm.RealmMember in project iGap-Android by KianIranian-STDG.

the class FragmentShowMember method initComponent.

private void initComponent(View view) {
    mHelperToolbar = HelperToolbar.create().setContext(getContext()).setLifecycleOwner(getViewLifecycleOwner()).setLeftIcon(R.string.icon_back).setLogoShown(true).setSearchBoxShown(true).setListener(this);
    LinearLayout layoutToolbar = view.findViewById(R.id.fcm_layout_toolbar);
    layoutToolbar.addView(mHelperToolbar.getView());
    mBtnAdd = view.findViewById(R.id.fcm_lbl_add);
    realmRoom = DbManager.getInstance().doRealmTask(realm -> {
        return realm.where(RealmRoom.class).equalTo("id", mRoomID).findFirst();
    });
    if (selectedRole.equals(ProtoGroupGetMemberList.GroupGetMemberList.FilterRole.ALL.toString())) {
        if (isGroup) {
            mHelperToolbar.setDefaultTitle(context.getResources().getString(R.string.member));
            mBtnAdd.setText(context.getResources().getString(R.string.add_new_member));
        } else {
            mHelperToolbar.setDefaultTitle(context.getResources().getString(R.string.subscriber));
            mBtnAdd.setText(context.getResources().getString(R.string.add_new_subscriber));
        }
        if (!isShowAddButton) {
            mBtnAdd.setVisibility(View.GONE);
            view.findViewById(R.id.fcm_splitter_add).setVisibility(View.GONE);
        }
        mBtnAdd.setVisibility(realmRoomAccess != null && realmRoomAccess.isCanAddNewMember() ? View.VISIBLE : View.GONE);
    } else if (selectedRole.equals(ProtoGroupGetMemberList.GroupGetMemberList.FilterRole.ADMIN.toString())) {
        mHelperToolbar.setDefaultTitle(context.getResources().getString(R.string.list_admin));
        mBtnAdd.setText(context.getResources().getString(R.string.add_admin));
        mBtnAdd.setVisibility(realmRoomAccess != null && realmRoomAccess.isCanAddNewAdmin() ? View.VISIBLE : View.GONE);
        if (realmRoom != null) {
            if (realmRoom.getGroupRoom() != null && realmRoom.getGroupRoom().getRole() == GroupChatRole.OWNER) {
                mBtnAdd.setVisibility(View.VISIBLE);
            }
            if (realmRoom.getChannelRoom() != null && realmRoom.getChannelRoom().getRole() == ChannelChatRole.OWNER) {
                mBtnAdd.setVisibility(View.VISIBLE);
            }
        }
    } else if (selectedRole.equals(ProtoGroupGetMemberList.GroupGetMemberList.FilterRole.MODERATOR.toString())) {
        mHelperToolbar.setDefaultTitle(context.getResources().getString(R.string.list_modereator));
        mBtnAdd.setText(context.getResources().getString(R.string.add_modereator));
        mBtnAdd.setVisibility(View.GONE);
        if (realmRoom != null) {
            if (realmRoom.getGroupRoom() != null && (realmRoom.getGroupRoom().getRole() == GroupChatRole.OWNER || realmRoom.getGroupRoom().getRole() == GroupChatRole.ADMIN)) {
                mBtnAdd.setVisibility(View.VISIBLE);
            }
            if (realmRoom.getChannelRoom() != null && (realmRoom.getChannelRoom().getRole() == ChannelChatRole.OWNER || realmRoom.getChannelRoom().getRole() == ChannelChatRole.ADMIN)) {
                mBtnAdd.setVisibility(View.VISIBLE);
            }
        }
    }
    mBtnAdd.setOnClickListener(v -> {
        if (selectedRole.equals(ProtoGroupGetMemberList.GroupGetMemberList.FilterRole.MODERATOR.toString()) || selectedRole.equals(ProtoGroupGetMemberList.GroupGetMemberList.FilterRole.ADMIN.toString())) {
            openFragmentForAdd(ProtoGroupGetMemberList.GroupGetMemberList.FilterRole.ALL.toString(), selectedRole);
        } else if (selectedRole.equals(ProtoGroupGetMemberList.GroupGetMemberList.FilterRole.ALL.toString())) {
            goToAddMember();
        }
    });
    final EditText edtSearch = mHelperToolbar.getEditTextSearch();
    edtSearch.addTextChangedListener(new TextWatcher() {

        @Override
        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
        }

        @Override
        public void onTextChanged(CharSequence s, int start, int before, int count) {
        }

        @Override
        public void afterTextChanged(final Editable s) {
            RealmResults<RealmMember> searchMember = DbManager.getInstance().doRealmTask(realm -> {
                return RealmMember.filterMember(realm, mRoomID, s.toString(), getUnselectRow(), selectedRole);
            });
            mAdapter = new MemberAdapter(searchMember, roomType, mMainRole, userID);
            mRecyclerView.setAdapter(mAdapter);
        }
    });
    mRecyclerView = view.findViewById(R.id.fcm_recycler_view_show_member);
    mRecyclerView.setItemViewCacheSize(100);
    mRecyclerView.setItemAnimator(null);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(G.fragmentActivity));
    final PreCachingLayoutManager preCachingLayoutManager = new PreCachingLayoutManager(G.fragmentActivity, DeviceUtils.getScreenHeight(G.fragmentActivity));
    mRecyclerView.setLayoutManager(preCachingLayoutManager);
    progressBar = view.findViewById(R.id.fcg_prgWaiting);
    AppUtils.setProgresColler(progressBar);
    // TextView txtNumberOfMember = (TextView) view.findViewById(R.id.fcg_txt_member);
    // if (selectedRole.toString().equals(ProtoGroupGetMemberList.GroupGetMemberList.FilterRole.MODERATOR.toString())) {
    // txtNumberOfMember.setText(G.fragmentActivity.getResources().getString(R.string.list_modereator));
    // } else if (selectedRole.toString().equals(ProtoGroupGetMemberList.GroupGetMemberList.FilterRole.ADMIN.toString())) {
    // txtNumberOfMember.setText(G.fragmentActivity.getResources().getString(R.string.list_admin));
    // } else {
    // txtNumberOfMember.setText(G.fragmentActivity.getResources().getString(member));
    // }
    scrollListener = new EndlessRecyclerViewScrollListener(preCachingLayoutManager) {

        @Override
        public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {
            // Triggered only when new data needs to be appended to the list
            // Add whatever code is needed to append new items to the bottom of the list
            loadMoreMember();
        }
    };
    mRecyclerView.addOnScrollListener(scrollListener);
}
Also used : LinearLayout(android.widget.LinearLayout) Bundle(android.os.Bundle) AppUtils(net.iGap.module.AppUtils) ToolbarListener(net.iGap.observers.interfaces.ToolbarListener) ProgressBar(android.widget.ProgressBar) LastSeenTimeUtil(net.iGap.module.LastSeenTimeUtil) Theme(net.iGap.module.Theme) G(net.iGap.G) RequestGroupGetMemberList(net.iGap.request.RequestGroupGetMemberList) GroupChatRole(net.iGap.module.enums.GroupChatRole) RealmChannelRoom(net.iGap.realm.RealmChannelRoom) Handler(android.os.Handler) Looper(android.os.Looper) Fragment(androidx.fragment.app.Fragment) View(android.view.View) OnGroupKickMember(net.iGap.observers.interfaces.OnGroupKickMember) HelperError(net.iGap.helper.HelperError) RecyclerView(androidx.recyclerview.widget.RecyclerView) HelperFragment(net.iGap.helper.HelperFragment) RequestGroupAddMember(net.iGap.request.RequestGroupAddMember) ParamWithAvatarType(net.iGap.helper.avatar.ParamWithAvatarType) RealmMember(net.iGap.realm.RealmMember) AsyncTask(android.os.AsyncTask) OnComplete(net.iGap.observers.interfaces.OnComplete) RealmRoom(net.iGap.realm.RealmRoom) RealmGroupRoom(net.iGap.realm.RealmGroupRoom) ViewGroup(android.view.ViewGroup) CHANNEL(net.iGap.proto.ProtoGlobal.Room.Type.CHANNEL) OnGroupGetMemberList(net.iGap.observers.interfaces.OnGroupGetMemberList) List(java.util.List) TextView(android.widget.TextView) Nullable(androidx.annotation.Nullable) RealmRegisteredInfo(net.iGap.realm.RealmRegisteredInfo) RealmRecyclerViewAdapter(io.realm.RealmRecyclerViewAdapter) RequestChannelAddMember(net.iGap.request.RequestChannelAddMember) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) TextCell(net.iGap.adapter.items.cells.TextCell) MaterialDialog(com.afollestad.materialdialogs.MaterialDialog) ProtoGroupGetMemberList(net.iGap.proto.ProtoGroupGetMemberList) NotNull(org.jetbrains.annotations.NotNull) EndlessRecyclerViewScrollListener(net.iGap.module.EndlessRecyclerViewScrollListener) TextWatcher(android.text.TextWatcher) HelperToolbar(net.iGap.helper.HelperToolbar) Context(android.content.Context) RequestChannelGetMemberList(net.iGap.request.RequestChannelGetMemberList) RealmList(io.realm.RealmList) AccountManager(net.iGap.module.accountManager.AccountManager) StructContactInfo(net.iGap.module.structs.StructContactInfo) Dialog(android.app.Dialog) Editable(android.text.Editable) DeviceUtils(net.iGap.module.DeviceUtils) ArrayList(java.util.ArrayList) ProtoChannelGetMemberList(net.iGap.proto.ProtoChannelGetMemberList) LayoutCreator(net.iGap.helper.LayoutCreator) Contacts(net.iGap.module.Contacts) RealmRoomMessage(net.iGap.realm.RealmRoomMessage) RequestUserInfo(net.iGap.request.RequestUserInfo) AvatarHandler(net.iGap.helper.avatar.AvatarHandler) OnSelectedList(net.iGap.observers.interfaces.OnSelectedList) RealmRoomAccess(net.iGap.realm.RealmRoomAccess) LayoutInflater(android.view.LayoutInflater) RealmResults(io.realm.RealmResults) CircleImageView(net.iGap.module.CircleImageView) PreCachingLayoutManager(net.iGap.module.PreCachingLayoutManager) Gravity(android.view.Gravity) ProtoGlobal(net.iGap.proto.ProtoGlobal) R(net.iGap.R) ChannelChatRole(net.iGap.module.enums.ChannelChatRole) OnChannelGetMemberList(net.iGap.observers.interfaces.OnChannelGetMemberList) GROUP(net.iGap.proto.ProtoGlobal.Room.Type.GROUP) DbManager(net.iGap.module.accountManager.DbManager) RequestGroupKickMember(net.iGap.request.RequestGroupKickMember) EditText(android.widget.EditText) RequestChannelKickMember(net.iGap.request.RequestChannelKickMember) EditText(android.widget.EditText) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) PreCachingLayoutManager(net.iGap.module.PreCachingLayoutManager) EndlessRecyclerViewScrollListener(net.iGap.module.EndlessRecyclerViewScrollListener) TextWatcher(android.text.TextWatcher) Editable(android.text.Editable) RecyclerView(androidx.recyclerview.widget.RecyclerView) RealmRoom(net.iGap.realm.RealmRoom) LinearLayout(android.widget.LinearLayout) RealmResults(io.realm.RealmResults)

Aggregations

Bundle (android.os.Bundle)3 HelperFragment (net.iGap.helper.HelperFragment)3 Dialog (android.app.Dialog)2 Context (android.content.Context)2 AsyncTask (android.os.AsyncTask)2 Handler (android.os.Handler)2 Looper (android.os.Looper)2 Editable (android.text.Editable)2 TextWatcher (android.text.TextWatcher)2 Gravity (android.view.Gravity)2 LayoutInflater (android.view.LayoutInflater)2 View (android.view.View)2 ViewGroup (android.view.ViewGroup)2 EditText (android.widget.EditText)2 LinearLayout (android.widget.LinearLayout)2 ProgressBar (android.widget.ProgressBar)2 TextView (android.widget.TextView)2 Nullable (androidx.annotation.Nullable)2 Fragment (androidx.fragment.app.Fragment)2 LinearLayoutManager (androidx.recyclerview.widget.LinearLayoutManager)2