Search in sources :

Example 1 with StatusDisplayOptions

use of com.keylesspalace.tusky.util.StatusDisplayOptions in project Tusky by Vavassor.

the class NotificationsFragment method onCreateView.

@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_timeline_notifications, container, false);
    // from inflater to silence warning
    @NonNull Context context = inflater.getContext();
    SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getActivity());
    boolean showNotificationsFilterSetting = preferences.getBoolean("showNotificationsFilter", true);
    // Clear notifications on filter visibility change to force refresh
    if (showNotificationsFilterSetting != showNotificationsFilter)
        notifications.clear();
    showNotificationsFilter = showNotificationsFilterSetting;
    // Setup the SwipeRefreshLayout.
    swipeRefreshLayout = rootView.findViewById(R.id.swipeRefreshLayout);
    recyclerView = rootView.findViewById(R.id.recyclerView);
    progressBar = rootView.findViewById(R.id.progressBar);
    statusView = rootView.findViewById(R.id.statusView);
    appBarOptions = rootView.findViewById(R.id.appBarOptions);
    swipeRefreshLayout.setOnRefreshListener(this);
    swipeRefreshLayout.setColorSchemeResources(R.color.tusky_blue);
    loadNotificationsFilter();
    // Setup the RecyclerView.
    recyclerView.setHasFixedSize(true);
    layoutManager = new LinearLayoutManager(context);
    recyclerView.setLayoutManager(layoutManager);
    recyclerView.setAccessibilityDelegateCompat(new ListStatusAccessibilityDelegate(recyclerView, this, (pos) -> {
        NotificationViewData notification = notifications.getPairedItemOrNull(pos);
        // We support replies only for now
        if (notification instanceof NotificationViewData.Concrete) {
            return ((NotificationViewData.Concrete) notification).getStatusViewData();
        } else {
            return null;
        }
    }));
    recyclerView.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL));
    StatusDisplayOptions statusDisplayOptions = new StatusDisplayOptions(preferences.getBoolean("animateGifAvatars", false), accountManager.getActiveAccount().getMediaPreviewEnabled(), preferences.getBoolean("absoluteTimeView", false), preferences.getBoolean("showBotOverlay", true), preferences.getBoolean("useBlurhash", true), CardViewMode.NONE, preferences.getBoolean("confirmReblogs", true), preferences.getBoolean("confirmFavourites", false), preferences.getBoolean(PrefKeys.WELLBEING_HIDE_STATS_POSTS, false), preferences.getBoolean(PrefKeys.ANIMATE_CUSTOM_EMOJIS, false));
    adapter = new NotificationsAdapter(accountManager.getActiveAccount().getAccountId(), dataSource, statusDisplayOptions, this, this, this);
    alwaysShowSensitiveMedia = accountManager.getActiveAccount().getAlwaysShowSensitiveMedia();
    alwaysOpenSpoiler = accountManager.getActiveAccount().getAlwaysOpenSpoiler();
    recyclerView.setAdapter(adapter);
    topLoading = false;
    bottomLoading = false;
    bottomId = null;
    updateAdapter();
    Button buttonClear = rootView.findViewById(R.id.buttonClear);
    buttonClear.setOnClickListener(v -> confirmClearNotifications());
    buttonFilter = rootView.findViewById(R.id.buttonFilter);
    buttonFilter.setOnClickListener(v -> showFilterMenu());
    if (notifications.isEmpty()) {
        swipeRefreshLayout.setEnabled(false);
        sendFetchNotificationsRequest(null, null, FetchEnd.BOTTOM, -1);
    } else {
        progressBar.setVisibility(View.GONE);
    }
    ((SimpleItemAnimator) recyclerView.getItemAnimator()).setSupportsChangeAnimations(false);
    updateFilterVisibility();
    return rootView;
}
Also used : Context(android.content.Context) DividerItemDecoration(androidx.recyclerview.widget.DividerItemDecoration) Bundle(android.os.Bundle) ProgressBar(android.widget.ProgressBar) NonNull(androidx.annotation.NonNull) AsyncDifferConfig(androidx.recyclerview.widget.AsyncDifferConfig) SimpleItemAnimator(androidx.recyclerview.widget.SimpleItemAnimator) Utils(at.connyduck.sparkbutton.helpers.Utils) AccountActionListener(com.keylesspalace.tusky.interfaces.AccountActionListener) NotificationTypeConverterKt(com.keylesspalace.tusky.util.NotificationTypeConverterKt) AppBarLayout(com.google.android.material.appbar.AppBarLayout) BackgroundMessageView(com.keylesspalace.tusky.view.BackgroundMessageView) Locale(java.util.Locale) FloatingActionButton(com.google.android.material.floatingactionbutton.FloatingActionButton) ActionButtonActivity(com.keylesspalace.tusky.interfaces.ActionButtonActivity) View(android.view.View) Button(android.widget.Button) RecyclerView(androidx.recyclerview.widget.RecyclerView) Function(androidx.arch.core.util.Function) Log(android.util.Log) ViewDataUtils(com.keylesspalace.tusky.util.ViewDataUtils) StatusViewData(com.keylesspalace.tusky.viewdata.StatusViewData) CoordinatorLayout(androidx.coordinatorlayout.widget.CoordinatorLayout) ListUpdateCallback(androidx.recyclerview.widget.ListUpdateCallback) DiffUtil(androidx.recyclerview.widget.DiffUtil) PreferenceChangedEvent(com.keylesspalace.tusky.appstore.PreferenceChangedEvent) StatusActionListener(com.keylesspalace.tusky.interfaces.StatusActionListener) Set(java.util.Set) Function1(kotlin.jvm.functions.Function1) Relationship(com.keylesspalace.tusky.entity.Relationship) ViewGroup(android.view.ViewGroup) ReselectableFragment(com.keylesspalace.tusky.interfaces.ReselectableFragment) Objects(java.util.Objects) FavoriteEvent(com.keylesspalace.tusky.appstore.FavoriteEvent) StatusDisplayOptions(com.keylesspalace.tusky.util.StatusDisplayOptions) AndroidSchedulers(io.reactivex.rxjava3.android.schedulers.AndroidSchedulers) List(java.util.List) Unit(kotlin.Unit) AutoDispose.autoDisposable(autodispose2.AutoDispose.autoDisposable) Nullable(androidx.annotation.Nullable) Pair(androidx.core.util.Pair) Disposable(io.reactivex.rxjava3.disposables.Disposable) CollectionsKt(kotlin.collections.CollectionsKt) AsyncListDiffer(androidx.recyclerview.widget.AsyncListDiffer) ListView(android.widget.ListView) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) StringUtils.isLessThan(com.keylesspalace.tusky.util.StringUtils.isLessThan) AccountEntity(com.keylesspalace.tusky.db.AccountEntity) Context(android.content.Context) BookmarkEvent(com.keylesspalace.tusky.appstore.BookmarkEvent) Notification(com.keylesspalace.tusky.entity.Notification) Single(io.reactivex.rxjava3.core.Single) AlertDialog(androidx.appcompat.app.AlertDialog) Status(com.keylesspalace.tusky.entity.Status) AndroidLifecycleScopeProvider.from(autodispose2.androidx.lifecycle.AndroidLifecycleScopeProvider.from) ReblogEvent(com.keylesspalace.tusky.appstore.ReblogEvent) Poll(com.keylesspalace.tusky.entity.Poll) NotificationViewData(com.keylesspalace.tusky.viewdata.NotificationViewData) PairedList(com.keylesspalace.tusky.util.PairedList) ArrayList(java.util.ArrayList) StatusBaseViewHolder(com.keylesspalace.tusky.adapter.StatusBaseViewHolder) PrefKeys(com.keylesspalace.tusky.settings.PrefKeys) HashSet(java.util.HashSet) Inject(javax.inject.Inject) Lifecycle(androidx.lifecycle.Lifecycle) CompositeDisposable(io.reactivex.rxjava3.disposables.CompositeDisposable) R(com.keylesspalace.tusky.R) CardViewMode(com.keylesspalace.tusky.util.CardViewMode) Observable(io.reactivex.rxjava3.core.Observable) AttachmentViewData(com.keylesspalace.tusky.viewdata.AttachmentViewData) DialogInterface(android.content.DialogInterface) ListStatusAccessibilityDelegate(com.keylesspalace.tusky.util.ListStatusAccessibilityDelegate) EventHub(com.keylesspalace.tusky.appstore.EventHub) BlockEvent(com.keylesspalace.tusky.appstore.BlockEvent) Iterator(java.util.Iterator) LayoutInflater(android.view.LayoutInflater) SwipeRefreshLayout(androidx.swiperefreshlayout.widget.SwipeRefreshLayout) PopupWindow(android.widget.PopupWindow) HttpHeaderLink(com.keylesspalace.tusky.util.HttpHeaderLink) Either(com.keylesspalace.tusky.util.Either) IOException(java.io.IOException) TimeUnit(java.util.concurrent.TimeUnit) ArrayAdapter(android.widget.ArrayAdapter) SparseBooleanArray(android.util.SparseBooleanArray) PinEvent(com.keylesspalace.tusky.appstore.PinEvent) SharedPreferences(android.content.SharedPreferences) NotificationsAdapter(com.keylesspalace.tusky.adapter.NotificationsAdapter) PreferenceManager(androidx.preference.PreferenceManager) ListUtils(com.keylesspalace.tusky.util.ListUtils) AccountManager(com.keylesspalace.tusky.db.AccountManager) EndlessOnScrollListener(com.keylesspalace.tusky.view.EndlessOnScrollListener) Injectable(com.keylesspalace.tusky.di.Injectable) Activity(android.app.Activity) Collections(java.util.Collections) SimpleItemAnimator(androidx.recyclerview.widget.SimpleItemAnimator) SharedPreferences(android.content.SharedPreferences) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) DividerItemDecoration(androidx.recyclerview.widget.DividerItemDecoration) BackgroundMessageView(com.keylesspalace.tusky.view.BackgroundMessageView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) ListView(android.widget.ListView) StatusDisplayOptions(com.keylesspalace.tusky.util.StatusDisplayOptions) NotificationsAdapter(com.keylesspalace.tusky.adapter.NotificationsAdapter) ListStatusAccessibilityDelegate(com.keylesspalace.tusky.util.ListStatusAccessibilityDelegate) FloatingActionButton(com.google.android.material.floatingactionbutton.FloatingActionButton) Button(android.widget.Button) NonNull(androidx.annotation.NonNull) NotificationViewData(com.keylesspalace.tusky.viewdata.NotificationViewData) Nullable(androidx.annotation.Nullable)

