Feature/lucide icons pt2 (#863)
* Starting to import Lucide icons and clean up * Removing unused icons * Lucide icons + removing unsued stuff Removed the whole EMoji/MediaKeyboard classes as they didn't seem used * More Lucide icons + ui tweaks + clean up * comment * Wrong tinting * delete icon * More icons * check icons * edit icon (ic_pencil) * edit icon * Search icon (ic_search) * settings icons (ic_settings) * back icon (ic_chevron_left) * icon forward arrow (ic_chevron_right) * icon circle dots (ic_circle_dots_custom) * icon read (ic_eye) * icon disappearing messages (ic_clock_x) * refresh icon (ic_refresh_cw) * globe icon * message icon (ic_message_square) * icon message request (ic_message_square_warning) * group and invite icons (ic_users_group_custom, ic_user_round_plus)) * icons: lock, unlock, audio/notification (ic_lock_keyhole, ic_lock_keyhole_open, ic_volume_2, ic_volume_off ) * icon mute / mic off (ic_mic_off) * icon appearance, recovery (ic_paintbrush_vertical, ic_recovery_password_custom) * icons: help, help circle, qr code * icon block/banpull/1710/head
@ -1,104 +0,0 @@
|
||||
package org.thoughtcrime.securesms.components;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.view.animation.RotateAnimation;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import network.loki.messenger.R;
|
||||
|
||||
public class DeliveryStatusView extends FrameLayout {
|
||||
|
||||
private static final String TAG = DeliveryStatusView.class.getSimpleName();
|
||||
|
||||
private static final RotateAnimation ROTATION_ANIMATION = new RotateAnimation(0, 360f,
|
||||
Animation.RELATIVE_TO_SELF, 0.5f,
|
||||
Animation.RELATIVE_TO_SELF, 0.5f);
|
||||
static {
|
||||
ROTATION_ANIMATION.setInterpolator(new LinearInterpolator());
|
||||
ROTATION_ANIMATION.setDuration(1500);
|
||||
ROTATION_ANIMATION.setRepeatCount(Animation.INFINITE);
|
||||
}
|
||||
|
||||
private final ImageView pendingIndicator;
|
||||
private final ImageView sentIndicator;
|
||||
private final ImageView deliveredIndicator;
|
||||
private final ImageView readIndicator;
|
||||
|
||||
public DeliveryStatusView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public DeliveryStatusView(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public DeliveryStatusView(final Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
|
||||
inflate(context, R.layout.delivery_status_view, this);
|
||||
|
||||
this.deliveredIndicator = findViewById(R.id.delivered_indicator);
|
||||
this.sentIndicator = findViewById(R.id.sent_indicator);
|
||||
this.pendingIndicator = findViewById(R.id.pending_indicator);
|
||||
this.readIndicator = findViewById(R.id.read_indicator);
|
||||
|
||||
if (attrs != null) {
|
||||
TypedArray typedArray = context.getTheme().obtainStyledAttributes(attrs, R.styleable.DeliveryStatusView, 0, 0);
|
||||
setTint(typedArray.getColor(R.styleable.DeliveryStatusView_iconColor, getResources().getColor(R.color.core_white)));
|
||||
typedArray.recycle();
|
||||
}
|
||||
}
|
||||
|
||||
public void setNone() {
|
||||
this.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public void setPending() {
|
||||
this.setVisibility(View.GONE);
|
||||
pendingIndicator.setVisibility(View.VISIBLE);
|
||||
pendingIndicator.startAnimation(ROTATION_ANIMATION);
|
||||
sentIndicator.setVisibility(View.GONE);
|
||||
deliveredIndicator.setVisibility(View.GONE);
|
||||
readIndicator.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public void setSent() {
|
||||
this.setVisibility(View.GONE);
|
||||
pendingIndicator.setVisibility(View.GONE);
|
||||
pendingIndicator.clearAnimation();
|
||||
sentIndicator.setVisibility(View.VISIBLE);
|
||||
deliveredIndicator.setVisibility(View.GONE);
|
||||
readIndicator.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public void setDelivered() {
|
||||
this.setVisibility(View.GONE);
|
||||
pendingIndicator.setVisibility(View.GONE);
|
||||
pendingIndicator.clearAnimation();
|
||||
sentIndicator.setVisibility(View.GONE);
|
||||
deliveredIndicator.setVisibility(View.VISIBLE);
|
||||
readIndicator.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public void setRead() {
|
||||
this.setVisibility(View.GONE);
|
||||
pendingIndicator.setVisibility(View.GONE);
|
||||
pendingIndicator.clearAnimation();
|
||||
sentIndicator.setVisibility(View.GONE);
|
||||
deliveredIndicator.setVisibility(View.GONE);
|
||||
readIndicator.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
public void setTint(int color) {
|
||||
pendingIndicator.setColorFilter(color);
|
||||
deliveredIndicator.setColorFilter(color);
|
||||
sentIndicator.setColorFilter(color);
|
||||
readIndicator.setColorFilter(color);
|
||||
}
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
package org.thoughtcrime.securesms.components;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import network.loki.messenger.R;
|
||||
|
||||
public class RemovableEditableMediaView extends FrameLayout {
|
||||
|
||||
private final @NonNull ImageView remove;
|
||||
private final @NonNull ImageView edit;
|
||||
|
||||
private final int removeSize;
|
||||
private final int editSize;
|
||||
|
||||
private @Nullable View current;
|
||||
|
||||
public RemovableEditableMediaView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public RemovableEditableMediaView(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
}
|
||||
|
||||
public RemovableEditableMediaView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
|
||||
this.remove = (ImageView)LayoutInflater.from(context).inflate(R.layout.media_view_remove_button, this, false);
|
||||
this.edit = (ImageView)LayoutInflater.from(context).inflate(R.layout.media_view_edit_button, this, false);
|
||||
|
||||
this.removeSize = getResources().getDimensionPixelSize(R.dimen.media_bubble_remove_button_size);
|
||||
this.editSize = getResources().getDimensionPixelSize(R.dimen.media_bubble_edit_button_size);
|
||||
|
||||
this.remove.setVisibility(View.GONE);
|
||||
this.edit.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinishInflate() {
|
||||
super.onFinishInflate();
|
||||
this.addView(remove);
|
||||
this.addView(edit);
|
||||
}
|
||||
|
||||
public void display(@Nullable View view, boolean editable) {
|
||||
edit.setVisibility(editable ? View.VISIBLE : View.GONE);
|
||||
|
||||
if (view == current) return;
|
||||
if (current != null) current.setVisibility(View.GONE);
|
||||
|
||||
if (view != null) {
|
||||
view.setPadding(view.getPaddingLeft(), removeSize / 2, removeSize / 2, (int)(8 * getResources().getDisplayMetrics().density));
|
||||
edit.setPadding(0, 0, removeSize / 2, 0);
|
||||
|
||||
view.setVisibility(View.VISIBLE);
|
||||
remove.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
remove.setVisibility(View.GONE);
|
||||
edit.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
current = view;
|
||||
}
|
||||
|
||||
public void setRemoveClickListener(View.OnClickListener listener) {
|
||||
this.remove.setOnClickListener(listener);
|
||||
}
|
||||
|
||||
public void setEditClickListener(View.OnClickListener listener) {
|
||||
this.edit.setOnClickListener(listener);
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 502 B |
Before Width: | Height: | Size: 233 B |
Before Width: | Height: | Size: 493 B |
Before Width: | Height: | Size: 275 B |
Before Width: | Height: | Size: 293 B |
Before Width: | Height: | Size: 288 B |
Before Width: | Height: | Size: 656 B |
Before Width: | Height: | Size: 664 B |
Before Width: | Height: | Size: 188 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 470 B |
Before Width: | Height: | Size: 391 B |
Before Width: | Height: | Size: 656 B |
Before Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 390 B |
Before Width: | Height: | Size: 397 B |
Before Width: | Height: | Size: 378 B |
Before Width: | Height: | Size: 428 B |
Before Width: | Height: | Size: 431 B |
Before Width: | Height: | Size: 422 B |
Before Width: | Height: | Size: 457 B |
Before Width: | Height: | Size: 453 B |
Before Width: | Height: | Size: 419 B |
Before Width: | Height: | Size: 485 B |
Before Width: | Height: | Size: 495 B |
Before Width: | Height: | Size: 436 B |
@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="50"
|
||||
android:viewportHeight="50">
|
||||
<path
|
||||
android:pathData="M15.575,11.473L30.841,23.853L15.247,36.509C15.053,36.658 14.889,36.848 14.764,37.067C14.639,37.286 14.557,37.529 14.521,37.783C14.484,38.037 14.496,38.296 14.554,38.545C14.613,38.794 14.717,39.028 14.86,39.233C15.003,39.438 15.184,39.61 15.39,39.739C15.596,39.868 15.824,39.951 16.061,39.984C16.298,40.017 16.538,39.999 16.768,39.93C16.998,39.861 17.212,39.744 17.4,39.584L34.455,25.746C34.637,25.594 34.792,25.408 34.91,25.196C34.993,25.112 35.07,25.022 35.14,24.926C35.426,24.518 35.549,24.005 35.482,23.499C35.416,22.994 35.166,22.537 34.787,22.23L17.732,8.391C17.545,8.238 17.331,8.127 17.104,8.063C16.877,7.999 16.64,7.983 16.407,8.018C16.174,8.053 15.95,8.137 15.748,8.265C15.545,8.393 15.368,8.563 15.227,8.766C15.084,8.968 14.98,9.198 14.921,9.444C14.861,9.689 14.847,9.945 14.879,10.197C14.911,10.448 14.99,10.69 15.109,10.909C15.228,11.128 15.386,11.32 15.575,11.473Z"
|
||||
android:fillColor="?android:textColorPrimary"/>
|
||||
</vector>
|
Before Width: | Height: | Size: 1023 B |
Before Width: | Height: | Size: 359 B |
Before Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 321 B |
Before Width: | Height: | Size: 221 B |
Before Width: | Height: | Size: 218 B |
Before Width: | Height: | Size: 234 B |
Before Width: | Height: | Size: 479 B |
Before Width: | Height: | Size: 430 B |
Before Width: | Height: | Size: 148 B |
Before Width: | Height: | Size: 669 B |
Before Width: | Height: | Size: 347 B |
Before Width: | Height: | Size: 336 B |
Before Width: | Height: | Size: 454 B |
Before Width: | Height: | Size: 233 B |
Before Width: | Height: | Size: 268 B |
Before Width: | Height: | Size: 275 B |
Before Width: | Height: | Size: 258 B |
Before Width: | Height: | Size: 281 B |
Before Width: | Height: | Size: 293 B |
Before Width: | Height: | Size: 287 B |
Before Width: | Height: | Size: 298 B |
Before Width: | Height: | Size: 309 B |
Before Width: | Height: | Size: 274 B |
Before Width: | Height: | Size: 313 B |
Before Width: | Height: | Size: 326 B |
Before Width: | Height: | Size: 296 B |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 622 B |
Before Width: | Height: | Size: 268 B |
Before Width: | Height: | Size: 663 B |
Before Width: | Height: | Size: 330 B |
Before Width: | Height: | Size: 339 B |
Before Width: | Height: | Size: 359 B |
Before Width: | Height: | Size: 653 B |
Before Width: | Height: | Size: 858 B |
Before Width: | Height: | Size: 247 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 543 B |
Before Width: | Height: | Size: 583 B |
Before Width: | Height: | Size: 872 B |
Before Width: | Height: | Size: 350 B |
Before Width: | Height: | Size: 473 B |
Before Width: | Height: | Size: 477 B |
Before Width: | Height: | Size: 436 B |