Search in sources :

Example 1 with PollEditTextCell

use of org.telegram.ui.Cells.PollEditTextCell in project Telegram-FOSS by Telegram-FOSS-Team.

the class ChatAttachAlertPollLayout method setTextLeft.

private void setTextLeft(View cell, int index) {
    if (!(cell instanceof PollEditTextCell)) {
        return;
    }
    PollEditTextCell textCell = (PollEditTextCell) cell;
    int max;
    int left;
    if (index == questionRow) {
        max = MAX_QUESTION_LENGTH;
        left = MAX_QUESTION_LENGTH - (questionString != null ? questionString.length() : 0);
    } else if (index == solutionRow) {
        max = MAX_SOLUTION_LENGTH;
        left = MAX_SOLUTION_LENGTH - (solutionString != null ? solutionString.length() : 0);
    } else if (index >= answerStartRow && index < answerStartRow + answersCount) {
        index -= answerStartRow;
        max = MAX_ANSWER_LENGTH;
        left = MAX_ANSWER_LENGTH - (answers[index] != null ? answers[index].length() : 0);
    } else {
        return;
    }
    if (left <= max - max * 0.7f) {
        textCell.setText2(String.format("%d", left));
        SimpleTextView textView = textCell.getTextView2();
        String key = left < 0 ? Theme.key_windowBackgroundWhiteRedText5 : Theme.key_windowBackgroundWhiteGrayText3;
        textView.setTextColor(getThemedColor(key));
        textView.setTag(key);
    } else {
        textCell.setText2("");
    }
}
Also used : PollEditTextCell(org.telegram.ui.Cells.PollEditTextCell) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView)

Example 2 with PollEditTextCell

use of org.telegram.ui.Cells.PollEditTextCell in project Telegram-FOSS by Telegram-FOSS-Team.

the class FilterCreateActivity method createView.

