Search in sources :

Example 36 with ViewModelProvider

use of androidx.lifecycle.ViewModelProvider in project Signal-Android by WhisperSystems.

the class CreatePaymentFragment method onViewCreated.

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
    Toolbar toolbar = view.findViewById(R.id.create_payment_fragment_toolbar);
    toolbar.setNavigationOnClickListener(this::goBack);
    CreatePaymentFragmentArgs arguments = CreatePaymentFragmentArgs.fromBundle(requireArguments());
    CreatePaymentViewModel.Factory factory = new CreatePaymentViewModel.Factory(arguments.getPayee(), arguments.getNote());
    CreatePaymentViewModel viewModel = new ViewModelProvider(Navigation.findNavController(view).getViewModelStoreOwner(R.id.payments_create), factory).get(CreatePaymentViewModel.class);
    constraintLayout = view.findViewById(R.id.create_payment_fragment_amount_header);
    request = view.findViewById(R.id.create_payment_fragment_request);
    amount = view.findViewById(R.id.create_payment_fragment_amount);
    exchange = view.findViewById(R.id.create_payment_fragment_exchange);
    pay = view.findViewById(R.id.create_payment_fragment_pay);
    balance = view.findViewById(R.id.create_payment_fragment_balance);
    note = view.findViewById(R.id.create_payment_fragment_note);
    addNote = view.findViewById(R.id.create_payment_fragment_add_note);
    toggle = view.findViewById(R.id.create_payment_fragment_toggle);
    TextView decimal = view.findViewById(R.id.create_payment_fragment_keyboard_decimal);
    decimal.setText(String.valueOf(DecimalFormatSymbols.getInstance().getDecimalSeparator()));
    View infoTapTarget = view.findViewById(R.id.create_payment_fragment_info_tap_region);
    // noinspection CodeBlock2Expr
    infoTapTarget.setOnClickListener(v -> {
        new AlertDialog.Builder(requireContext()).setMessage(R.string.CreatePaymentFragment__conversions_are_just_estimates).setPositiveButton(android.R.string.ok, (dialog, which) -> dialog.dismiss()).setNegativeButton(R.string.LearnMoreTextView_learn_more, (dialog, which) -> {
            dialog.dismiss();
            CommunicationActions.openBrowserLink(requireContext(), getString(R.string.CreatePaymentFragment__learn_more__conversions));
        }).show();
    });
    initializeInfoIcon();
    note.setOnClickListener(v -> SafeNavigation.safeNavigate(Navigation.findNavController(v), R.id.action_createPaymentFragment_to_editPaymentNoteFragment));
    addNote.setOnClickListener(v -> SafeNavigation.safeNavigate(Navigation.findNavController(v), R.id.action_createPaymentFragment_to_editPaymentNoteFragment));
    pay.setOnClickListener(v -> {
        NavDirections directions = CreatePaymentFragmentDirections.actionCreatePaymentFragmentToConfirmPaymentFragment(viewModel.getCreatePaymentDetails()).setFinishOnConfirm(arguments.getFinishOnConfirm());
        SafeNavigation.safeNavigate(Navigation.findNavController(v), directions);
    });
    toggle.setOnClickListener(v -> viewModel.toggleMoneyInputTarget());
    initializeConstraintSets();
    initializeKeyboardButtons(view, viewModel);
    viewModel.getInputState().observe(getViewLifecycleOwner(), inputState -> {
        updateAmount(inputState);
        updateExchange(inputState);
        updateMoneyInputTarget(inputState.getInputTarget());
    });
    viewModel.getIsPaymentsSupportedByPayee().observe(getViewLifecycleOwner(), isSupported -> {
        if (!isSupported)
            RecipientHasNotEnabledPaymentsDialog.show(requireContext(), () -> goBack(requireView()));
    });
    viewModel.isValidAmount().observe(getViewLifecycleOwner(), this::updateRequestAmountButtons);
    viewModel.getNote().observe(getViewLifecycleOwner(), this::updateNote);
    viewModel.getSpendableBalance().observe(getViewLifecycleOwner(), this::updateBalance);
    viewModel.getCanSendPayment().observe(getViewLifecycleOwner(), this::updatePayAmountButtons);
}
Also used : Bundle(android.os.Bundle) NonNull(androidx.annotation.NonNull) AppCompatResources(androidx.appcompat.content.res.AppCompatResources) DecimalFormatSymbols(java.text.DecimalFormatSymbols) EmojiTextView(org.thoughtcrime.securesms.components.emoji.EmojiTextView) TransitionManager(androidx.transition.TransitionManager) ViewUtil(org.thoughtcrime.securesms.util.ViewUtil) HashMap(java.util.HashMap) Currency(java.util.Currency) DrawableCompat(androidx.core.graphics.drawable.DrawableCompat) Drawable(android.graphics.drawable.Drawable) R(org.thoughtcrime.securesms.R) FiatMoneyUtil(org.thoughtcrime.securesms.payments.FiatMoneyUtil) SafeNavigation(org.thoughtcrime.securesms.util.navigation.SafeNavigation) FormatterOptions(org.whispersystems.signalservice.api.payments.FormatterOptions) Map(java.util.Map) View(android.view.View) RecipientHasNotEnabledPaymentsDialog(org.thoughtcrime.securesms.payments.preferences.RecipientHasNotEnabledPaymentsDialog) ContextCompat(androidx.core.content.ContextCompat) ViewModelProvider(androidx.lifecycle.ViewModelProvider) NavDirections(androidx.navigation.NavDirections) MoneyView(org.thoughtcrime.securesms.payments.MoneyView) TextUtils(android.text.TextUtils) SpanUtil(org.thoughtcrime.securesms.util.SpanUtil) CommunicationActions(org.thoughtcrime.securesms.util.CommunicationActions) ConstraintSet(androidx.constraintlayout.widget.ConstraintSet) AlertDialog(android.app.AlertDialog) Objects(java.util.Objects) TextView(android.widget.TextView) Nullable(androidx.annotation.Nullable) ConstraintLayout(androidx.constraintlayout.widget.ConstraintLayout) Toolbar(androidx.appcompat.widget.Toolbar) Navigation(androidx.navigation.Navigation) LoggingFragment(org.thoughtcrime.securesms.LoggingFragment) Money(org.whispersystems.signalservice.api.payments.Money) EmojiTextView(org.thoughtcrime.securesms.components.emoji.EmojiTextView) TextView(android.widget.TextView) EmojiTextView(org.thoughtcrime.securesms.components.emoji.EmojiTextView) View(android.view.View) MoneyView(org.thoughtcrime.securesms.payments.MoneyView) TextView(android.widget.TextView) Toolbar(androidx.appcompat.widget.Toolbar) ViewModelProvider(androidx.lifecycle.ViewModelProvider) NavDirections(androidx.navigation.NavDirections)