Example 2 with StatusDisplayOptions

use of com.keylesspalace.tusky.util.StatusDisplayOptions in project Tusky by Vavassor.

the class ViewThreadFragment method onCreate.

@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    thisThreadsStatusId = getArguments().getString("id");
    SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getActivity());
    StatusDisplayOptions statusDisplayOptions = new StatusDisplayOptions(preferences.getBoolean("animateGifAvatars", false), accountManager.getActiveAccount().getMediaPreviewEnabled(), preferences.getBoolean("absoluteTimeView", false), preferences.getBoolean("showBotOverlay", true), preferences.getBoolean("useBlurhash", true), preferences.getBoolean("showCardsInTimelines", false) ? CardViewMode.INDENTED : CardViewMode.NONE, preferences.getBoolean("confirmReblogs", true), preferences.getBoolean("confirmFavourites", false), preferences.getBoolean(PrefKeys.WELLBEING_HIDE_STATS_POSTS, false), preferences.getBoolean(PrefKeys.ANIMATE_CUSTOM_EMOJIS, false));
    adapter = new ThreadAdapter(statusDisplayOptions, this);
}
Also used : SharedPreferences(android.content.SharedPreferences) ThreadAdapter(com.keylesspalace.tusky.adapter.ThreadAdapter) StatusDisplayOptions(com.keylesspalace.tusky.util.StatusDisplayOptions)