@Override
public View createView(Context context) {
    actionBar.setBackButtonImage(R.drawable.ic_ab_back);
    actionBar.setAllowOverlayTitle(true);
    ActionBarMenu menu = actionBar.createMenu();
    if (creatingNew) {
        actionBar.setTitle(LocaleController.getString("FilterNew", R.string.FilterNew));
    } else {
        TextPaint paint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
        paint.setTextSize(AndroidUtilities.dp(20));
        actionBar.setTitle(Emoji.replaceEmoji(filter.name, paint.getFontMetricsInt(), AndroidUtilities.dp(20), false));
    }
    actionBar.setActionBarMenuOnItemClick(new ActionBar.ActionBarMenuOnItemClick() {

        @Override
        public void onItemClick(int id) {
            if (id == -1) {
                if (checkDiscard()) {
                    finishFragment();
                }
            } else if (id == done_button) {
                processDone();
            }
        }
    });
    doneItem = menu.addItem(done_button, LocaleController.getString("Save", R.string.Save).toUpperCase());
    fragmentView = new FrameLayout(context);
    FrameLayout frameLayout = (FrameLayout) fragmentView;
    frameLayout.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundGray));
    listView = new RecyclerListView(context) {

        @Override
        public boolean requestFocus(int direction, Rect previouslyFocusedRect) {
            return false;
        }
    };
    listView.setLayoutManager(new LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false));
    listView.setVerticalScrollBarEnabled(false);
    frameLayout.addView(listView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
    listView.setAdapter(adapter = new ListAdapter(context));
    listView.setOnItemClickListener((view, position) -> {
        if (getParentActivity() == null) {
            return;
        }
        if (position == includeShowMoreRow) {
            includeExpanded = true;
            updateRows();
        } else if (position == excludeShowMoreRow) {
            excludeExpanded = true;
            updateRows();
        } else if (position == includeAddRow || position == excludeAddRow) {
            ArrayList<Long> arrayList = position == excludeAddRow ? newNeverShow : newAlwaysShow;
            FilterUsersActivity fragment = new FilterUsersActivity(position == includeAddRow, arrayList, newFilterFlags);
            fragment.setDelegate((ids, flags) -> {
                newFilterFlags = flags;
                if (position == excludeAddRow) {
                    newNeverShow = ids;
                    for (int a = 0; a < newNeverShow.size(); a++) {
                        Long id = newNeverShow.get(a);
                        newAlwaysShow.remove(id);
                        newPinned.delete(id);
                    }
                } else {
                    newAlwaysShow = ids;
                    for (int a = 0; a < newAlwaysShow.size(); a++) {
                        newNeverShow.remove(newAlwaysShow.get(a));
                    }
                    ArrayList<Long> toRemove = new ArrayList<>();
                    for (int a = 0, N = newPinned.size(); a < N; a++) {
                        Long did = newPinned.keyAt(a);
                        if (DialogObject.isEncryptedDialog(did)) {
                            continue;
                        }
                        if (newAlwaysShow.contains(did)) {
                            continue;
                        }
                        toRemove.add(did);
                    }
                    for (int a = 0, N = toRemove.size(); a < N; a++) {
                        newPinned.delete(toRemove.get(a));
                    }
                }
                fillFilterName();
                checkDoneButton(false);
                updateRows();
            });
            presentFragment(fragment);
        } else if (position == removeRow) {
            AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
            builder.setTitle(LocaleController.getString("FilterDelete", R.string.FilterDelete));
            builder.setMessage(LocaleController.getString("FilterDeleteAlert", R.string.FilterDeleteAlert));
            builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
            builder.setPositiveButton(LocaleController.getString("Delete", R.string.Delete), (dialog, which) -> {
                AlertDialog progressDialog = null;
                if (getParentActivity() != null) {
                    progressDialog = new AlertDialog(getParentActivity(), 3);
                    progressDialog.setCanCacnel(false);
                    progressDialog.show();
                }
                final AlertDialog progressDialogFinal = progressDialog;
                TLRPC.TL_messages_updateDialogFilter req = new TLRPC.TL_messages_updateDialogFilter();
                req.id = filter.id;
                getConnectionsManager().sendRequest(req, (response, error) -> AndroidUtilities.runOnUIThread(() -> {
                    try {
                        if (progressDialogFinal != null) {
                            progressDialogFinal.dismiss();
                        }
                    } catch (Exception e) {
                        FileLog.e(e);
                    }
                    getMessagesController().removeFilter(filter);
                    getMessagesStorage().deleteDialogFilter(filter);
                    finishFragment();
                }));
            });
            AlertDialog alertDialog = builder.create();
            showDialog(alertDialog);
            TextView button = (TextView) alertDialog.getButton(DialogInterface.BUTTON_POSITIVE);
            if (button != null) {
                button.setTextColor(Theme.getColor(Theme.key_dialogTextRed2));
            }
        } else if (position == nameRow) {
            PollEditTextCell cell = (PollEditTextCell) view;
            cell.getTextView().requestFocus();
            AndroidUtilities.showKeyboard(cell.getTextView());
        } else if (view instanceof UserCell) {
            UserCell cell = (UserCell) view;
            showRemoveAlert(position, cell.getName(), cell.getCurrentObject(), position < includeSectionRow);
        }
    });
    listView.setOnItemLongClickListener((view, position) -> {
        if (view instanceof UserCell) {
            UserCell cell = (UserCell) view;
            showRemoveAlert(position, cell.getName(), cell.getCurrentObject(), position < includeSectionRow);
            return true;
        }
        return false;
    });
    checkDoneButton(false);
    return fragmentView;
}
Also used : AlertDialog(org.telegram.ui.ActionBar.AlertDialog) ThemeDescription(org.telegram.ui.ActionBar.ThemeDescription) Context(android.content.Context) Rect(android.graphics.Rect) ActionBarMenuItem(org.telegram.ui.ActionBar.ActionBarMenuItem) Theme(org.telegram.ui.ActionBar.Theme) FrameLayout(android.widget.FrameLayout) ImageView(android.widget.ImageView) AndroidUtilities(org.telegram.messenger.AndroidUtilities) LocaleController(org.telegram.messenger.LocaleController) HeaderCell(org.telegram.ui.Cells.HeaderCell) EditTextBoldCursor(org.telegram.ui.Components.EditTextBoldCursor) Editable(android.text.Editable) TextInfoPrivacyCell(org.telegram.ui.Cells.TextInfoPrivacyCell) ArrayList(java.util.ArrayList) ShadowSectionCell(org.telegram.ui.Cells.ShadowSectionCell) TextCell(org.telegram.ui.Cells.TextCell) TLRPC(org.telegram.tgnet.TLRPC) ActionBar(org.telegram.ui.ActionBar.ActionBar) View(android.view.View) Emoji(org.telegram.messenger.Emoji) RecyclerView(androidx.recyclerview.widget.RecyclerView) DialogInterface(android.content.DialogInterface) LongSparseIntArray(org.telegram.messenger.support.LongSparseIntArray) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView) PollEditTextCell(org.telegram.ui.Cells.PollEditTextCell) DialogObject(org.telegram.messenger.DialogObject) ActionBarMenu(org.telegram.ui.ActionBar.ActionBarMenu) UserCell(org.telegram.ui.Cells.UserCell) RLottieImageView(org.telegram.ui.Components.RLottieImageView) R(org.telegram.messenger.R) TextUtils(android.text.TextUtils) BaseFragment(org.telegram.ui.ActionBar.BaseFragment) LayoutHelper(org.telegram.ui.Components.LayoutHelper) FileLog(org.telegram.messenger.FileLog) ViewGroup(android.view.ViewGroup) MessagesController(org.telegram.messenger.MessagesController) NotificationCenter(org.telegram.messenger.NotificationCenter) Gravity(android.view.Gravity) TextView(android.widget.TextView) TextPaint(android.text.TextPaint) Paint(android.graphics.Paint) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) EditorInfo(android.view.inputmethod.EditorInfo) ChatObject(org.telegram.messenger.ChatObject) AlertDialog(org.telegram.ui.ActionBar.AlertDialog) Collections(java.util.Collections) RecyclerListView(org.telegram.ui.Components.RecyclerListView) TextWatcher(android.text.TextWatcher) ArrayList(java.util.ArrayList) RecyclerListView(org.telegram.ui.Components.RecyclerListView) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) TLRPC(org.telegram.tgnet.TLRPC) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView) TextView(android.widget.TextView) UserCell(org.telegram.ui.Cells.UserCell) ActionBar(org.telegram.ui.ActionBar.ActionBar) Rect(android.graphics.Rect) ActionBarMenu(org.telegram.ui.ActionBar.ActionBarMenu) TextPaint(android.text.TextPaint) Paint(android.graphics.Paint) TextPaint(android.text.TextPaint) PollEditTextCell(org.telegram.ui.Cells.PollEditTextCell) FrameLayout(android.widget.FrameLayout)