Example 37 with ViewModelProvider

use of androidx.lifecycle.ViewModelProvider in project Signal-Android by WhisperSystems.

the class PaymentsTransferFragment method onViewCreated.

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    PaymentsTransferViewModel viewModel = new ViewModelProvider(Navigation.findNavController(view).getViewModelStoreOwner(R.id.payments_transfer), new PaymentsTransferViewModel.Factory()).get(PaymentsTransferViewModel.class);
    Toolbar toolbar = view.findViewById(R.id.payments_transfer_toolbar);
    view.findViewById(R.id.payments_transfer_scan_qr).setOnClickListener(v -> scanQrCode());
    view.findViewById(R.id.payments_transfer_next).setOnClickListener(v -> next(viewModel.getOwnAddress()));
    address = view.findViewById(R.id.payments_transfer_to_address);
    address.setOnEditorActionListener((v, actionId, event) -> {
        if (actionId == EditorInfo.IME_ACTION_DONE) {
            return next(viewModel.getOwnAddress());
        }
        return false;
    });
    viewModel.getAddress().observe(getViewLifecycleOwner(), address::setText);
    toolbar.setNavigationOnClickListener(v -> {
        ViewUtil.hideKeyboard(requireContext(), v);
        Navigation.findNavController(v).popBackStack();
    });
}
Also used : ViewModelProvider(androidx.lifecycle.ViewModelProvider) Toolbar(androidx.appcompat.widget.Toolbar)

Example 38 with ViewModelProvider

use of androidx.lifecycle.ViewModelProvider in project Signal-Android by WhisperSystems.

