Remove more unused resources.

This commit is contained in:
Greyson Parrelli
2026-09-15 18:26:03 -04:00
parent 174d934915
commit 5d4e8eaf57
43 changed files with 1 additions and 1517 deletions
@@ -1,92 +0,0 @@
package org.thoughtcrime.securesms.components
import android.content.Context
import android.graphics.PointF
import android.util.AttributeSet
import android.view.View
import android.view.ViewAnimationUtils
import android.widget.EditText
import androidx.annotation.StringRes
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.animation.addListener
import androidx.core.widget.addTextChangedListener
import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.util.TextSecurePreferences
import org.thoughtcrime.securesms.util.ViewUtil
import org.thoughtcrime.securesms.util.setIncognitoKeyboardEnabled
import org.thoughtcrime.securesms.util.visible
/**
* Search Toolbar following the Signal Material3 design spec.
*/
class Material3SearchToolbar @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null
) : ConstraintLayout(context, attrs) {
var listener: Listener? = null
private val input: EditText
private val circularRevealPoint = PointF()
init {
inflate(context, R.layout.material3_serarch_toolbar, this)
input = findViewById(R.id.search_input)
val close = findViewById<View>(R.id.search_close)
val clear = findViewById<View>(R.id.search_clear)
close.setOnClickListener { collapse() }
clear.setOnClickListener { input.setText("") }
input.setIncognitoKeyboardEnabled(TextSecurePreferences.isIncognitoKeyboardEnabled(context))
input.addTextChangedListener(afterTextChanged = {
clear.visible = !it.isNullOrBlank()
listener?.onSearchTextChange(it?.toString() ?: "")
})
}
fun setSearchInputHint(@StringRes hintStringRes: Int) {
input.setHint(hintStringRes)
}
fun display(x: Float, y: Float) {
if (!visible) {
circularRevealPoint.set(x, y)
val animator = ViewAnimationUtils.createCircularReveal(this, x.toInt(), y.toInt(), 0f, width.toFloat())
animator.duration = 400
visibility = VISIBLE
ViewUtil.focusAndShowKeyboard(input)
animator.start()
}
}
fun collapse() {
if (visibility == VISIBLE) {
listener?.onSearchClosed()
ViewUtil.hideKeyboard(context, input)
val animator = ViewAnimationUtils.createCircularReveal(this, circularRevealPoint.x.toInt(), circularRevealPoint.y.toInt(), width.toFloat(), 0f)
animator.duration = 400
animator.addListener(onEnd = {
visibility = INVISIBLE
})
animator.start()
}
}
fun clearText() {
input.setText("")
}
interface Listener {
fun onSearchTextChange(text: String)
fun onSearchClosed()
}
}
@@ -1,167 +0,0 @@
package org.thoughtcrime.securesms.components;
import android.content.ContentUris;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.MediaStore;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.loader.app.LoaderManager;
import androidx.loader.content.Loader;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.Key;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions;
import com.bumptech.glide.signature.MediaStoreSignature;
import org.signal.core.util.logging.Log;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.database.CursorRecyclerViewAdapter;
import org.thoughtcrime.securesms.database.loaders.RecentPhotosLoader;
public class RecentPhotoViewRail extends FrameLayout implements LoaderManager.LoaderCallbacks<Cursor> {
@NonNull private final RecyclerView recyclerView;
@Nullable private OnItemClickedListener listener;
public RecentPhotoViewRail(Context context) {
this(context, null);
}
public RecentPhotoViewRail(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public RecentPhotoViewRail(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
inflate(context, R.layout.recent_photo_view, this);
this.recyclerView = findViewById(R.id.photo_list);
this.recyclerView.setLayoutManager(new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false));
this.recyclerView.setItemAnimator(new DefaultItemAnimator());
}
public void setListener(@Nullable OnItemClickedListener listener) {
this.listener = listener;
if (this.recyclerView.getAdapter() != null) {
((RecentPhotoAdapter)this.recyclerView.getAdapter()).setListener(listener);
}
}
@Override
public @NonNull Loader<Cursor> onCreateLoader(int id, Bundle args) {
return new RecentPhotosLoader(getContext());
}
@Override
public void onLoadFinished(@NonNull Loader<Cursor> loader, Cursor data) {
this.recyclerView.setAdapter(new RecentPhotoAdapter(getContext(), data, RecentPhotosLoader.BASE_URL, listener));
}
@Override
public void onLoaderReset(@NonNull Loader<Cursor> loader) {
((CursorRecyclerViewAdapter)this.recyclerView.getAdapter()).changeCursor(null);
}
private static class RecentPhotoAdapter extends CursorRecyclerViewAdapter<RecentPhotoAdapter.RecentPhotoViewHolder> {
@SuppressWarnings("unused")
private static final String TAG = Log.tag(RecentPhotoAdapter.class);
@NonNull private final Uri baseUri;
@Nullable private OnItemClickedListener clickedListener;
private RecentPhotoAdapter(@NonNull Context context, @NonNull Cursor cursor, @NonNull Uri baseUri, @Nullable OnItemClickedListener listener) {
super(context, cursor);
this.baseUri = baseUri;
this.clickedListener = listener;
}
@Override
public RecentPhotoViewHolder onCreateItemViewHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(parent.getContext())
.inflate(R.layout.recent_photo_view_item, parent, false);
return new RecentPhotoViewHolder(itemView);
}
@Override
public void onBindItemViewHolder(RecentPhotoViewHolder viewHolder, @NonNull Cursor cursor) {
viewHolder.imageView.setImageDrawable(null);
long rowId = cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.Images.ImageColumns._ID));
long dateTaken = cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.Images.ImageColumns.DATE_TAKEN));
long dateModified = cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.Images.ImageColumns.DATE_MODIFIED));
String mimeType = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Images.ImageColumns.MIME_TYPE));
String bucketId = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Images.ImageColumns.BUCKET_ID));
int orientation = cursor.getInt(cursor.getColumnIndexOrThrow(MediaStore.Images.ImageColumns.ORIENTATION));
long size = cursor.getInt(cursor.getColumnIndexOrThrow(MediaStore.Images.ImageColumns.SIZE));
int width = cursor.getInt(cursor.getColumnIndexOrThrow(getWidthColumn(orientation)));
int height = cursor.getInt(cursor.getColumnIndexOrThrow(getHeightColumn(orientation)));
final Uri uri = ContentUris.withAppendedId(RecentPhotosLoader.BASE_URL, rowId);
Key signature = new MediaStoreSignature(mimeType, dateModified, orientation);
Glide.with(getContext().getApplicationContext())
.load(uri)
.signature(signature)
.diskCacheStrategy(DiskCacheStrategy.NONE)
.transition(DrawableTransitionOptions.withCrossFade())
.centerCrop()
.into(viewHolder.imageView);
viewHolder.imageView.setOnClickListener(v -> {
if (clickedListener != null) clickedListener.onItemClicked(uri, mimeType, bucketId, dateTaken, width, height, size);
});
}
@SuppressWarnings("SuspiciousNameCombination")
private String getWidthColumn(int orientation) {
if (orientation == 0 || orientation == 180) return MediaStore.Images.ImageColumns.WIDTH;
else return MediaStore.Images.ImageColumns.HEIGHT;
}
@SuppressWarnings("SuspiciousNameCombination")
private String getHeightColumn(int orientation) {
if (orientation == 0 || orientation == 180) return MediaStore.Images.ImageColumns.HEIGHT;
else return MediaStore.Images.ImageColumns.WIDTH;
}
public void setListener(@Nullable OnItemClickedListener listener) {
this.clickedListener = listener;
}
static class RecentPhotoViewHolder extends RecyclerView.ViewHolder {
ImageView imageView;
RecentPhotoViewHolder(View itemView) {
super(itemView);
this.imageView = itemView.findViewById(R.id.thumbnail);
}
}
}
public interface OnItemClickedListener {
void onItemClicked(Uri uri, String mimeType, String bucketId, long dateTaken, int width, int height, long size);
}
}
@@ -1,157 +0,0 @@
package org.thoughtcrime.securesms.components;
import android.animation.Animator;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.AttributeSet;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewAnimationUtils;
import android.widget.EditText;
import android.widget.LinearLayout;
import androidx.annotation.MainThread;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.SearchView;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import org.signal.core.ui.compose.SignalIcons;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.animation.AnimationCompleteListener;
import org.thoughtcrime.securesms.util.EditTextExtensionsKt;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
import java.util.Objects;
public class SearchToolbar extends LinearLayout {
private float x, y;
private MenuItem searchItem;
private SearchListener listener;
public SearchToolbar(Context context) {
super(context);
initialize();
}
public SearchToolbar(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
initialize();
}
public SearchToolbar(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
initialize();
}
private void initialize() {
inflate(getContext(), R.layout.search_toolbar, this);
setOrientation(VERTICAL);
Toolbar toolbar = findViewById(R.id.toolbar);
Drawable drawable = ContextCompat.getDrawable(getContext(), org.signal.core.ui.R.drawable.symbol_arrow_start_24);
toolbar.setNavigationIcon(drawable);
toolbar.setCollapseIcon(drawable);
toolbar.inflateMenu(R.menu.conversation_list_search);
this.searchItem = toolbar.getMenu().findItem(R.id.action_filter_search);
SearchView searchView = (SearchView) searchItem.getActionView();
EditText searchText = searchView.findViewById(androidx.appcompat.R.id.search_src_text);
EditTextExtensionsKt.setIncognitoKeyboardEnabled(searchText, TextSecurePreferences.isIncognitoKeyboardEnabled(getContext()));
searchView.setSubmitButtonEnabled(false);
searchView.setMaxWidth(Integer.MAX_VALUE);
if (searchText != null) searchText.setHint(R.string.SearchToolbar_search);
else searchView.setQueryHint(getResources().getString(R.string.SearchToolbar_search));
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
if (listener != null) {
listener.onSearchTextChange(query);
}
return true;
}
@Override
public boolean onQueryTextChange(String newText) {
return onQueryTextSubmit(newText);
}
});
searchItem.setOnActionExpandListener(new MenuItem.OnActionExpandListener() {
@Override
public boolean onMenuItemActionExpand(MenuItem item) {
return true;
}
@Override
public boolean onMenuItemActionCollapse(MenuItem item) {
hide();
return true;
}
});
toolbar.setNavigationOnClickListener(v -> hide());
}
@MainThread
public void display(float x, float y) {
if (getVisibility() != View.VISIBLE) {
this.x = x;
this.y = y;
searchItem.expandActionView();
Animator animator = ViewAnimationUtils.createCircularReveal(this, (int)x, (int)y, 0, getWidth());
animator.setDuration(400);
setVisibility(View.VISIBLE);
animator.start();
}
}
public void collapse() {
searchItem.collapseActionView();
}
@MainThread
private void hide() {
if (getVisibility() == View.VISIBLE) {
if (listener != null) listener.onSearchClosed();
Animator animator = ViewAnimationUtils.createCircularReveal(this, (int)x, (int)y, getWidth(), 0);
animator.setDuration(400);
animator.addListener(new AnimationCompleteListener() {
@Override
public void onAnimationEnd(Animator animation) {
setVisibility(View.INVISIBLE);
}
});
animator.start();
}
}
public boolean isVisible() {
return getVisibility() == View.VISIBLE;
}
@MainThread
public void setListener(SearchListener listener) {
this.listener = listener;
}
public interface SearchListener {
void onSearchTextChange(String text);
void onSearchClosed();
}
}
@@ -1,35 +0,0 @@
package org.thoughtcrime.securesms.components.settings.conversation.preferences
import android.view.View
import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.components.settings.PreferenceModel
import org.thoughtcrime.securesms.recipients.Recipient
import org.thoughtcrime.securesms.util.adapter.mapping.LayoutFactory
import org.thoughtcrime.securesms.util.adapter.mapping.MappingAdapter
import org.thoughtcrime.securesms.util.adapter.mapping.MappingViewHolder
object InternalPreference {
fun register(adapter: MappingAdapter) {
adapter.registerFactory(Model::class.java, LayoutFactory(::ViewHolder, R.layout.conversation_settings_internal_preference))
}
class Model(
private val recipient: Recipient,
val onInternalDetailsClicked: () -> Unit
) : PreferenceModel<Model>() {
override fun areItemsTheSame(newItem: Model): Boolean {
return recipient == newItem.recipient
}
}
private class ViewHolder(itemView: View) : MappingViewHolder<Model>(itemView) {
private val internalDetails: View = itemView.findViewById(R.id.internal_details)
override fun bind(model: Model) {
internalDetails.setOnClickListener { model.onInternalDetailsClicked() }
}
}
}
@@ -5,7 +5,6 @@
package org.thoughtcrime.securesms.components.settings.models
import androidx.annotation.StringRes
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
@@ -23,44 +22,8 @@ import androidx.compose.ui.unit.dp
import org.signal.core.ui.compose.DayNightPreviews
import org.signal.core.ui.compose.Previews
import org.signal.core.ui.compose.horizontalGutters
import org.thoughtcrime.securesms.databinding.DslBannerBinding
import org.thoughtcrime.securesms.util.adapter.mapping.BindingFactory
import org.thoughtcrime.securesms.util.adapter.mapping.BindingViewHolder
import org.thoughtcrime.securesms.util.adapter.mapping.MappingAdapter
import org.thoughtcrime.securesms.util.adapter.mapping.MappingModel
import org.signal.core.ui.R as CoreUiR
/**
* Displays a banner to notify the user of certain state or action that needs to be taken.
*/
object Banner {
fun register(mappingAdapter: MappingAdapter) {
mappingAdapter.registerFactory(Model::class.java, BindingFactory(::ViewHolder, DslBannerBinding::inflate))
}
class Model(
@StringRes val textId: Int,
@StringRes val actionId: Int,
val onClick: () -> Unit
) : MappingModel<Model> {
override fun areItemsTheSame(newItem: Model): Boolean {
return true
}
override fun areContentsTheSame(newItem: Model): Boolean {
return textId == newItem.textId && actionId == newItem.actionId
}
}
private class ViewHolder(binding: DslBannerBinding) : BindingViewHolder<Model, DslBannerBinding>(binding) {
override fun bind(model: Model) {
binding.bannerText.setText(model.textId)
binding.bannerAction.setText(model.actionId)
binding.bannerAction.setOnClickListener { model.onClick() }
}
}
}
/**
* Replicates the Banner DSL preference for use in compose components.
*/
@@ -1,35 +0,0 @@
package org.thoughtcrime.securesms.components.settings.models
import org.thoughtcrime.securesms.components.settings.DSLSettingsText
import org.thoughtcrime.securesms.components.settings.PreferenceModel
import org.thoughtcrime.securesms.databinding.DslOutlinedLearnMoreBinding
import org.thoughtcrime.securesms.util.adapter.mapping.BindingFactory
import org.thoughtcrime.securesms.util.adapter.mapping.BindingViewHolder
import org.thoughtcrime.securesms.util.adapter.mapping.MappingAdapter
/**
* Show a informational text message in an outlined bubble.
*/
object OutlinedLearnMore {
fun register(mappingAdapter: MappingAdapter) {
mappingAdapter.registerFactory(Model::class.java, BindingFactory(::ViewHolder, DslOutlinedLearnMoreBinding::inflate))
}
class Model(
summary: DSLSettingsText,
val learnMoreUrl: String
) : PreferenceModel<Model>(summary = summary) {
override fun areContentsTheSame(newItem: Model): Boolean {
return super.areContentsTheSame(newItem) && learnMoreUrl == newItem.learnMoreUrl
}
}
private class ViewHolder(binding: DslOutlinedLearnMoreBinding) : BindingViewHolder<Model, DslOutlinedLearnMoreBinding>(binding) {
override fun bind(model: Model) {
binding.root.text = model.summary!!.resolve(context)
binding.root.setLearnMoreVisible(true)
binding.root.setLink(model.learnMoreUrl)
}
}
}
@@ -1,32 +0,0 @@
package org.thoughtcrime.securesms.components.settings.models
import android.view.View
import android.widget.TextView
import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.components.settings.DSLSettingsText
import org.thoughtcrime.securesms.components.settings.PreferenceModel
import org.thoughtcrime.securesms.util.adapter.mapping.LayoutFactory
import org.thoughtcrime.securesms.util.adapter.mapping.MappingAdapter
import org.thoughtcrime.securesms.util.adapter.mapping.MappingViewHolder
import org.thoughtcrime.securesms.util.visible
object Progress {
fun register(mappingAdapter: MappingAdapter) {
mappingAdapter.registerFactory(Model::class.java, LayoutFactory(::ViewHolder, R.layout.dsl_progress_pref))
}
data class Model(
override val title: DSLSettingsText?
) : PreferenceModel<Model>()
private class ViewHolder(itemView: View) : MappingViewHolder<Model>(itemView) {
private val title: TextView = itemView.findViewById(R.id.dsl_progress_pref_title)
override fun bind(model: Model) {
title.text = model.title?.resolve(context)
title.visible = model.title != null
}
}
}
@@ -1,94 +0,0 @@
package org.thoughtcrime.securesms.components.webrtc;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import android.widget.RadioButton;
import androidx.annotation.CallSuper;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.util.Consumer;
import androidx.recyclerview.widget.RecyclerView;
import org.thoughtcrime.securesms.R;
import java.util.List;
final class AudioOutputAdapter extends RecyclerView.Adapter<AudioOutputAdapter.ViewHolder> {
private final OnAudioOutputChangedListener onAudioOutputChangedListener;
private final List<WebRtcAudioOutput> audioOutputs;
private WebRtcAudioOutput selected;
AudioOutputAdapter(@NonNull OnAudioOutputChangedListener onAudioOutputChangedListener,
@NonNull List<WebRtcAudioOutput> audioOutputs) {
this.audioOutputs = audioOutputs;
this.onAudioOutputChangedListener = onAudioOutputChangedListener;
}
public void setSelectedOutput(@NonNull WebRtcAudioOutput selected) {
this.selected = selected;
notifyDataSetChanged();
}
@Override
public @NonNull ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.audio_output_adapter_radio_item, parent, false);
return new ViewHolder(view, this::handlePositionSelected);
}
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
holder.bind(audioOutputs.get(position), selected);
}
@Override
public int getItemCount() {
return audioOutputs.size();
}
private void handlePositionSelected(int position) {
WebRtcAudioOutput mode = audioOutputs.get(position);
if (mode != selected) {
setSelectedOutput(mode);
onAudioOutputChangedListener.audioOutputChanged(new WebRtcAudioDevice(selected, null));
}
}
static class ViewHolder extends RecyclerView.ViewHolder implements CompoundButton.OnCheckedChangeListener {
private final RadioButton radioButton;
private final Consumer<Integer> onPressed;
public ViewHolder(@NonNull View itemView, @NonNull Consumer<Integer> onPressed) {
super(itemView);
this.radioButton = itemView.findViewById(R.id.radio);
this.onPressed = onPressed;
}
@CallSuper
void bind(@NonNull WebRtcAudioOutput audioOutput, @Nullable WebRtcAudioOutput selected) {
radioButton.setText(audioOutput.getLabelRes());
radioButton.setCompoundDrawablesRelativeWithIntrinsicBounds(audioOutput.getIconRes(), 0, 0, 0);
radioButton.setOnCheckedChangeListener(null);
radioButton.setChecked(audioOutput == selected);
radioButton.setOnCheckedChangeListener(this);
}
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
int adapterPosition = getAdapterPosition();
if (adapterPosition != RecyclerView.NO_POSITION) {
onPressed.accept(adapterPosition);
}
}
}
}
@@ -1,7 +1,7 @@
package org.thoughtcrime.securesms.components.webrtc
/**
* This is an interface for [WebRtcAudioPicker31] and [WebRtcAudioPickerLegacy] as a callback for [org.thoughtcrime.securesms.components.webrtc.v2.CallAudioToggleButton]
* This is an interface for [WebRtcAudioPicker31] as a callback for [org.thoughtcrime.securesms.components.webrtc.v2.CallAudioToggleButton]
*/
interface AudioStateUpdater {
fun updateAudioOutputState(audioOutput: WebRtcAudioOutput)
@@ -1,36 +0,0 @@
package org.thoughtcrime.securesms.components.webrtc
import android.content.Context
import android.content.DialogInterface
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import org.thoughtcrime.securesms.R
/**
* This launches the bottom sheet on Android 11 and below devices for selecting which audio device to use during a call.
* In cases where there are only [SHOW_PICKER_THRESHOLD] devices, it will cycle through them without presenting a bottom sheet.
*/
class WebRtcAudioPickerLegacy(private val audioOutputChangedListener: OnAudioOutputChangedListener, private val outputState: ToggleButtonOutputState, private val stateUpdater: AudioStateUpdater) {
fun showPicker(context: Context, availableModes: List<WebRtcAudioOutput?>, dismissListener: DialogInterface.OnDismissListener): DialogInterface? {
val rv = RecyclerView(context)
val adapter = AudioOutputAdapter(
fun(audioDevice: WebRtcAudioDevice) {
audioOutputChangedListener.audioOutputChanged(audioDevice)
stateUpdater.updateAudioOutputState(audioDevice.webRtcAudioOutput)
stateUpdater.hidePicker()
},
availableModes
)
adapter.setSelectedOutput(outputState.getCurrentOutput())
rv.layoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
rv.adapter = adapter
return MaterialAlertDialogBuilder(context)
.setTitle(R.string.WebRtcAudioOutputToggle__audio_output)
.setView(rv)
.setCancelable(true)
.setOnDismissListener(dismissListener)
.show()
}
}
@@ -1,27 +0,0 @@
package org.thoughtcrime.securesms.push;
import android.content.Context;
import org.thoughtcrime.securesms.R;
import org.signal.network.config.TrustStore;
import java.io.InputStream;
public class IasTrustStore implements TrustStore {
private final Context context;
public IasTrustStore(Context context) {
this.context = context.getApplicationContext();
}
@Override
public InputStream getKeyStoreInputStream() {
return context.getResources().openRawResource(R.raw.ias);
}
@Override
public String getKeyStorePassword() {
return "whisper";
}
}
@@ -1,15 +0,0 @@
package org.thoughtcrime.securesms.stories.viewer.page
import android.graphics.drawable.ColorDrawable
import android.os.Bundle
import android.view.View
import androidx.appcompat.widget.AppCompatImageView
import androidx.fragment.app.Fragment
import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.conversation.colors.AvatarColor
class TestFragment : Fragment(R.layout.test_fragment) {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
(view as AppCompatImageView).setImageDrawable(ColorDrawable(AvatarColor.random().colorInt()))
}
}
@@ -1,89 +0,0 @@
package org.thoughtcrime.securesms.stories.viewer.reply.composer
import android.animation.AnimatorSet
import android.animation.ObjectAnimator
import android.annotation.SuppressLint
import android.content.Context
import android.util.AttributeSet
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.components.emoji.EmojiImageView
import org.thoughtcrime.securesms.keyvalue.SignalStore
import org.thoughtcrime.securesms.util.visible
class StoryReactionBar @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null
) : ConstraintLayout(context, attrs) {
var callback: Callback? = null
private var animatorSet: AnimatorSet? = null
init {
inflate(context, R.layout.stories_reaction_bar, this)
alpha = 0f
setBackgroundResource(R.drawable.conversation_reaction_overlay_background)
}
private val emojiViews: List<EmojiImageView> = listOf(
findViewById(R.id.reaction_1),
findViewById(R.id.reaction_2),
findViewById(R.id.reaction_3),
findViewById(R.id.reaction_4),
findViewById(R.id.reaction_5),
findViewById(R.id.reaction_6),
findViewById(R.id.reaction_7)
)
init {
if (!isInEditMode) {
val emojis = SignalStore.emoji.reactions
emojiViews.forEachIndexed { index, emojiImageView ->
if (index == emojiViews.lastIndex) {
emojiImageView.setImageResource(R.drawable.ic_any_emoji_32)
emojiImageView.setOnClickListener { onOpenReactionPicker() }
} else {
val emoji = SignalStore.emoji.getPreferredVariation(emojis[index])
emojiImageView.setImageEmoji(emoji)
emojiImageView.setOnClickListener { onEmojiSelected(emoji) }
}
}
}
setOnClickListener {
callback?.onTouchOutsideOfReactionBar()
}
}
@SuppressLint("Recycle")
fun animateIn() {
visible = true
animatorSet?.cancel()
animatorSet = AnimatorSet().apply {
playTogether(
emojiViews.flatMap {
listOf(ObjectAnimator.ofFloat(it, View.ALPHA, 1f), ObjectAnimator.ofFloat(it, View.TRANSLATION_Y, 0f))
} + ObjectAnimator.ofFloat(this@StoryReactionBar, View.ALPHA, 1f)
)
start()
}
}
private fun onEmojiSelected(emoji: String) {
callback?.onReactionSelected(emoji)
}
private fun onOpenReactionPicker() {
callback?.onOpenReactionPicker()
}
interface Callback {
fun onTouchOutsideOfReactionBar()
fun onReactionSelected(emoji: String)
fun onOpenReactionPicker()
}
}
@@ -1,73 +0,0 @@
/*
* Copyright 2023 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.thoughtcrime.securesms.stories.viewer.reply.reaction
import android.content.Context
import android.util.AttributeSet
import android.widget.FrameLayout
import androidx.core.view.children
import org.signal.emoji.EmojiUtil
import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.events.GroupCallReactionEvent
import kotlin.time.Duration.Companion.seconds
class MultiReactionBurstLayout @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null
) : FrameLayout(context, attrs) {
private val cooldownTimes = mutableMapOf<String, Long>()
private var nextViewIndex = 0
init {
repeat(MAX_SIMULTANEOUS_REACTIONS) {
val view = OnReactionSentView(context, layoutRes = R.layout.reaction_burst_view)
addView(view)
}
}
fun displayReactions(reactions: List<GroupCallReactionEvent>) {
if (children.count() == 0) {
throw IllegalStateException("You must add views before displaying reactions!")
}
reactions.filter {
if (it.getExpirationTimestamp() < System.currentTimeMillis()) {
return@filter false
}
val cutoffTimestamp = cooldownTimes[EmojiUtil.getCanonicalRepresentation(it.reaction)] ?: return@filter true
return@filter cutoffTimestamp < it.timestamp
}
.groupBy { EmojiUtil.getCanonicalRepresentation(it.reaction) }
.filter { it.value.groupBy { event -> event.sender }.size >= REACTION_COUNT_THRESHOLD }
.values
.map { it.sortedBy { event -> event.timestamp } }
.sortedBy { it.last().timestamp }
.take(MAX_SIMULTANEOUS_REACTIONS - cooldownTimes.filter { it.value > System.currentTimeMillis() }.size)
.forEach {
val reactionView = getNextReactionView()
reactionView.playForEmoji(it.map { event -> event.reaction })
val lastEvent = it.last()
cooldownTimes[EmojiUtil.getCanonicalRepresentation(lastEvent.reaction)] = lastEvent.timestamp + cooldownDuration.inWholeMilliseconds
}
}
private fun getNextReactionView(): OnReactionSentView {
val v = getChildAt(nextViewIndex) as OnReactionSentView
nextViewIndex = (nextViewIndex + 1) % MAX_SIMULTANEOUS_REACTIONS
return v
}
companion object {
private const val REACTION_COUNT_THRESHOLD = 3
private const val MAX_SIMULTANEOUS_REACTIONS = 3
private val cooldownDuration = 2.seconds
}
}
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
android:controlX1="0.4"
android:controlX2="0.0"
android:controlY1="0.2"
android:controlY2="1" />
@@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<accelerateDecelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android" />
@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright 2024 Signal Messenger, LLC
~ SPDX-License-Identifier: AGPL-3.0-only
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/signal_colorPrimary" android:state_selected="true" />
<item android:color="@color/transparent" />
</selector>
@@ -1,14 +0,0 @@
<!--
~ Copyright 2024 Signal Messenger, LLC
~ SPDX-License-Identifier: AGPL-3.0-only
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="48"
android:viewportHeight="48">
<path
android:pathData="M12.935,36.608C10.02,36.608 8.556,35.171 8.556,32.285V15.285C8.556,12.482 9.965,11.088 12.405,11.088H16.379C17.76,11.088 18.471,11.339 19.392,12.12L20.242,12.817C20.94,13.417 21.511,13.64 22.459,13.64H35.847C38.748,13.64 40.226,15.09 40.226,17.963V32.285C40.226,35.158 38.762,36.608 36.265,36.608H12.935ZM10.801,15.411V18.883H37.981V18.088C37.981,16.638 37.186,15.885 35.805,15.885H21.874C20.493,15.885 19.754,15.62 18.848,14.867L17.997,14.156C17.286,13.556 16.728,13.319 15.808,13.319H12.865C11.526,13.319 10.801,14.03 10.801,15.411ZM12.963,34.363H35.805C37.186,34.363 37.981,33.624 37.981,32.187V20.989H10.801V32.173C10.801,33.624 11.568,34.363 12.963,34.363Z"
android:fillColor="#FF000000"/>
</vector>
@@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="48"
android:viewportHeight="48">
<path
android:fillColor="#FF000000"
android:pathData="M37,14c1.1,0 2,0.9 2,2v26c0,1.1 -0.9,2 -2,2h-11c-1.1,0 -2,-0.9 -2,-2L24,16c0,-1.1 0.9,-2 2,-2h11m0,-2h-11c-2.2,0 -4,1.8 -4,4v26c0,2.2 1.8,4 4,4h11c2.2,0 4,-1.8 4,-4L41,16c0,-2.2 -1.8,-4 -4,-4h0ZM12,32v-4h-2v4c0,2.2 1.8,4 4,4h6v-2h-6c-1.1,0 -2,-0.9 -2,-2ZM25,2L14,2c-2.2,0 -4,1.8 -4,4L10,22h2L12,6c0,-1.1 0.9,-2 2,-2h11c1.1,0 2,0.9 2,2v4h2L29,6c0,-2.2 -1.8,-4 -4,-4ZM20.41,25l-1.41,-1.41h0s-3.54,-3.54 -3.54,-3.54l-1.41,1.41 2.54,2.54L8,24c-1.65,0 -3,-1.35 -3,-3s1.35,-3 3,-3v-2c-2.76,0 -5,2.24 -5,5s2.24,5 5,5h8.59l-2.54,2.54 1.41,1.41 3.54,-3.54h0l1.41,-1.41Z"/>
</vector>
@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright 2023 Signal Messenger, LLC
~ SPDX-License-Identifier: AGPL-3.0-only
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape
android:innerRadius="0dp"
android:shape="ring"
android:thickness="5dp"
android:useLevel="false">
<solid android:color="@color/signal_colorOnSurfaceVariant"/>
</shape>
</item>
</layer-list>
@@ -1,19 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:alpha="0.2"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/signal_light_colorOnPrimary"
android:pathData="M5.62 1.13c-0.34-0.34-0.9-0.34-1.24 0C3 2.51 1.9 4.43 1.63 6.9 1.58 7.38 1.93 7.82 2.4 7.87c0.48 0.05 0.92-0.3 0.97-0.77C3.6 5.06 4.5 3.5 5.62 2.37c0.34-0.34 0.34-0.9 0-1.24Z"/>
<path
android:fillColor="@color/signal_light_colorOnPrimary"
android:pathData="M18.38 1.13c0.34-0.34 0.9-0.34 1.24 0C21 2.51 22.1 4.43 22.37 6.9c0.05 0.48-0.3 0.92-0.77 0.97-0.48 0.05-0.92-0.3-0.97-0.77-0.23-2.04-1.13-3.6-2.25-4.73-0.34-0.34-0.34-0.9 0-1.24Z"/>
<path
android:fillColor="@color/signal_light_colorOnPrimary"
android:pathData="M12 1.75c-3.62 0-6.7 2.78-6.83 6.68-0.13 3.68-0.88 5.07-1.5 5.81-0.17 0.2-0.33 0.35-0.5 0.5L3.1 14.83c-0.14 0.12-0.28 0.26-0.4 0.4-0.34 0.36-0.57 0.8-0.57 1.48 0 1.12 0.9 2.05 2.02 2.05h15.7c1.13 0 2.03-0.93 2.03-2.05 0-0.68-0.24-1.12-0.57-1.49l-0.4-0.4-0.04-0.03-0.05-0.03c-0.16-0.16-0.32-0.31-0.49-0.5-0.62-0.75-1.37-2.14-1.5-5.82-0.13-3.9-3.2-6.68-6.83-6.68Z"/>
<path
android:fillColor="@color/signal_light_colorOnPrimary"
android:pathData="M8.95 20.5c0.09-0.16 0.25-0.25 0.43-0.25h5.24c0.18 0 0.34 0.1 0.43 0.25 0.09 0.15 0.1 0.34 0 0.5-0.59 1.06-1.72 1.75-3.05 1.75-1.33 0-2.46-0.69-3.06-1.76-0.08-0.15-0.08-0.34 0.01-0.5Z"/>
</vector>
@@ -1,12 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/signal_light_colorOnPrimary"
android:pathData="M2.14 11.5h-0.7c-0.58 0-0.94 0.63-0.65 1.13l1.56 2.64c0.3 0.49 1 0.49 1.3 0l1.56-2.64c0.3-0.5-0.07-1.13-0.65-1.13H3.9C4.15 7.25 7.69 3.87 12 3.87c2.17 0 4.14 0.85 5.6 2.24 0.35 0.33 0.9 0.32 1.23-0.03 0.34-0.35 0.32-0.9-0.03-1.24-1.77-1.68-4.16-2.71-6.8-2.71-5.29 0-9.6 4.15-9.86 9.37Z"/>
<path
android:fillColor="@color/signal_light_colorOnPrimary"
android:pathData="M19.44 12.38h0.68c-0.2 4.3-3.76 7.74-8.12 7.74-2.32 0-4.4-0.97-5.9-2.52-0.32-0.35-0.88-0.37-1.23-0.04-0.35 0.34-0.36 0.9-0.03 1.24 1.8 1.9 4.34 3.07 7.16 3.07 5.33 0 9.67-4.21 9.87-9.5h0.7c0.57 0 0.93-0.63 0.64-1.13l-1.56-2.63c-0.3-0.5-1-0.5-1.3 0l-1.56 2.63c-0.3 0.5 0.07 1.13 0.65 1.13Z"/>
</vector>
@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright 2023 Signal Messenger, LLC
~ SPDX-License-Identifier: AGPL-3.0-only
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape
android:innerRadius="0dp"
android:shape="ring"
android:thickness="5dp"
android:useLevel="false">
<solid android:color="@color/signal_colorOnSurface_12"/>
</shape>
</item>
</layer-list>
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/signal_dark_colorSecondaryContainer" />
</shape>
@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple android:color="@color/green_700" xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape android:shape="oval">
<solid android:color="@color/green_500" />
</shape>
</item>
</ripple>
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/transparent_white_20" />
</shape>
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple android:color="@color/transparent_white_30" xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape android:shape="oval">
<solid android:color="@color/signal_light_colorSecondaryContainer" />
</shape>
</item>
</ripple>
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple android:color="@color/red_700" xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape android:shape="oval">
<solid android:color="@color/webrtc_hangup_background" />
</shape>
</item>
</ripple>
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/signal_light_colorSecondaryContainer" />
</shape>
@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:viewBindingIgnore="true"
xmlns:tools="http://schemas.android.com/tools"
android:background="?attr/selectableItemBackground"
android:layout_width="match_parent"
android:layout_height="?attr/listPreferredItemHeight">
<RadioButton
android:id="@+id/radio"
android:layout_width="match_parent"
android:layout_height="?attr/listPreferredItemHeight"
android:layout_marginStart="16dp"
android:drawablePadding="12dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:textColor="@color/signal_text_primary"
android:textSize="16sp"
app:drawableTint="@color/signal_text_primary"
tools:drawableStart="@drawable/ic_photo_24"
tools:text="@string/WebRtcAudioOutputToggle__phone_earpiece" />
</FrameLayout>
@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:viewBindingIgnore="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.google.android.material.button.MaterialButton
android:id="@+id/internal_details"
style="@style/Signal.Widget.Button.Small.Primary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="4dp"
android:text="@string/preferences__internal_details" />
</FrameLayout>
-52
View File
@@ -1,52 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright 2023 Signal Messenger, LLC
~ SPDX-License-Identifier: AGPL-3.0-only
-->
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
app:cardBackgroundColor="@color/signal_colorBackground"
app:cardCornerRadius="18dp"
app:cardElevation="0dp"
app:strokeColor="@color/signal_colorOutline_38"
app:strokeWidth="1dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/banner_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16.57dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="10dp"
android:textAppearance="@style/Signal.Text.BodyMedium"
android:textColor="@color/signal_colorOnSurface"
app:layout_constraintBottom_toTopOf="@id/banner_action"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Banner text will go here and probably be about something important" />
<com.google.android.material.button.MaterialButton
android:id="@+id/banner_action"
style="@style/Widget.Signal.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/banner_text"
tools:text="Action" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.util.views.LearnMoreTextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/dsl_settings_gutter"
android:layout_marginVertical="16dp"
android:background="@drawable/rounded_outline_12"
android:padding="16dp"
android:textAppearance="@style/Signal.Text.BodyMedium"
tools:text="Mark H is Batman!" />
@@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:viewBindingIgnore="true"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ProgressBar
android:id="@+id/dsl_progress_pref_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true"
app:layout_constraintBottom_toTopOf="@+id/dsl_progress_pref_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/dsl_progress_pref_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="@dimen/dsl_settings_gutter"
android:textAlignment="center"
android:textAppearance="@style/Signal.Text.BodyLarge"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/dsl_progress_pref_progress"
tools:text="Loading..." />
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -1,64 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:viewBindingIgnore="true"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/signal_m3_toolbar_height"
tools:orientation="vertical"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
<View
android:id="@+id/background"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginHorizontal="16dp"
android:layout_marginVertical="10dp"
android:background="@drawable/search_toolbar_background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/search_close"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="4dp"
android:background="?selectableItemBackgroundBorderless"
android:contentDescription="@string/Material3SearchToolbar__close"
android:scaleType="centerInside"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@id/background"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/symbol_arrow_start_24"
app:tint="@color/signal_colorOnSurface" />
<EditText
android:id="@+id/search_input"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/transparent"
android:hint="@string/SearchToolbar_search"
android:inputType="text"
android:maxLines="1"
android:textColor="@color/signal_colorOnSurface"
android:textColorHint="@color/signal_colorOnSurfaceVariant_60"
app:layout_constraintBottom_toBottomOf="@id/background"
app:layout_constraintEnd_toStartOf="@id/search_clear"
app:layout_constraintStart_toEndOf="@id/search_close"
app:layout_constraintTop_toTopOf="@id/background" />
<ImageView
android:id="@+id/search_clear"
android:layout_width="48dp"
android:layout_height="48dp"
android:contentDescription="@string/Material3SearchToolbar__clear"
android:scaleType="centerInside"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/background"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_x_24" />
</merge>
@@ -1,103 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.motion.widget.MotionLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:viewBindingIgnore="true"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/motion_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layoutDirection="ltr"
app:layoutDescription="@xml/reaction_burst_view_scene"
tools:showPaths="true">
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/emoji_1"
android:layout_width="56dp"
android:layout_height="56dp"
app:forceJumbo="true"
app:layout_constraintTag="emoji"
tools:background="@drawable/symbol_heart_24" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/emoji_2"
android:layout_width="80dp"
android:layout_height="80dp"
app:forceJumbo="true"
app:layout_constraintTag="emoji"
tools:background="@drawable/symbol_heart_24" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/emoji_3"
android:layout_width="56dp"
android:layout_height="56dp"
app:forceJumbo="true"
app:layout_constraintTag="emoji"
tools:background="@drawable/symbol_heart_24" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/emoji_4"
android:layout_width="70dp"
android:layout_height="70dp"
app:forceJumbo="true"
app:layout_constraintTag="emoji"
tools:background="@drawable/symbol_heart_24" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/emoji_5"
android:layout_width="64dp"
android:layout_height="64dp"
app:forceJumbo="true"
app:layout_constraintTag="emoji"
tools:background="@drawable/symbol_heart_24" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/emoji_6"
android:layout_width="70dp"
android:layout_height="70dp"
app:forceJumbo="true"
app:layout_constraintTag="emoji"
tools:background="@drawable/symbol_heart_24" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/emoji_7"
android:layout_width="40dp"
android:layout_height="40dp"
app:forceJumbo="true"
app:layout_constraintTag="emoji"
tools:background="@drawable/symbol_heart_24" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/emoji_8"
android:layout_width="70dp"
android:layout_height="70dp"
app:forceJumbo="true"
app:layout_constraintTag="emoji"
tools:background="@drawable/symbol_heart_24"
tools:layout_editor_absoluteX="20dp"
tools:layout_editor_absoluteY="591dp" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/emoji_9"
android:layout_width="100dp"
android:layout_height="100dp"
app:forceJumbo="true"
app:layout_constraintTag="emoji"
tools:background="@drawable/symbol_heart_24" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/emoji_10"
android:layout_width="60dp"
android:layout_height="60dp"
app:forceJumbo="true"
app:layout_constraintTag="emoji"
tools:background="@drawable/symbol_heart_24" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/emoji_11"
android:layout_width="48dp"
android:layout_height="48dp"
app:forceJumbo="true"
app:layout_constraintTag="emoji"
tools:background="@drawable/symbol_heart_24" />
</androidx.constraintlayout.motion.widget.MotionLayout>
@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:viewBindingIgnore="true">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/photo_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="none"/>
</merge>
@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.components.SquareFrameLayout
xmlns:tools="http://schemas.android.com/tools"
tools:viewBindingIgnore="true"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginEnd="2dp"
app:square_height="true">
<ImageView android:id="@+id/thumbnail"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"/>
</org.thoughtcrime.securesms.components.SquareFrameLayout>
@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:viewBindingIgnore="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:orientation="vertical"
tools:parentTag="android.widget.LinearLayout">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/search_toolbar_background"
android:paddingTop="0dp"
android:paddingHorizontal="8dp" />
</merge>
@@ -1,108 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:viewBindingIgnore="true"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="@dimen/reaction_scrubber_width"
android:layout_height="56dp"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/reaction_1"
android:layout_width="32dp"
android:layout_height="48dp"
android:alpha="0"
android:translationY="@dimen/reaction_scrubber_anim_start_translation_y"
app:forceJumbo="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/reaction_2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:alpha="1"
tools:translationY="0dp" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/reaction_2"
android:layout_width="32dp"
android:layout_height="48dp"
android:alpha="0"
android:translationY="@dimen/reaction_scrubber_anim_start_translation_y"
app:forceJumbo="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/reaction_3"
app:layout_constraintStart_toEndOf="@id/reaction_1"
app:layout_constraintTop_toTopOf="parent"
tools:alpha="1"
tools:translationY="0dp" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/reaction_3"
android:layout_width="32dp"
android:layout_height="48dp"
android:alpha="0"
android:translationY="@dimen/reaction_scrubber_anim_start_translation_y"
app:forceJumbo="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/reaction_4"
app:layout_constraintStart_toEndOf="@id/reaction_2"
app:layout_constraintTop_toTopOf="parent"
tools:alpha="1"
tools:translationY="0dp" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/reaction_4"
android:layout_width="32dp"
android:layout_height="48dp"
android:alpha="0"
android:translationY="@dimen/reaction_scrubber_anim_start_translation_y"
app:forceJumbo="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/reaction_5"
app:layout_constraintStart_toEndOf="@id/reaction_3"
app:layout_constraintTop_toTopOf="parent"
tools:alpha="1"
tools:translationY="0dp" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/reaction_5"
android:layout_width="32dp"
android:layout_height="48dp"
android:alpha="0"
android:translationY="@dimen/reaction_scrubber_anim_start_translation_y"
app:forceJumbo="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/reaction_6"
app:layout_constraintStart_toEndOf="@id/reaction_4"
app:layout_constraintTop_toTopOf="parent"
tools:alpha="1"
tools:translationY="0dp" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/reaction_6"
android:layout_width="32dp"
android:layout_height="48dp"
android:alpha="0"
android:translationY="@dimen/reaction_scrubber_anim_start_translation_y"
app:forceJumbo="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/reaction_7"
app:layout_constraintStart_toEndOf="@id/reaction_5"
app:layout_constraintTop_toTopOf="parent"
tools:alpha="1"
tools:translationY="0dp" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/reaction_7"
android:layout_width="32dp"
android:layout_height="48dp"
android:alpha="0"
android:translationY="@dimen/reaction_scrubber_anim_start_translation_y"
app:forceJumbo="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/reaction_6"
app:layout_constraintTop_toTopOf="parent"
tools:alpha="1"
tools:translationY="0dp" />
</merge>
-10
View File
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.AppCompatImageView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:viewBindingIgnore="true"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:srcCompat="@drawable/test_gradient">
</androidx.appcompat.widget.AppCompatImageView>
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_filter_search"
android:title=" "
app:actionViewClass="org.thoughtcrime.securesms.components.SearchView"
app:showAsAction="collapseActionView|always"
tools:ignore="HardcodedText" />
</menu>
Binary file not shown.