Example 3 with PollEditTextCell

use of org.telegram.ui.Cells.PollEditTextCell in project Telegram-FOSS by Telegram-FOSS-Team.

the class FilterCreateActivity method setTextLeft.

private void setTextLeft(View cell) {
    if (cell instanceof PollEditTextCell) {
        PollEditTextCell textCell = (PollEditTextCell) cell;
        int left = MAX_NAME_LENGTH - (newFilterName != null ? newFilterName.length() : 0);
        if (left <= MAX_NAME_LENGTH - MAX_NAME_LENGTH * 0.7f) {
            textCell.setText2(String.format("%d", left));
            SimpleTextView textView = textCell.getTextView2();
            String key = left < 0 ? Theme.key_windowBackgroundWhiteRedText5 : Theme.key_windowBackgroundWhiteGrayText3;
            textView.setTextColor(Theme.getColor(key));
            textView.setTag(key);
            textView.setAlpha(((PollEditTextCell) cell).getTextView().isFocused() || left < 0 ? 1.0f : 0.0f);
        } else {
            textCell.setText2("");
        }
    }
}
Also used : PollEditTextCell(org.telegram.ui.Cells.PollEditTextCell) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView) TextPaint(android.text.TextPaint) Paint(android.graphics.Paint)

Example 4 with PollEditTextCell

use of org.telegram.ui.Cells.PollEditTextCell in project Telegram-FOSS by Telegram-FOSS-Team.

the class PollCreateActivity method setTextLeft.