the class DeleteAccountFragment method onViewCreated.

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
    Spinner countrySpinner = view.findViewById(R.id.delete_account_fragment_country_spinner);
    View confirm = view.findViewById(R.id.delete_account_fragment_delete);
    bullets = view.findViewById(R.id.delete_account_fragment_bullets);
    countryCode = view.findViewById(R.id.delete_account_fragment_country_code);
    number = view.findViewById(R.id.delete_account_fragment_number);
    viewModel = new ViewModelProvider(requireActivity(), new DeleteAccountViewModel.Factory(new DeleteAccountRepository())).get(DeleteAccountViewModel.class);
    viewModel.getCountryDisplayName().observe(getViewLifecycleOwner(), this::setCountryDisplay);
    viewModel.getRegionCode().observe(getViewLifecycleOwner(), this::handleRegionUpdated);
    viewModel.getEvents().observe(getViewLifecycleOwner(), this::handleEvent);
    viewModel.getWalletBalance().observe(getViewLifecycleOwner(), this::updateBullets);
    initializeNumberInput();
    countryCode.getInput().addTextChangedListener(new AfterTextChanged(this::afterCountryCodeChanged));
    countryCode.getInput().setImeOptions(EditorInfo.IME_ACTION_NEXT);
    confirm.setOnClickListener(unused -> viewModel.submit());
    initializeSpinner(countrySpinner);
}
Also used : Spinner(android.widget.Spinner) View(android.view.View) TextView(android.widget.TextView) AfterTextChanged(org.thoughtcrime.securesms.util.text.AfterTextChanged) ViewModelProvider(androidx.lifecycle.ViewModelProvider)

Example 39 with ViewModelProvider

use of androidx.lifecycle.ViewModelProvider in project Signal-Android by WhisperSystems.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    MyAdapter adapter = new MyAdapter(this);
    RecyclerView list = findViewById(R.id.list);
    LinearLayoutManager layoutManager = new LinearLayoutManager(this);
    list.setAdapter(adapter);
    list.setLayoutManager(layoutManager);
    viewModel = new ViewModelProvider(this, new ViewModelProvider.NewInstanceFactory()).get(MainViewModel.class);
    adapter.setPagingController(viewModel.getPagingController());
    viewModel.getList().observe(this, newList -> {
        adapter.submitList(newList);
    });
    findViewById(R.id.invalidate_btn).setOnClickListener(v -> {
        viewModel.getPagingController().onDataInvalidated();
    });
    findViewById(R.id.down250_btn).setOnClickListener(v -> {
        int target = Math.min(adapter.getItemCount() - 1, layoutManager.findFirstVisibleItemPosition() + 250);
        layoutManager.scrollToPosition(target);
    });
    findViewById(R.id.up250_btn).setOnClickListener(v -> {
        int target = Math.max(0, layoutManager.findFirstVisibleItemPosition() - 250);
        layoutManager.scrollToPosition(target);
    });
    findViewById(R.id.prepend_btn).setOnClickListener(v -> {
        viewModel.prependItems();
    });
}
Also used : RecyclerView(androidx.recyclerview.widget.RecyclerView) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) ViewModelProvider(androidx.lifecycle.ViewModelProvider)

Example 40 with ViewModelProvider

use of androidx.lifecycle.ViewModelProvider in project Signal-Android by WhisperSystems.

the class ConversationFragment method onCreateView.