Example 3 with StatusDisplayOptions

use of com.keylesspalace.tusky.util.StatusDisplayOptions in project Tusky by Vavassor.

the class StatusBaseViewHolder method setupPoll.

private void setupPoll(PollViewData poll, List<Emoji> emojis, StatusDisplayOptions statusDisplayOptions, StatusActionListener listener) {
    long timestamp = System.currentTimeMillis();
    boolean expired = poll.getExpired() || (poll.getExpiresAt() != null && timestamp > poll.getExpiresAt().getTime());
    Context context = pollDescription.getContext();
    pollOptions.setVisibility(View.VISIBLE);
    if (expired || poll.getVoted()) {
        // no voting possible
        View.OnClickListener viewThreadListener = v -> {
            int position = getBindingAdapterPosition();
            if (position != RecyclerView.NO_POSITION) {
                listener.onViewThread(position);
            }
        };
        pollAdapter.setup(poll.getOptions(), poll.getVotesCount(), poll.getVotersCount(), emojis, PollAdapter.RESULT, viewThreadListener, statusDisplayOptions.animateEmojis());
        pollButton.setVisibility(View.GONE);
    } else {
        // voting possible
        pollAdapter.setup(poll.getOptions(), poll.getVotesCount(), poll.getVotersCount(), emojis, poll.getMultiple() ? PollAdapter.MULTIPLE : PollAdapter.SINGLE, null, statusDisplayOptions.animateEmojis());
        pollButton.setVisibility(View.VISIBLE);
        pollButton.setOnClickListener(v -> {
            int position = getBindingAdapterPosition();
            if (position != RecyclerView.NO_POSITION) {
                List<Integer> pollResult = pollAdapter.getSelected();
                if (!pollResult.isEmpty()) {
                    listener.onVoteInPoll(position, pollResult);
                }
            }
        });
    }
    pollDescription.setVisibility(View.VISIBLE);
    pollDescription.setText(getPollInfoText(timestamp, poll, statusDisplayOptions, context));
}
Also used : Context(android.content.Context) ImageButton(android.widget.ImageButton) LinearLayout(android.widget.LinearLayout) DateUtils(android.text.format.DateUtils) NonNull(androidx.annotation.NonNull) Date(java.util.Date) ImageView(android.widget.ImageView) RequestBuilder(com.bumptech.glide.RequestBuilder) Utils(at.connyduck.sparkbutton.helpers.Utils) ColorDrawable(android.graphics.drawable.ColorDrawable) DrawableRes(androidx.annotation.DrawableRes) Drawable(android.graphics.drawable.Drawable) Card(com.keylesspalace.tusky.entity.Card) Locale(java.util.Locale) View(android.view.View) Button(android.widget.Button) MetaData(com.keylesspalace.tusky.entity.Attachment.MetaData) RecyclerView(androidx.recyclerview.widget.RecyclerView) ViewMediaActivity(com.keylesspalace.tusky.ViewMediaActivity) SparkButton(at.connyduck.sparkbutton.SparkButton) GranularRoundedCorners(com.bumptech.glide.load.resource.bitmap.GranularRoundedCorners) Focus(com.keylesspalace.tusky.entity.Attachment.Focus) StatusViewData(com.keylesspalace.tusky.viewdata.StatusViewData) StatusActionListener(com.keylesspalace.tusky.interfaces.StatusActionListener) HtmlCompat(androidx.core.text.HtmlCompat) BitmapDrawable(android.graphics.drawable.BitmapDrawable) ViewGroup(android.view.ViewGroup) DefaultItemAnimator(androidx.recyclerview.widget.DefaultItemAnimator) StatusDisplayOptions(com.keylesspalace.tusky.util.StatusDisplayOptions) List(java.util.List) TextView(android.widget.TextView) Nullable(androidx.annotation.Nullable) Attachment(com.keylesspalace.tusky.entity.Attachment) PollOptionViewData(com.keylesspalace.tusky.viewdata.PollOptionViewData) CollectionsKt(kotlin.collections.CollectionsKt) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) TimestampUtils(com.keylesspalace.tusky.util.TimestampUtils) PollViewDataKt(com.keylesspalace.tusky.viewdata.PollViewDataKt) Context(android.content.Context) Spanned(android.text.Spanned) AlertDialog(androidx.appcompat.app.AlertDialog) PollViewData(com.keylesspalace.tusky.viewdata.PollViewData) Status(com.keylesspalace.tusky.entity.Status) SimpleDateFormat(java.text.SimpleDateFormat) CenterCrop(com.bumptech.glide.load.resource.bitmap.CenterCrop) NumberFormat(java.text.NumberFormat) MaterialButton(com.google.android.material.button.MaterialButton) R(com.keylesspalace.tusky.R) CardViewMode(com.keylesspalace.tusky.util.CardViewMode) CustomEmojiHelper(com.keylesspalace.tusky.util.CustomEmojiHelper) Toast(android.widget.Toast) PollViewDataKt.buildDescription(com.keylesspalace.tusky.viewdata.PollViewDataKt.buildDescription) ThemeUtils(com.keylesspalace.tusky.util.ThemeUtils) Emoji(com.keylesspalace.tusky.entity.Emoji) LinkHelper(com.keylesspalace.tusky.util.LinkHelper) TextUtils(android.text.TextUtils) Glide(com.bumptech.glide.Glide) MediaPreviewImageView(com.keylesspalace.tusky.view.MediaPreviewImageView) ImageLoadingHelper(com.keylesspalace.tusky.util.ImageLoadingHelper) ImageView(android.widget.ImageView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) TextView(android.widget.TextView) MediaPreviewImageView(com.keylesspalace.tusky.view.MediaPreviewImageView)