private void setTextLeft(View cell, int index) {
    if (!(cell instanceof PollEditTextCell)) {
        return;
    }
    PollEditTextCell textCell = (PollEditTextCell) cell;
    int max;
    int left;
    if (index == questionRow) {
        max = ChatAttachAlertPollLayout.MAX_QUESTION_LENGTH;
        left = ChatAttachAlertPollLayout.MAX_QUESTION_LENGTH - (questionString != null ? questionString.length() : 0);
    } else if (index == solutionRow) {
        max = ChatAttachAlertPollLayout.MAX_SOLUTION_LENGTH;
        left = ChatAttachAlertPollLayout.MAX_SOLUTION_LENGTH - (solutionString != null ? solutionString.length() : 0);
    } else if (index >= answerStartRow && index < answerStartRow + answersCount) {
        index -= answerStartRow;
        max = ChatAttachAlertPollLayout.MAX_ANSWER_LENGTH;
        left = ChatAttachAlertPollLayout.MAX_ANSWER_LENGTH - (answers[index] != null ? answers[index].length() : 0);
    } else {
        return;
    }
    if (left <= max - max * 0.7f) {
        textCell.setText2(String.format("%d", left));
        SimpleTextView textView = textCell.getTextView2();
        String key = left < 0 ? Theme.key_windowBackgroundWhiteRedText5 : Theme.key_windowBackgroundWhiteGrayText3;
        textView.setTextColor(Theme.getColor(key));
        textView.setTag(key);
    } else {
        textCell.setText2("");
    }
}
Also used : PollEditTextCell(org.telegram.ui.Cells.PollEditTextCell) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView)

Example 5 with PollEditTextCell

use of org.telegram.ui.Cells.PollEditTextCell in project Telegram-FOSS by Telegram-FOSS-Team.

the class PollCreateActivity method createView.