@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle bundle) {
    final View view = inflater.inflate(R.layout.conversation_fragment, container, false);
    videoContainer = view.findViewById(R.id.video_container);
    list = view.findViewById(android.R.id.list);
    composeDivider = view.findViewById(R.id.compose_divider);
    layoutTransition = new LayoutTransition();
    transitionListener = new TransitionListener(list);
    scrollToBottomButton = view.findViewById(R.id.scroll_to_bottom);
    scrollToMentionButton = view.findViewById(R.id.scroll_to_mention);
    scrollDateHeader = view.findViewById(R.id.scroll_date_header);
    toolbarShadow = requireActivity().findViewById(R.id.conversation_toolbar_shadow);
    reactionsShade = view.findViewById(R.id.reactions_shade);
    bottomActionBar = view.findViewById(R.id.conversation_bottom_action_bar);
    final LinearLayoutManager layoutManager = new SmoothScrollingLinearLayoutManager(getActivity(), true);
    final ConversationItemAnimator conversationItemAnimator = new ConversationItemAnimator(() -> {
        ConversationAdapter adapter = getListAdapter();
        if (adapter == null) {
            return false;
        } else {
            return Util.hasItems(adapter.getSelectedItems());
        }
    }, () -> conversationViewModel.shouldPlayMessageAnimations() && list.getScrollState() == RecyclerView.SCROLL_STATE_IDLE, () -> list.canScrollVertically(1) || list.canScrollVertically(-1));
    multiselectItemDecoration = new MultiselectItemDecoration(requireContext(), () -> conversationViewModel.getWallpaper().getValue());
    list.setHasFixedSize(false);
    list.setLayoutManager(layoutManager);
    RecyclerViewColorizer recyclerViewColorizer = new RecyclerViewColorizer(list);
    list.addItemDecoration(multiselectItemDecoration);
    list.setItemAnimator(conversationItemAnimator);
    getViewLifecycleOwner().getLifecycle().addObserver(multiselectItemDecoration);
    snapToTopDataObserver = new ConversationSnapToTopDataObserver(list, new ConversationScrollRequestValidator());
    conversationBanner = (ConversationBannerView) inflater.inflate(R.layout.conversation_item_banner, container, false);
    topLoadMoreView = (ViewSwitcher) inflater.inflate(R.layout.load_more_header, container, false);
    bottomLoadMoreView = (ViewSwitcher) inflater.inflate(R.layout.load_more_header, container, false);
    initializeLoadMoreView(topLoadMoreView);
    initializeLoadMoreView(bottomLoadMoreView);
    typingView = (ConversationTypingView) inflater.inflate(R.layout.conversation_typing_view, container, false);
    new ConversationItemSwipeCallback(conversationMessage -> actionMode == null && MenuState.canReplyToMessage(recipient.get(), MenuState.isActionMessage(conversationMessage.getMessageRecord()), conversationMessage.getMessageRecord(), messageRequestViewModel.shouldShowMessageRequest(), groupViewModel.isNonAdminInAnnouncementGroup()), this::handleReplyMessage).attachToRecyclerView(list);
    giphyMp4ProjectionRecycler = initializeGiphyMp4();
    this.groupViewModel = new ViewModelProvider(getParentFragment(), new ConversationGroupViewModel.Factory()).get(ConversationGroupViewModel.class);
    this.messageCountsViewModel = new ViewModelProvider(getParentFragment()).get(MessageCountsViewModel.class);
    this.conversationViewModel = new ViewModelProvider(getParentFragment(), new ConversationViewModel.Factory()).get(ConversationViewModel.class);
    conversationViewModel.getChatColors().observe(getViewLifecycleOwner(), recyclerViewColorizer::setChatColors);
    conversationViewModel.getMessages().observe(getViewLifecycleOwner(), messages -> {
        ConversationAdapter adapter = getListAdapter();
        if (adapter != null) {
            getListAdapter().submitList(messages, () -> {
                list.post(() -> conversationViewModel.onMessagesCommitted(messages));
            });
        }
    });
    conversationViewModel.getConversationMetadata().observe(getViewLifecycleOwner(), this::presentConversationMetadata);
    conversationViewModel.getShowMentionsButton().observe(getViewLifecycleOwner(), shouldShow -> {
        if (shouldShow) {
            ViewUtil.animateIn(scrollToMentionButton, mentionButtonInAnimation);
        } else {
            ViewUtil.animateOut(scrollToMentionButton, mentionButtonOutAnimation, View.INVISIBLE);
        }
    });
    conversationViewModel.getShowScrollToBottom().observe(getViewLifecycleOwner(), shouldShow -> {
        if (shouldShow) {
            ViewUtil.animateIn(scrollToBottomButton, scrollButtonInAnimation);
        } else {
            ViewUtil.animateOut(scrollToBottomButton, scrollButtonOutAnimation, View.INVISIBLE);
        }
    });
    scrollToBottomButton.setOnClickListener(v -> scrollToBottom());
    scrollToMentionButton.setOnClickListener(v -> scrollToNextMention());
    updateToolbarDependentMargins();
    colorizer = new Colorizer();
    conversationViewModel.getNameColorsMap().observe(getViewLifecycleOwner(), nameColorsMap -> {
        colorizer.onNameColorsChanged(nameColorsMap);
        ConversationAdapter adapter = getListAdapter();
        if (adapter != null) {
            adapter.notifyItemRangeChanged(0, adapter.getItemCount(), ConversationAdapter.PAYLOAD_NAME_COLORS);
        }
    });
    conversationUpdateTick = new ConversationUpdateTick(this::updateConversationItemTimestamps);
    getViewLifecycleOwner().getLifecycle().addObserver(conversationUpdateTick);
    listener.getVoiceNoteMediaController().getVoiceNotePlayerViewState().observe(getViewLifecycleOwner(), state -> conversationViewModel.setInlinePlayerVisible(state.isPresent()));
    conversationViewModel.getConversationTopMargin().observe(getViewLifecycleOwner(), topMargin -> {
        lastSeenScrollOffset = topMargin;
        ViewUtil.setTopMargin(scrollDateHeader, topMargin + ViewUtil.dpToPx(8));
    });
    conversationViewModel.getActiveNotificationProfile().observe(getViewLifecycleOwner(), this::updateNotificationProfileStatus);
    initializeScrollButtonAnimations();
    initializeResources();
    initializeMessageRequestViewModel();
    initializeListAdapter();
    conversationViewModel.getSearchQuery().observe(getViewLifecycleOwner(), this::onSearchQueryUpdated);
    return view;
}
Also used : TypingStatusRepository(org.thoughtcrime.securesms.components.TypingStatusRepository) Bundle(android.os.Bundle) GroupMigrationMembershipChange(org.thoughtcrime.securesms.groups.GroupMigrationMembershipChange) RecaptchaProofBottomSheetFragment(org.thoughtcrime.securesms.ratelimit.RecaptchaProofBottomSheetFragment) GiphyMp4ItemDecoration(org.thoughtcrime.securesms.giph.mp4.GiphyMp4ItemDecoration) LinkPreview(org.thoughtcrime.securesms.linkpreview.LinkPreview) NonNull(androidx.annotation.NonNull) Uri(android.net.Uri) FrameLayout(android.widget.FrameLayout) AppCompatActivity(androidx.appcompat.app.AppCompatActivity) RecyclerViewColorizer(org.thoughtcrime.securesms.conversation.colors.RecyclerViewColorizer) ProgressDialogAsyncTask(org.thoughtcrime.securesms.util.task.ProgressDialogAsyncTask) Manifest(android.Manifest) LayoutTransition(android.animation.LayoutTransition) ActivityOptionsCompat(androidx.core.app.ActivityOptionsCompat) MultiselectForwardFragmentArgs(org.thoughtcrime.securesms.conversation.mutiselect.forward.MultiselectForwardFragmentArgs) RecipientId(org.thoughtcrime.securesms.recipients.RecipientId) MmsMessageRecord(org.thoughtcrime.securesms.database.model.MmsMessageRecord) SnapToTopDataObserver(org.thoughtcrime.securesms.util.SnapToTopDataObserver) HtmlUtil(org.thoughtcrime.securesms.util.HtmlUtil) PartAuthority(org.thoughtcrime.securesms.mms.PartAuthority) MultiDeviceViewOnceOpenJob(org.thoughtcrime.securesms.jobs.MultiDeviceViewOnceOpenJob) OutgoingTextMessage(org.thoughtcrime.securesms.sms.OutgoingTextMessage) ViewCompat(androidx.core.view.ViewCompat) StickyHeaderViewHolder(org.thoughtcrime.securesms.conversation.ConversationAdapter.StickyHeaderViewHolder) MultiselectForwardFragment(org.thoughtcrime.securesms.conversation.mutiselect.forward.MultiselectForwardFragment) ApplicationDependencies(org.thoughtcrime.securesms.dependencies.ApplicationDependencies) Set(java.util.Set) ReactionRecord(org.thoughtcrime.securesms.database.model.ReactionRecord) DimensionUnit(org.signal.core.util.DimensionUnit) SmoothScrollingLinearLayoutManager(org.thoughtcrime.securesms.components.recyclerview.SmoothScrollingLinearLayoutManager) MessageRecordUtil(org.thoughtcrime.securesms.util.MessageRecordUtil) Unit(kotlin.Unit) Nullable(androidx.annotation.Nullable) ChatWallpaper(org.thoughtcrime.securesms.wallpaper.ChatWallpaper) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) StickyHeaderDecoration(org.thoughtcrime.securesms.util.StickyHeaderDecoration) OutgoingMediaMessage(org.thoughtcrime.securesms.mms.OutgoingMediaMessage) SignalDatabase(org.thoughtcrime.securesms.database.SignalDatabase) Stream(com.annimon.stream.Stream) ViewKt(androidx.core.view.ViewKt) Util(org.thoughtcrime.securesms.util.Util) ArrayList(java.util.ArrayList) MessageRequestState(org.thoughtcrime.securesms.messagerequests.MessageRequestState) SpannableStringBuilder(android.text.SpannableStringBuilder) SignalProxyUtil(org.thoughtcrime.securesms.util.SignalProxyUtil) Toast(android.widget.Toast) Menu(android.view.Menu) MediaMmsMessageRecord(org.thoughtcrime.securesms.database.model.MediaMmsMessageRecord) GiphyMp4ProjectionRecycler(org.thoughtcrime.securesms.giph.mp4.GiphyMp4ProjectionRecycler) LiveData(androidx.lifecycle.LiveData) ListenableFuture(org.thoughtcrime.securesms.util.concurrent.ListenableFuture) LiveRecipient(org.thoughtcrime.securesms.recipients.LiveRecipient) DirectoryRefreshJob(org.thoughtcrime.securesms.jobs.DirectoryRefreshJob) Collectors(com.annimon.stream.Collectors) ViewModelProvider(androidx.lifecycle.ViewModelProvider) Contact(org.thoughtcrime.securesms.contactshare.Contact) RecipientBottomSheetDialogFragment(org.thoughtcrime.securesms.recipients.ui.bottomsheet.RecipientBottomSheetDialogFragment) Permissions(org.thoughtcrime.securesms.permissions.Permissions) TextUtils(android.text.TextUtils) SafetyNumberChangeDialog(org.thoughtcrime.securesms.conversation.ui.error.SafetyNumberChangeDialog) IOException(java.io.IOException) Optional(org.whispersystems.libsignal.util.guava.Optional) ExecutionException(java.util.concurrent.ExecutionException) ItemClickListener(org.thoughtcrime.securesms.conversation.ConversationAdapter.ItemClickListener) StickerLocator(org.thoughtcrime.securesms.stickers.StickerLocator) Configuration(android.content.res.Configuration) Stopwatch(org.thoughtcrime.securesms.util.Stopwatch) RecipientExporter(org.thoughtcrime.securesms.recipients.RecipientExporter) LoggingFragment(org.thoughtcrime.securesms.LoggingFragment) PhoneNumberFormatter(org.thoughtcrime.securesms.phonenumbers.PhoneNumberFormatter) ValueAnimator(android.animation.ValueAnimator) SignalStore(org.thoughtcrime.securesms.keyvalue.SignalStore) Rect(android.graphics.Rect) ConversationTypingView(org.thoughtcrime.securesms.components.ConversationTypingView) SignalBottomActionBar(org.thoughtcrime.securesms.components.menu.SignalBottomActionBar) MessageSender(org.thoughtcrime.securesms.sms.MessageSender) MaterialAlertDialogBuilder(com.google.android.material.dialog.MaterialAlertDialogBuilder) GroupLinkInviteFriendsBottomSheetDialogFragment(org.thoughtcrime.securesms.groups.ui.invitesandrequests.invite.GroupLinkInviteFriendsBottomSheetDialogFragment) ViewUtil(org.thoughtcrime.securesms.util.ViewUtil) Animator(android.animation.Animator) R(org.thoughtcrime.securesms.R) MessageRecord(org.thoughtcrime.securesms.database.model.MessageRecord) GiphyMp4ProjectionPlayerHolder(org.thoughtcrime.securesms.giph.mp4.GiphyMp4ProjectionPlayerHolder) SmsDatabase(org.thoughtcrime.securesms.database.SmsDatabase) Locale(java.util.Locale) View(android.view.View) ViewOnceUtil(org.thoughtcrime.securesms.revealable.ViewOnceUtil) Recipient(org.thoughtcrime.securesms.recipients.Recipient) Animation(android.view.animation.Animation) RecyclerView(androidx.recyclerview.widget.RecyclerView) VoiceNotePlaybackState(org.thoughtcrime.securesms.components.voice.VoiceNotePlaybackState) NavHostFragment(androidx.navigation.fragment.NavHostFragment) SignalExecutors(org.signal.core.util.concurrent.SignalExecutors) ViewSwitcher(android.widget.ViewSwitcher) AppSettingsActivity(org.thoughtcrime.securesms.components.settings.app.AppSettingsActivity) AsyncTask(android.os.AsyncTask) ContactUtil(org.thoughtcrime.securesms.contactshare.ContactUtil) MessageRequestViewModel(org.thoughtcrime.securesms.messagerequests.MessageRequestViewModel) HtmlCompat(androidx.core.text.HtmlCompat) LongMessageFragment(org.thoughtcrime.securesms.longmessage.LongMessageFragment) NotificationProfile(org.thoughtcrime.securesms.notifications.profiles.NotificationProfile) ViewGroup(android.view.ViewGroup) VoiceNoteMediaControllerOwner(org.thoughtcrime.securesms.components.voice.VoiceNoteMediaControllerOwner) Objects(java.util.Objects) Log(org.signal.core.util.logging.Log) List(java.util.List) TextView(android.widget.TextView) Slide(org.thoughtcrime.securesms.mms.Slide) ConversationItemAnimator(org.thoughtcrime.securesms.conversation.mutiselect.ConversationItemAnimator) GroupId(org.thoughtcrime.securesms.groups.GroupId) Toolbar(androidx.appcompat.widget.Toolbar) MessageDatabase(org.thoughtcrime.securesms.database.MessageDatabase) GiphyMp4PlaybackPolicy(org.thoughtcrime.securesms.giph.mp4.GiphyMp4PlaybackPolicy) OnScrollListener(androidx.recyclerview.widget.RecyclerView.OnScrollListener) SaveAttachmentTask(org.thoughtcrime.securesms.util.SaveAttachmentTask) Snackbar(com.google.android.material.snackbar.Snackbar) MmsDatabase(org.thoughtcrime.securesms.database.MmsDatabase) GlideApp(org.thoughtcrime.securesms.mms.GlideApp) Context(android.content.Context) AlertDialog(androidx.appcompat.app.AlertDialog) SharedContactDetailsActivity(org.thoughtcrime.securesms.contactshare.SharedContactDetailsActivity) TopToastPopup(org.thoughtcrime.securesms.util.TopToastPopup) MultiselectPart(org.thoughtcrime.securesms.conversation.mutiselect.MultiselectPart) ReactionsBottomSheetDialogFragment(org.thoughtcrime.securesms.reactions.ReactionsBottomSheetDialogFragment) SignalLocalMetrics(org.thoughtcrime.securesms.util.SignalLocalMetrics) Intent(android.content.Intent) MenuItem(android.view.MenuItem) AnimationUtils(android.view.animation.AnimationUtils) TextSecurePreferences(org.thoughtcrime.securesms.util.TextSecurePreferences) HashSet(java.util.HashSet) SuppressLint(android.annotation.SuppressLint) StickerPackPreviewActivity(org.thoughtcrime.securesms.stickers.StickerPackPreviewActivity) ActionItem(org.thoughtcrime.securesms.components.menu.ActionItem) GroupsV1MigrationInfoBottomSheetDialogFragment(org.thoughtcrime.securesms.groups.ui.migration.GroupsV1MigrationInfoBottomSheetDialogFragment) Colorizer(org.thoughtcrime.securesms.conversation.colors.Colorizer) ConversationScrollToView(org.thoughtcrime.securesms.components.ConversationScrollToView) ViewOnceMessageActivity(org.thoughtcrime.securesms.revealable.ViewOnceMessageActivity) GiphyMp4PlaybackController(org.thoughtcrime.securesms.giph.mp4.GiphyMp4PlaybackController) SimpleTask(org.thoughtcrime.securesms.util.concurrent.SimpleTask) VerifyIdentityActivity(org.thoughtcrime.securesms.verify.VerifyIdentityActivity) MultiselectItemDecoration(org.thoughtcrime.securesms.conversation.mutiselect.MultiselectItemDecoration) GroupDescriptionDialog(org.thoughtcrime.securesms.groups.ui.managegroup.dialogs.GroupDescriptionDialog) GroupDescriptionUtil(org.thoughtcrime.securesms.groups.v2.GroupDescriptionUtil) LayoutInflater(android.view.LayoutInflater) ActivityCompat(androidx.core.app.ActivityCompat) MessageDetailsFragment(org.thoughtcrime.securesms.messagedetails.MessageDetailsFragment) RemoteDeleteUtil(org.thoughtcrime.securesms.util.RemoteDeleteUtil) BlobProvider(org.thoughtcrime.securesms.providers.BlobProvider) CommunicationActions(org.thoughtcrime.securesms.util.CommunicationActions) CachedInflater(org.thoughtcrime.securesms.util.CachedInflater) InMemoryMessageRecord(org.thoughtcrime.securesms.database.model.InMemoryMessageRecord) ActionMode(androidx.appcompat.view.ActionMode) WindowUtil(org.thoughtcrime.securesms.util.WindowUtil) Color(android.graphics.Color) Observer(androidx.lifecycle.Observer) StorageUtil(org.thoughtcrime.securesms.util.StorageUtil) Bitmap(android.graphics.Bitmap) EnableCallNotificationSettingsDialog(org.thoughtcrime.securesms.conversation.ui.error.EnableCallNotificationSettingsDialog) ViewTreeObserver(android.view.ViewTreeObserver) Collections(java.util.Collections) InputStream(java.io.InputStream) LayoutTransition(android.animation.LayoutTransition) SmoothScrollingLinearLayoutManager(org.thoughtcrime.securesms.components.recyclerview.SmoothScrollingLinearLayoutManager) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) ConversationTypingView(org.thoughtcrime.securesms.components.ConversationTypingView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) TextView(android.widget.TextView) ConversationScrollToView(org.thoughtcrime.securesms.components.ConversationScrollToView) RecyclerViewColorizer(org.thoughtcrime.securesms.conversation.colors.RecyclerViewColorizer) Colorizer(org.thoughtcrime.securesms.conversation.colors.Colorizer) RecyclerViewColorizer(org.thoughtcrime.securesms.conversation.colors.RecyclerViewColorizer) SmoothScrollingLinearLayoutManager(org.thoughtcrime.securesms.components.recyclerview.SmoothScrollingLinearLayoutManager) ConversationItemAnimator(org.thoughtcrime.securesms.conversation.mutiselect.ConversationItemAnimator) MultiselectItemDecoration(org.thoughtcrime.securesms.conversation.mutiselect.MultiselectItemDecoration) ViewModelProvider(androidx.lifecycle.ViewModelProvider)

Aggregations

ViewModelProvider (androidx.lifecycle.ViewModelProvider)56 TextView (android.widget.TextView)13 Intent (android.content.Intent)12 View (android.view.View)11 FirebaseUiException (com.firebase.ui.auth.FirebaseUiException)8 IdpResponse (com.firebase.ui.auth.IdpResponse)8 Bundle (android.os.Bundle)7 Toolbar (androidx.appcompat.widget.Toolbar)7 FirebaseAuthAnonymousUpgradeException (com.firebase.ui.auth.FirebaseAuthAnonymousUpgradeException)7 Handler (android.os.Handler)6 HandlerThread (android.os.HandlerThread)5 SpannableStringBuilder (android.text.SpannableStringBuilder)5 Nullable (androidx.annotation.Nullable)5 RecyclerView (androidx.recyclerview.widget.RecyclerView)5 LinearLayoutManager (androidx.recyclerview.widget.LinearLayoutManager)4 Animator (android.animation.Animator)3 Bitmap (android.graphics.Bitmap)3 BitmapDrawable (android.graphics.drawable.BitmapDrawable)3 Uri (android.net.Uri)3 FragmentManager (androidx.fragment.app.FragmentManager)3