Example 4 with StatusDisplayOptions

use of com.keylesspalace.tusky.util.StatusDisplayOptions in project Tusky by Vavassor.

the class StatusBaseViewHolder method setupCard.

protected void setupCard(StatusViewData.Concrete status, CardViewMode cardViewMode, StatusDisplayOptions statusDisplayOptions, final StatusActionListener listener) {
    final Card card = status.getActionable().getCard();
    if (cardViewMode != CardViewMode.NONE && status.getActionable().getAttachments().size() == 0 && card != null && !TextUtils.isEmpty(card.getUrl()) && (!status.isCollapsible() || !status.isCollapsed())) {
        cardView.setVisibility(View.VISIBLE);
        cardTitle.setText(card.getTitle());
        if (TextUtils.isEmpty(card.getDescription()) && TextUtils.isEmpty(card.getAuthorName())) {
            cardDescription.setVisibility(View.GONE);
        } else {
            cardDescription.setVisibility(View.VISIBLE);
            if (TextUtils.isEmpty(card.getDescription())) {
                cardDescription.setText(card.getAuthorName());
            } else {
                cardDescription.setText(card.getDescription());
            }
        }
        cardUrl.setText(card.getUrl());
        // If media previews are disabled, show placeholder for cards as well
        if (statusDisplayOptions.mediaPreviewEnabled() && !status.getActionable().getSensitive() && !TextUtils.isEmpty(card.getImage())) {
            int topLeftRadius = 0;
            int topRightRadius = 0;
            int bottomRightRadius = 0;
            int bottomLeftRadius = 0;
            int radius = cardImage.getContext().getResources().getDimensionPixelSize(R.dimen.card_radius);
            if (card.getWidth() > card.getHeight()) {
                cardView.setOrientation(LinearLayout.VERTICAL);
                cardImage.getLayoutParams().height = cardImage.getContext().getResources().getDimensionPixelSize(R.dimen.card_image_vertical_height);
                cardImage.getLayoutParams().width = ViewGroup.LayoutParams.MATCH_PARENT;
                cardInfo.getLayoutParams().height = ViewGroup.LayoutParams.MATCH_PARENT;
                cardInfo.getLayoutParams().width = ViewGroup.LayoutParams.WRAP_CONTENT;
                topLeftRadius = radius;
                topRightRadius = radius;
            } else {
                cardView.setOrientation(LinearLayout.HORIZONTAL);
                cardImage.getLayoutParams().height = ViewGroup.LayoutParams.MATCH_PARENT;
                cardImage.getLayoutParams().width = cardImage.getContext().getResources().getDimensionPixelSize(R.dimen.card_image_horizontal_width);
                cardInfo.getLayoutParams().height = ViewGroup.LayoutParams.WRAP_CONTENT;
                cardInfo.getLayoutParams().width = ViewGroup.LayoutParams.MATCH_PARENT;
                topLeftRadius = radius;
                bottomLeftRadius = radius;
            }
            RequestBuilder<Drawable> builder = Glide.with(cardImage).load(card.getImage());
            if (statusDisplayOptions.useBlurhash() && !TextUtils.isEmpty(card.getBlurhash())) {
                builder = builder.placeholder(decodeBlurHash(card.getBlurhash()));
            }
            builder.transform(new CenterCrop(), new GranularRoundedCorners(topLeftRadius, topRightRadius, bottomRightRadius, bottomLeftRadius)).into(cardImage);
        } else if (statusDisplayOptions.useBlurhash() && !TextUtils.isEmpty(card.getBlurhash())) {
            int radius = cardImage.getContext().getResources().getDimensionPixelSize(R.dimen.card_radius);
            cardView.setOrientation(LinearLayout.HORIZONTAL);
            cardImage.getLayoutParams().height = ViewGroup.LayoutParams.MATCH_PARENT;
            cardImage.getLayoutParams().width = cardImage.getContext().getResources().getDimensionPixelSize(R.dimen.card_image_horizontal_width);
            cardInfo.getLayoutParams().height = ViewGroup.LayoutParams.WRAP_CONTENT;
            cardInfo.getLayoutParams().width = ViewGroup.LayoutParams.MATCH_PARENT;
            Glide.with(cardImage).load(decodeBlurHash(card.getBlurhash())).transform(new CenterCrop(), new GranularRoundedCorners(radius, 0, 0, radius)).into(cardImage);
        } else {
            cardView.setOrientation(LinearLayout.HORIZONTAL);
            cardImage.getLayoutParams().height = ViewGroup.LayoutParams.MATCH_PARENT;
            cardImage.getLayoutParams().width = cardImage.getContext().getResources().getDimensionPixelSize(R.dimen.card_image_horizontal_width);
            cardInfo.getLayoutParams().height = ViewGroup.LayoutParams.WRAP_CONTENT;
            cardInfo.getLayoutParams().width = ViewGroup.LayoutParams.MATCH_PARENT;
            cardImage.setImageResource(R.drawable.card_image_placeholder);
        }
        View.OnClickListener visitLink = v -> listener.onViewUrl(card.getUrl());
        View.OnClickListener openImage = v -> cardView.getContext().startActivity(ViewMediaActivity.newSingleImageIntent(cardView.getContext(), card.getEmbed_url()));
        cardInfo.setOnClickListener(visitLink);
        // View embedded photos in our image viewer instead of opening the browser
        cardImage.setOnClickListener(card.getType().equals(Card.TYPE_PHOTO) && !TextUtils.isEmpty(card.getEmbed_url()) ? openImage : visitLink);
        cardView.setClipToOutline(true);
    } else {
        cardView.setVisibility(View.GONE);
    }
}
Also used : ImageButton(android.widget.ImageButton) LinearLayout(android.widget.LinearLayout) DateUtils(android.text.format.DateUtils) NonNull(androidx.annotation.NonNull) Date(java.util.Date) ImageView(android.widget.ImageView) RequestBuilder(com.bumptech.glide.RequestBuilder) Utils(at.connyduck.sparkbutton.helpers.Utils) ColorDrawable(android.graphics.drawable.ColorDrawable) DrawableRes(androidx.annotation.DrawableRes) Drawable(android.graphics.drawable.Drawable) Card(com.keylesspalace.tusky.entity.Card) Locale(java.util.Locale) View(android.view.View) Button(android.widget.Button) MetaData(com.keylesspalace.tusky.entity.Attachment.MetaData) RecyclerView(androidx.recyclerview.widget.RecyclerView) ViewMediaActivity(com.keylesspalace.tusky.ViewMediaActivity) SparkButton(at.connyduck.sparkbutton.SparkButton) GranularRoundedCorners(com.bumptech.glide.load.resource.bitmap.GranularRoundedCorners) Focus(com.keylesspalace.tusky.entity.Attachment.Focus) StatusViewData(com.keylesspalace.tusky.viewdata.StatusViewData) StatusActionListener(com.keylesspalace.tusky.interfaces.StatusActionListener) HtmlCompat(androidx.core.text.HtmlCompat) BitmapDrawable(android.graphics.drawable.BitmapDrawable) ViewGroup(android.view.ViewGroup) DefaultItemAnimator(androidx.recyclerview.widget.DefaultItemAnimator) StatusDisplayOptions(com.keylesspalace.tusky.util.StatusDisplayOptions) List(java.util.List) TextView(android.widget.TextView) Nullable(androidx.annotation.Nullable) Attachment(com.keylesspalace.tusky.entity.Attachment) PollOptionViewData(com.keylesspalace.tusky.viewdata.PollOptionViewData) CollectionsKt(kotlin.collections.CollectionsKt) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) TimestampUtils(com.keylesspalace.tusky.util.TimestampUtils) PollViewDataKt(com.keylesspalace.tusky.viewdata.PollViewDataKt) Context(android.content.Context) Spanned(android.text.Spanned) AlertDialog(androidx.appcompat.app.AlertDialog) PollViewData(com.keylesspalace.tusky.viewdata.PollViewData) Status(com.keylesspalace.tusky.entity.Status) SimpleDateFormat(java.text.SimpleDateFormat) CenterCrop(com.bumptech.glide.load.resource.bitmap.CenterCrop) NumberFormat(java.text.NumberFormat) MaterialButton(com.google.android.material.button.MaterialButton) R(com.keylesspalace.tusky.R) CardViewMode(com.keylesspalace.tusky.util.CardViewMode) CustomEmojiHelper(com.keylesspalace.tusky.util.CustomEmojiHelper) Toast(android.widget.Toast) PollViewDataKt.buildDescription(com.keylesspalace.tusky.viewdata.PollViewDataKt.buildDescription) ThemeUtils(com.keylesspalace.tusky.util.ThemeUtils) Emoji(com.keylesspalace.tusky.entity.Emoji) LinkHelper(com.keylesspalace.tusky.util.LinkHelper) TextUtils(android.text.TextUtils) Glide(com.bumptech.glide.Glide) MediaPreviewImageView(com.keylesspalace.tusky.view.MediaPreviewImageView) ImageLoadingHelper(com.keylesspalace.tusky.util.ImageLoadingHelper) GranularRoundedCorners(com.bumptech.glide.load.resource.bitmap.GranularRoundedCorners) ColorDrawable(android.graphics.drawable.ColorDrawable) Drawable(android.graphics.drawable.Drawable) BitmapDrawable(android.graphics.drawable.BitmapDrawable) CenterCrop(com.bumptech.glide.load.resource.bitmap.CenterCrop) ImageView(android.widget.ImageView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) TextView(android.widget.TextView) MediaPreviewImageView(com.keylesspalace.tusky.view.MediaPreviewImageView) Card(com.keylesspalace.tusky.entity.Card)

Aggregations

Context (android.content.Context)3 View (android.view.View)3 ViewGroup (android.view.ViewGroup)3 Button (android.widget.Button)3 NonNull (androidx.annotation.NonNull)3 Nullable (androidx.annotation.Nullable)3 AlertDialog (androidx.appcompat.app.AlertDialog)3 LinearLayoutManager (androidx.recyclerview.widget.LinearLayoutManager)3 RecyclerView (androidx.recyclerview.widget.RecyclerView)3 Utils (at.connyduck.sparkbutton.helpers.Utils)3 R (com.keylesspalace.tusky.R)3 Status (com.keylesspalace.tusky.entity.Status)3 StatusActionListener (com.keylesspalace.tusky.interfaces.StatusActionListener)3 CardViewMode (com.keylesspalace.tusky.util.CardViewMode)3 StatusDisplayOptions (com.keylesspalace.tusky.util.StatusDisplayOptions)3 SharedPreferences (android.content.SharedPreferences)2 BitmapDrawable (android.graphics.drawable.BitmapDrawable)2 ColorDrawable (android.graphics.drawable.ColorDrawable)2 Drawable (android.graphics.drawable.Drawable)2 Spanned (android.text.Spanned)2