@Override
public View createView(Context context) {
    actionBar.setBackButtonImage(R.drawable.ic_ab_back);
    if (quizOnly == 1) {
        actionBar.setTitle(LocaleController.getString("NewQuiz", R.string.NewQuiz));
    } else {
        actionBar.setTitle(LocaleController.getString("NewPoll", R.string.NewPoll));
    }
    if (AndroidUtilities.isTablet()) {
        actionBar.setOccupyStatusBar(false);
    }
    actionBar.setAllowOverlayTitle(true);
    actionBar.setActionBarMenuOnItemClick(new ActionBar.ActionBarMenuOnItemClick() {

        @Override
        public void onItemClick(int id) {
            if (id == -1) {
                if (checkDiscard()) {
                    finishFragment();
                }
            } else if (id == done_button) {
                if (quizPoll && doneItem.getAlpha() != 1.0f) {
                    int checksCount = 0;
                    for (int a = 0; a < answersChecks.length; a++) {
                        if (!TextUtils.isEmpty(ChatAttachAlertPollLayout.getFixedString(answers[a])) && answersChecks[a]) {
                            checksCount++;
                        }
                    }
                    if (checksCount <= 0) {
                        showQuizHint();
                    }
                    return;
                }
                TLRPC.TL_messageMediaPoll poll = new TLRPC.TL_messageMediaPoll();
                poll.poll = new TLRPC.TL_poll();
                poll.poll.multiple_choice = multipleChoise;
                poll.poll.quiz = quizPoll;
                poll.poll.public_voters = !anonymousPoll;
                poll.poll.question = ChatAttachAlertPollLayout.getFixedString(questionString).toString();
                SerializedData serializedData = new SerializedData(10);
                for (int a = 0; a < answers.length; a++) {
                    if (TextUtils.isEmpty(ChatAttachAlertPollLayout.getFixedString(answers[a]))) {
                        continue;
                    }
                    TLRPC.TL_pollAnswer answer = new TLRPC.TL_pollAnswer();
                    answer.text = ChatAttachAlertPollLayout.getFixedString(answers[a]).toString();
                    answer.option = new byte[1];
                    answer.option[0] = (byte) (48 + poll.poll.answers.size());
                    poll.poll.answers.add(answer);
                    if ((multipleChoise || quizPoll) && answersChecks[a]) {
                        serializedData.writeByte(answer.option[0]);
                    }
                }
                HashMap<String, String> params = new HashMap<>();
                params.put("answers", Utilities.bytesToHex(serializedData.toByteArray()));
                poll.results = new TLRPC.TL_pollResults();
                CharSequence solution = ChatAttachAlertPollLayout.getFixedString(solutionString);
                if (solution != null) {
                    poll.results.solution = solution.toString();
                    CharSequence[] message = new CharSequence[] { solution };
                    ArrayList<TLRPC.MessageEntity> entities = getMediaDataController().getEntities(message, true);
                    if (entities != null && !entities.isEmpty()) {
                        poll.results.solution_entities = entities;
                    }
                    if (!TextUtils.isEmpty(poll.results.solution)) {
                        poll.results.flags |= 16;
                    }
                }
                if (parentFragment.isInScheduleMode()) {
                    AlertsCreator.createScheduleDatePickerDialog(getParentActivity(), parentFragment.getDialogId(), (notify, scheduleDate) -> {
                        delegate.sendPoll(poll, params, notify, scheduleDate);
                        finishFragment();
                    });
                } else {
                    delegate.sendPoll(poll, params, true, 0);
                    finishFragment();
                }
            }
        }
    });
    ActionBarMenu menu = actionBar.createMenu();
    doneItem = menu.addItem(done_button, LocaleController.getString("Create", R.string.Create).toUpperCase());
    listAdapter = new ListAdapter(context);
    fragmentView = new FrameLayout(context);
    fragmentView.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundGray));
    FrameLayout frameLayout = (FrameLayout) fragmentView;
    listView = new RecyclerListView(context) {

        @Override
        protected void requestChildOnScreen(View child, View focused) {
            if (!(child instanceof PollEditTextCell)) {
                return;
            }
            super.requestChildOnScreen(child, focused);
        }

        @Override
        public boolean requestChildRectangleOnScreen(View child, Rect rectangle, boolean immediate) {
            rectangle.bottom += AndroidUtilities.dp(60);
            return super.requestChildRectangleOnScreen(child, rectangle, immediate);
        }
    };
    listView.setVerticalScrollBarEnabled(false);
    ((DefaultItemAnimator) listView.getItemAnimator()).setDelayAnimations(false);
    listView.setLayoutManager(new LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false));
    ItemTouchHelper itemTouchHelper = new ItemTouchHelper(new TouchHelperCallback());
    itemTouchHelper.attachToRecyclerView(listView);
    frameLayout.addView(listView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT));
    listView.setAdapter(listAdapter);
    listView.setOnItemClickListener((view, position) -> {
        if (position == addAnswerRow) {
            addNewField();
        } else if (view instanceof TextCheckCell) {
            TextCheckCell cell = (TextCheckCell) view;
            boolean checked;
            boolean wasChecksBefore = quizPoll;
            if (position == anonymousRow) {
                checked = anonymousPoll = !anonymousPoll;
            } else if (position == multipleRow) {
                checked = multipleChoise = !multipleChoise;
                if (multipleChoise && quizPoll) {
                    int prevSolutionRow = solutionRow;
                    quizPoll = false;
                    updateRows();
                    RecyclerView.ViewHolder holder = listView.findViewHolderForAdapterPosition(quizRow);
                    if (holder != null) {
                        ((TextCheckCell) holder.itemView).setChecked(false);
                    } else {
                        listAdapter.notifyItemChanged(quizRow);
                    }
                    listAdapter.notifyItemRangeRemoved(prevSolutionRow, 2);
                }
            } else {
                if (quizOnly != 0) {
                    return;
                }
                checked = quizPoll = !quizPoll;
                int prevSolutionRow = solutionRow;
                updateRows();
                if (quizPoll) {
                    listAdapter.notifyItemRangeInserted(solutionRow, 2);
                } else {
                    listAdapter.notifyItemRangeRemoved(prevSolutionRow, 2);
                }
                if (quizPoll && multipleChoise) {
                    multipleChoise = false;
                    RecyclerView.ViewHolder holder = listView.findViewHolderForAdapterPosition(multipleRow);
                    if (holder != null) {
                        ((TextCheckCell) holder.itemView).setChecked(false);
                    } else {
                        listAdapter.notifyItemChanged(multipleRow);
                    }
                }
                if (quizPoll) {
                    boolean was = false;
                    for (int a = 0; a < answersChecks.length; a++) {
                        if (was) {
                            answersChecks[a] = false;
                        } else if (answersChecks[a]) {
                            was = true;
                        }
                    }
                }
            }
            if (hintShowed && !quizPoll) {
                hintView.hide();
            }
            int count = listView.getChildCount();
            for (int a = answerStartRow; a < answerStartRow + answersCount; a++) {
                RecyclerView.ViewHolder holder = listView.findViewHolderForAdapterPosition(a);
                if (holder != null && holder.itemView instanceof PollEditTextCell) {
                    PollEditTextCell pollEditTextCell = (PollEditTextCell) holder.itemView;
                    pollEditTextCell.setShowCheckBox(quizPoll, true);
                    pollEditTextCell.setChecked(answersChecks[a - answerStartRow], wasChecksBefore);
                    if (pollEditTextCell.getTop() > AndroidUtilities.dp(40) && position == quizRow && !hintShowed) {
                        hintView.showForView(pollEditTextCell.getCheckBox(), true);
                        hintShowed = true;
                    }
                }
            }
            cell.setChecked(checked);
            checkDoneButton();
        }
    });
    listView.setOnScrollListener(new RecyclerView.OnScrollListener() {

        @Override
        public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
        }

        @Override
        public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
            if (dy != 0 && hintView != null) {
                hintView.hide();
            }
        }
    });
    hintView = new HintView(context, 4);
    hintView.setText(LocaleController.getString("PollTapToSelect", R.string.PollTapToSelect));
    hintView.setAlpha(0.0f);
    hintView.setVisibility(View.INVISIBLE);
    frameLayout.addView(hintView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 19, 0, 19, 0));
    checkDoneButton();
    return fragmentView;
}
Also used : HashMap(java.util.HashMap) TextCheckCell(org.telegram.ui.Cells.TextCheckCell) RecyclerListView(org.telegram.ui.Components.RecyclerListView) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) TLRPC(org.telegram.tgnet.TLRPC) DefaultItemAnimator(androidx.recyclerview.widget.DefaultItemAnimator) ItemTouchHelper(androidx.recyclerview.widget.ItemTouchHelper) ActionBar(org.telegram.ui.ActionBar.ActionBar) Rect(android.graphics.Rect) SerializedData(org.telegram.tgnet.SerializedData) ActionBarMenu(org.telegram.ui.ActionBar.ActionBarMenu) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) HintView(org.telegram.ui.Components.HintView) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView) RecyclerListView(org.telegram.ui.Components.RecyclerListView) HintView(org.telegram.ui.Components.HintView) PollEditTextCell(org.telegram.ui.Cells.PollEditTextCell) FrameLayout(android.widget.FrameLayout) RecyclerView(androidx.recyclerview.widget.RecyclerView)

Aggregations

SimpleTextView (org.telegram.ui.ActionBar.SimpleTextView)5 PollEditTextCell (org.telegram.ui.Cells.PollEditTextCell)5 Paint (android.graphics.Paint)2 Rect (android.graphics.Rect)2 TextPaint (android.text.TextPaint)2 View (android.view.View)2 FrameLayout (android.widget.FrameLayout)2 LinearLayoutManager (androidx.recyclerview.widget.LinearLayoutManager)2 RecyclerView (androidx.recyclerview.widget.RecyclerView)2 TLRPC (org.telegram.tgnet.TLRPC)2 ActionBar (org.telegram.ui.ActionBar.ActionBar)2 ActionBarMenu (org.telegram.ui.ActionBar.ActionBarMenu)2 RecyclerListView (org.telegram.ui.Components.RecyclerListView)2 Context (android.content.Context)1 DialogInterface (android.content.DialogInterface)1 Editable (android.text.Editable)1 TextUtils (android.text.TextUtils)1 TextWatcher (android.text.TextWatcher)1 Gravity (android.view.Gravity)1 ViewGroup (android.view.ViewGroup)1