Merge branch 'vector-compat' into 'master'

Use vector support libraries instead of rasterizing all drawables

See merge request briar/briar!1346
This commit is contained in:
akwizgran
2021-01-28 17:59:08 +00:00
77 changed files with 129 additions and 97 deletions

View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M16,17V14H9V10H16V7L21,12L16,17M14,2A2,2 0 0,1 16,4V6H14V4H5V20H14V18H16V20A2,2 0 0,1 14,22H5A2,2 0 0,1 3,20V4A2,2 0 0,1 5,2H14Z" /></svg>

After

Width:  |  Height:  |  Size: 423 B

View File

@@ -25,6 +25,8 @@ android {
versionCode 10213
versionName "1.2.13"
applicationId "org.briarproject.briar.android"
vectorDrawables.useSupportLibrary = true
buildConfigField "String", "GitHash",
"\"${getStdout(['git', 'rev-parse', '--short=7', 'HEAD'], 'No commit hash')}\""
def now = (long) (System.currentTimeMillis() / 1000)

View File

@@ -255,7 +255,7 @@ class AndroidNotificationManagerImpl implements AndroidNotificationManager,
R.string.ongoing_notification_title;
int text = locked ? R.string.lock_tap_to_unlock :
R.string.ongoing_notification_text;
int icon = locked ? R.drawable.startup_lock :
int icon = locked ? R.drawable.notification_lock :
R.drawable.notification_ongoing;
// Ongoing foreground notification that shows BriarService is running
NotificationCompat.Builder b =
@@ -624,7 +624,7 @@ class AndroidNotificationManagerImpl implements AndroidNotificationManager,
NotificationCompat.Builder b =
new NotificationCompat.Builder(appContext, REMINDER_CHANNEL_ID);
b.setSmallIcon(R.drawable.ic_signout);
b.setSmallIcon(R.drawable.notification_signout);
b.setColor(getColor(appContext, R.color.briar_primary));
b.setContentTitle(
appContext.getText(R.string.reminder_notification_title));

View File

@@ -3,6 +3,7 @@ package org.briarproject.briar.android.conversation;
import android.annotation.SuppressLint;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Parcelable;
import android.transition.Slide;
@@ -105,6 +106,7 @@ import androidx.recyclerview.selection.SelectionTracker.SelectionObserver;
import androidx.recyclerview.selection.StorageStrategy;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat;
import de.hdodenhof.circleimageview.CircleImageView;
import uk.co.samuelwall.materialtaptargetprompt.MaterialTapTargetPrompt;
@@ -479,12 +481,10 @@ public class ConversationActivity extends BriarActivity
@UiThread
private void displayContactOnlineStatus() {
if (connectionRegistry.isConnected(contactId)) {
toolbarStatus.setImageDrawable(ContextCompat.getDrawable(
ConversationActivity.this, R.drawable.contact_online));
toolbarStatus.setImageResource(R.drawable.contact_online);
toolbarStatus.setContentDescription(getString(R.string.online));
} else {
toolbarStatus.setImageDrawable(ContextCompat.getDrawable(
ConversationActivity.this, R.drawable.contact_offline));
toolbarStatus.setImageResource(R.drawable.contact_offline);
toolbarStatus.setContentDescription(getString(R.string.offline));
}
}
@@ -935,13 +935,16 @@ public class ConversationActivity extends BriarActivity
return;
}
int color =
ContextCompat.getColor(this, R.color.briar_primary);
Drawable drawable = VectorDrawableCompat
.create(getResources(), R.drawable.ic_more_vert_accent, null);
new MaterialTapTargetPrompt.Builder(ConversationActivity.this,
R.style.OnboardingDialogTheme).setTarget(target)
.setPrimaryText(R.string.introduction_onboarding_title)
.setSecondaryText(R.string.introduction_onboarding_text)
.setIcon(R.drawable.ic_more_vert_accent)
.setBackgroundColour(
ContextCompat.getColor(this, R.color.briar_primary))
.setIconDrawable(drawable)
.setBackgroundColour(color)
.show();
}

View File

@@ -1,17 +1,13 @@
package org.briarproject.briar.android.login;
import android.content.Context;
import android.graphics.drawable.Drawable;
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
import org.briarproject.briar.R;
import androidx.appcompat.app.AlertDialog;
import static androidx.core.content.ContextCompat.getColor;
import static androidx.core.content.ContextCompat.getDrawable;
import static androidx.core.graphics.drawable.DrawableCompat.setTint;
import static java.util.Objects.requireNonNull;
import static org.briarproject.briar.android.util.UiUtils.getDialogIcon;
@NotNullByDefault
class LoginUtils {
@@ -19,9 +15,7 @@ class LoginUtils {
static AlertDialog createKeyStrengthenerErrorDialog(Context ctx) {
AlertDialog.Builder builder =
new AlertDialog.Builder(ctx, R.style.BriarDialogTheme);
Drawable icon = getDrawable(ctx, R.drawable.alerts_and_states_error);
setTint(requireNonNull(icon), getColor(ctx, R.color.color_primary));
builder.setIcon(icon);
builder.setIcon(getDialogIcon(ctx, R.drawable.alerts_and_states_error));
builder.setTitle(R.string.dialog_title_cannot_check_password);
builder.setMessage(R.string.dialog_message_cannot_check_password);
builder.setPositiveButton(R.string.ok, null);

View File

@@ -2,6 +2,7 @@ package org.briarproject.briar.android.navdrawer;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
@@ -59,6 +60,7 @@ import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelProviders;
import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat;
import uk.co.samuelwall.materialtaptargetprompt.MaterialTapTargetPrompt;
import static android.view.View.GONE;
@@ -433,8 +435,7 @@ public class NavDrawerActivity extends BriarActivity implements
Transport t = getItem(position);
ImageView icon = view.findViewById(R.id.imageView);
icon.setImageDrawable(ContextCompat.getDrawable(
NavDrawerActivity.this, t.iconDrawable));
icon.setImageResource(t.iconDrawable);
icon.setColorFilter(ContextCompat.getColor(
NavDrawerActivity.this, t.iconColor));
@@ -476,11 +477,13 @@ public class NavDrawerActivity extends BriarActivity implements
private void showTransportsOnboarding(boolean show, ImageView imageView) {
if (show) {
int color = resolveColorAttribute(this, R.attr.colorControlNormal);
Drawable drawable = VectorDrawableCompat
.create(getResources(), R.drawable.transport_tor, null);
new MaterialTapTargetPrompt.Builder(NavDrawerActivity.this,
R.style.OnboardingDialogTheme).setTarget(imageView)
.setPrimaryText(R.string.network_settings_title)
.setSecondaryText(R.string.transports_onboarding_text)
.setIcon(R.drawable.transport_tor)
.setIconDrawable(drawable)
.setIconDrawableColourFilter(color)
.setBackgroundColour(
ContextCompat.getColor(this, R.color.briar_primary))

View File

@@ -141,8 +141,7 @@ public class TransportsActivity extends BriarActivity {
Transport t = getItem(position);
ImageView icon = view.findViewById(R.id.icon);
icon.setImageDrawable(ContextCompat.getDrawable(
TransportsActivity.this, t.iconDrawable));
icon.setImageResource(t.iconDrawable);
icon.setColorFilter(ContextCompat.getColor(
TransportsActivity.this, t.iconColor));

View File

@@ -54,6 +54,7 @@ import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.Observer;
import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat;
import static android.content.Context.KEYGUARD_SERVICE;
import static android.content.Context.POWER_SERVICE;
@@ -88,7 +89,6 @@ import static androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_NO;
import static androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_YES;
import static androidx.appcompat.app.AppCompatDelegate.setDefaultNightMode;
import static androidx.core.content.ContextCompat.getColor;
import static androidx.core.content.ContextCompat.getDrawable;
import static androidx.core.content.ContextCompat.getSystemService;
import static androidx.core.graphics.drawable.DrawableCompat.setTint;
import static androidx.core.view.ViewCompat.LAYOUT_DIRECTION_RTL;
@@ -436,7 +436,8 @@ public class UiUtils {
}
public static Drawable getDialogIcon(Context ctx, @DrawableRes int resId) {
Drawable icon = getDrawable(ctx, resId);
Drawable icon =
VectorDrawableCompat.create(ctx.getResources(), resId, null);
setTint(requireNonNull(icon), getColor(ctx, R.color.color_primary));
return icon;
}

View File

@@ -2,7 +2,6 @@ package org.briarproject.briar.android.view;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.os.Looper;
import android.util.AttributeSet;
@@ -53,9 +52,8 @@ public class BriarRecyclerView extends FrameLayout {
R.styleable.BriarRecyclerView);
isScrollingToEnd = attributes
.getBoolean(R.styleable.BriarRecyclerView_scrollToEnd, true);
Drawable drawable = attributes
.getDrawable(R.styleable.BriarRecyclerView_emptyImage);
if (drawable != null) setEmptyImage(drawable);
int drawableRes = attributes.getResourceId(R.styleable.BriarRecyclerView_emptyImage, -1);
if (drawableRes != -1) setEmptyImage(drawableRes);
String emtpyText =
attributes.getString(R.styleable.BriarRecyclerView_emptyText);
if (emtpyText != null) setEmptyText(emtpyText);
@@ -139,11 +137,6 @@ public class BriarRecyclerView extends FrameLayout {
}
}
public void setEmptyImage(Drawable drawable) {
if (recyclerView == null) initViews();
emptyImage.setImageDrawable(drawable);
}
public void setEmptyImage(@DrawableRes int res) {
if (recyclerView == null) initViews();
emptyImage.setImageResource(res);

View File

@@ -4,6 +4,7 @@ import android.app.Activity;
import android.content.ClipData;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
@@ -28,6 +29,7 @@ import androidx.customview.view.AbsSavedState;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.Observer;
import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat;
import uk.co.samuelwall.materialtaptargetprompt.MaterialTapTargetPrompt;
import static android.os.Build.VERSION.SDK_INT;
@@ -253,12 +255,14 @@ public class TextAttachmentController extends TextSendController
public void showImageOnboarding(Activity activity) {
int color = resolveColorAttribute(activity, R.attr.colorControlNormal);
Drawable drawable = VectorDrawableCompat
.create(activity.getResources(), R.drawable.ic_image, null);
new MaterialTapTargetPrompt.Builder(activity,
R.style.OnboardingDialogTheme).setTarget(sendButton)
.setPrimaryText(R.string.dialog_title_image_support)
.setSecondaryText(R.string.dialog_message_image_support)
.setBackgroundColour(getColor(activity, R.color.briar_primary))
.setIcon(R.drawable.ic_image)
.setIconDrawable(drawable)
.setIconDrawableColourFilter(color)
.show();
}

View File

@@ -8,7 +8,6 @@ import org.briarproject.briar.R;
import androidx.annotation.UiThread;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.core.content.ContextCompat;
@UiThread
public class TrustIndicatorView extends AppCompatImageView {
@@ -44,7 +43,7 @@ public class TrustIndicatorView extends AppCompatImageView {
default:
res = R.drawable.trust_indicator_unknown;
}
setImageDrawable(ContextCompat.getDrawable(getContext(), res));
setImageResource(res);
setVisibility(VISIBLE);
invalidate();

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M13,12h7v1.5h-7zM13,9.5h7L20,11h-7zM13,14.5h7L20,16h-7zM21,4L3,4c-1.1,0 -2,0.9 -2,2v13c0,1.1 0.9,2 2,2h18c1.1,0 2,-0.9 2,-2L23,6c0,-1.1 -0.9,-2 -2,-2zM21,19h-9L12,6h9v13z"/>
android:pathData="M13,12h7v1.5h-7zM13,9.5h7L20,11h-7zM13,14.5h7L20,16h-7zM21,4L3,4c-1.1,0 -2,0.9 -2,2v13c0,1.1 0.9,2 2,2h18c1.1,0 2,-0.9 2,-2L23,6c0,-1.1 -0.9,-2 -2,-2zM21,19h-9L12,6h9v13z" />
</vector>

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M20,0L4,0v2h16L20,0zM4,24h16v-2L4,22v2zM20,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM12,6.75c1.24,0 2.25,1.01 2.25,2.25s-1.01,2.25 -2.25,2.25S9.75,10.24 9.75,9 10.76,6.75 12,6.75zM17,17L7,17v-1.5c0,-1.67 3.33,-2.5 5,-2.5s5,0.83 5,2.5L17,17z"/>
android:pathData="M20,0L4,0v2h16L20,0zM4,24h16v-2L4,22v2zM20,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM12,6.75c1.24,0 2.25,1.01 2.25,2.25s-1.01,2.25 -2.25,2.25S9.75,10.24 9.75,9 10.76,6.75 12,6.75zM17,17L7,17v-1.5c0,-1.67 3.33,-2.5 5,-2.5s5,0.83 5,2.5L17,17z" />
</vector>

View File

@@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#FFFFFF">
<group android:scaleX="0.92"
android:scaleY="0.92"
android:translateX="0.96"
android:translateY="0.96">
<path
android:fillColor="@android:color/white"
android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM12,17c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM15.1,8L8.9,8L8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2z"/>
</group>
</vector>

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M16,11c1.66,0 2.99,-1.34 2.99,-3S17.66,5 16,5c-1.66,0 -3,1.34 -3,3s1.34,3 3,3zM8,11c1.66,0 2.99,-1.34 2.99,-3S9.66,5 8,5C6.34,5 5,6.34 5,8s1.34,3 3,3zM8,13c-2.33,0 -7,1.17 -7,3.5L1,19h14v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5zM16,13c-0.29,0 -0.62,0.02 -0.97,0.05 1.16,0.84 1.97,1.97 1.97,3.45L17,19h6v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5z"/>
android:pathData="M16,11c1.66,0 2.99,-1.34 2.99,-3S17.66,5 16,5c-1.66,0 -3,1.34 -3,3s1.34,3 3,3zM8,11c1.66,0 2.99,-1.34 2.99,-3S9.66,5 8,5C6.34,5 5,6.34 5,8s1.34,3 3,3zM8,13c-2.33,0 -7,1.17 -7,3.5L1,19h14v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5zM16,13c-0.29,0 -0.62,0.02 -0.97,0.05 1.16,0.84 1.97,1.97 1.97,3.45L17,19h6v-2.5c0,-2.33 -4.67,-3.5 -7,-3.5z" />
</vector>

View File

@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M20,2L4,2c-1.1,0 -1.99,0.9 -1.99,2L2,22l4,-4h14c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM18,14L6,14v-2h12v2zM18,11L6,11L6,9h12v2zM18,8L6,8L6,6h12v2z"/>
android:pathData="M20,2L4,2c-1.1,0 -1.99,0.9 -1.99,2L2,22l4,-4h14c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM18,14L6,14v-2h12v2zM18,11L6,11L6,9h12v2zM18,8L6,8L6,6h12v2z" />
</vector>

View File

@@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#FFFFFF">
<group android:scaleX="0.92"
android:scaleY="0.92"
android:translateX="0.96"
android:translateY="0.96">
<path
android:fillColor="#FF000000"
android:pathData="M16,17V14H9V10H16V7L21,12L16,17M14,2A2,2 0,0 1,16 4V6H14V4H5V20H14V18H16V20A2,2 0,0 1,14 22H5A2,2 0,0 1,3 20V4A2,2 0,0 1,5 2H14Z"/>
</group>
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 977 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

View File

@@ -1,5 +1,6 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="85dp"
@@ -16,6 +17,6 @@
android:layout_marginRight="@dimen/margin_medium"
android:layout_marginBottom="@dimen/margin_medium"
android:contentDescription="@string/app_name"
android:src="@drawable/navigation_drawer_header" />
app:srcCompat="@drawable/navigation_drawer_header" />
</FrameLayout>

View File

@@ -20,11 +20,11 @@
android:adjustViewBounds="true"
android:padding="@dimen/margin_medium"
android:scaleType="fitCenter"
android:src="@drawable/qr_code_intro"
app:layout_constraintBottom_toBottomOf="@id/explanationText"
app:layout_constraintEnd_toStartOf="@id/explanationText"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/qr_code_intro"
app:tint="@color/color_primary"
tools:ignore="ContentDescription" />
@@ -38,11 +38,11 @@
android:paddingTop="@dimen/margin_large"
android:paddingEnd="@dimen/margin_large"
android:scaleType="fitCenter"
android:src="@drawable/qr_code_explanation"
app:layout_constraintBottom_toTopOf="@id/explanationText"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/diagram"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/qr_code_explanation"
tools:ignore="ContentDescription" />
<TextView

View File

@@ -52,7 +52,7 @@
android:layout_height="0dp"
android:contentDescription="@string/close"
android:scaleType="center"
android:src="@drawable/ic_close"
app:srcCompat="@drawable/ic_close"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"

View File

@@ -13,10 +13,10 @@
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:elevation="@dimen/margin_tiny"
android:src="@drawable/ic_info_white"
app:layout_constraintBottom_toTopOf="@+id/divider"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_info_white"
app:tint="?attr/colorControlNormal" />
<TextView

View File

@@ -12,12 +12,12 @@
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_margin="@dimen/margin_large"
android:src="@drawable/splash_screen"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.1"
app:srcCompat="@drawable/splash_screen"
app:tint="?attr/colorControlNormal" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -29,10 +29,10 @@
android:contentDescription="@string/blogs_reblog_button"
android:padding="2dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_repeat"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="@+id/avatar"
app:layout_constraintEnd_toEndOf="@+id/avatar" />
app:layout_constraintEnd_toEndOf="@+id/avatar"
app:srcCompat="@drawable/ic_repeat" />
<com.vanniktech.emoji.EmojiTextView
android:id="@+id/authorName"

View File

@@ -16,7 +16,7 @@
android:background="?attr/selectableItemBackground"
android:padding="@dimen/margin_small"
android:scaleType="center"
android:src="@drawable/ic_emoji_toggle"
app:srcCompat="@drawable/ic_emoji_toggle"
app:tint="?attr/colorControlNormal" />
<com.vanniktech.emoji.EmojiEditText

View File

@@ -24,7 +24,6 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:padding="8dp"
android:src="@drawable/ic_crash"
app:layout_constraintBottom_toTopOf="@+id/crashed"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
@@ -32,6 +31,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed"
app:srcCompat="@drawable/ic_crash"
app:tint="?attr/colorControlNormal"
tools:ignore="ContentDescription" />

View File

@@ -14,10 +14,10 @@
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:src="@drawable/alerts_and_states_error"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/alerts_and_states_error"
app:tint="?attr/colorControlNormal"
tools:ignore="ContentDescription" />

View File

@@ -30,10 +30,10 @@
android:layout_marginTop="16dp"
android:layout_marginRight="16dp"
android:scaleType="fitCenter"
android:src="@drawable/qr_code_error"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/errorTitle"
app:srcCompat="@drawable/qr_code_error"
app:tint="?attr/colorControlNormal"
tools:ignore="ContentDescription" />

View File

@@ -19,11 +19,11 @@
android:adjustViewBounds="true"
android:paddingBottom="@dimen/margin_large"
android:scaleType="fitCenter"
android:src="@drawable/qr_code_intro"
app:layout_constraintBottom_toTopOf="@id/explanationImage"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/qr_code_intro"
app:tint="@color/color_primary" />
<ImageView
@@ -35,11 +35,11 @@
android:paddingTop="@dimen/margin_large"
android:paddingRight="@dimen/margin_large"
android:scaleType="fitCenter"
android:src="@drawable/qr_code_explanation"
app:layout_constraintBottom_toTopOf="@id/explanationText"
app:layout_constraintEnd_toEndOf="@id/diagram"
app:layout_constraintStart_toStartOf="@id/diagram"
app:layout_constraintTop_toBottomOf="@id/diagram"
app:srcCompat="@drawable/qr_code_explanation"
tools:ignore="ContentDescription" />
<TextView

View File

@@ -81,9 +81,9 @@
android:layout_marginTop="32dp"
android:background="@drawable/bubble_accent"
android:scaleType="center"
android:src="@drawable/ic_call_made"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/stepOneText"
app:srcCompat="@drawable/ic_call_made"
app:tint="@android:color/white" />
<TextView
@@ -123,11 +123,11 @@
style="@style/BriarButtonFlat.Positive.Tiny"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_content_copy"
android:drawableLeft="@drawable/ic_content_copy"
android:drawablePadding="8dp"
android:enabled="false"
android:text="@string/copy_button"
app:drawableLeftCompat="@drawable/ic_content_copy"
app:drawableStartCompat="@drawable/ic_content_copy"
app:layout_constraintEnd_toStartOf="@id/shareButton"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintHorizontal_chainStyle="packed"
@@ -139,11 +139,11 @@
style="@style/BriarButtonFlat.Positive.Tiny"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableStart="@drawable/social_share_blue"
android:drawableLeft="@drawable/social_share_blue"
android:drawablePadding="8dp"
android:enabled="false"
android:text="@string/share_button"
app:drawableLeftCompat="@drawable/social_share_blue"
app:drawableStartCompat="@drawable/social_share_blue"
app:layout_constraintBottom_toBottomOf="@id/copyButton"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
@@ -157,9 +157,9 @@
android:layout_marginTop="16dp"
android:background="@drawable/bubble_accent"
android:scaleType="center"
android:src="@drawable/ic_call_received"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/copyButton"
app:srcCompat="@drawable/ic_call_received"
app:tint="@android:color/white" />
<TextView
@@ -202,10 +202,10 @@
style="@style/BriarButtonFlat.Positive.Tiny"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_content_paste"
android:drawableLeft="@drawable/ic_content_paste"
android:drawablePadding="8dp"
android:text="@string/paste_button"
app:drawableLeftCompat="@drawable/ic_content_paste"
app:drawableStartCompat="@drawable/ic_content_paste"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"

View File

@@ -77,13 +77,13 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="32dp"
android:src="@drawable/ic_nickname"
app:layout_constraintBottom_toTopOf="@+id/nicknameIcon"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_max="256dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/stepOneText"
app:srcCompat="@drawable/ic_nickname"
tools:ignore="ContentDescription" />
<androidx.appcompat.widget.AppCompatImageView
@@ -93,10 +93,10 @@
android:layout_marginTop="32dp"
android:background="@drawable/bubble_accent"
android:scaleType="center"
android:src="@drawable/ic_person"
app:layout_constraintBottom_toTopOf="@+id/contactNameLayout"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView"
app:srcCompat="@drawable/ic_person"
app:tint="@android:color/white" />
<TextView

View File

@@ -10,13 +10,13 @@
android:layout_width="128dp"
android:layout_height="128dp"
android:scaleType="center"
android:src="@drawable/startup_lock"
app:layout_constraintBottom_toTopOf="@+id/textView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.5"
app:layout_constraintVertical_chainStyle="packed"
app:srcCompat="@drawable/startup_lock"
app:tint="@color/briar_accent"
tools:ignore="ContentDescription" />

View File

@@ -10,13 +10,13 @@
android:layout_width="128dp"
android:layout_height="128dp"
android:scaleType="center"
android:src="@drawable/startup_lock"
app:layout_constraintBottom_toTopOf="@+id/textView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.5"
app:layout_constraintVertical_chainStyle="packed"
app:srcCompat="@drawable/startup_lock"
app:tint="@color/briar_primary"
tools:ignore="ContentDescription" />

View File

@@ -38,13 +38,13 @@
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginBottom="8dp"
android:src="@drawable/ic_close"
app:backgroundTint="@color/briar_accent"
app:fabCustomSize="26dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0"
app:maxImageSize="18dp" />
app:maxImageSize="18dp"
app:srcCompat="@drawable/ic_close" />
</merge>

View File

@@ -43,11 +43,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_large"
android:src="@drawable/ic_contact_introduction"
app:layout_constraintBottom_toBottomOf="@+id/barrier"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/avatarContact2"
app:srcCompat="@drawable/ic_contact_introduction"
app:tint="?attr/colorControlNormal"
tools:ignore="ContentDescription" />

View File

@@ -47,9 +47,9 @@
android:layout_height="@dimen/button_size"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/blogs_reblog_comment_hint"
android:src="@drawable/ic_repeat"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_repeat"
app:tint="?attr/colorControlNormal" />
<com.vanniktech.emoji.EmojiTextView

View File

@@ -41,10 +41,10 @@
android:layout_height="@dimen/button_size"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/groups_remove"
android:src="@drawable/action_delete_black"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/name"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/action_delete_black"
app:tint="?attr/colorControlNormal" />
<TextView

View File

@@ -40,9 +40,9 @@
android:layout_marginStart="@dimen/listitem_horizontal_margin"
android:layout_marginLeft="@dimen/listitem_horizontal_margin"
android:layout_marginTop="4dp"
android:src="@drawable/ic_visibility"
app:layout_constraintStart_toEndOf="@+id/avatarView"
app:layout_constraintTop_toBottomOf="@+id/nameView"
app:srcCompat="@drawable/ic_visibility"
app:tint="?attr/colorControlNormal"
tools:ignore="ContentDescription" />

View File

@@ -27,9 +27,9 @@
android:layout_margin="@dimen/margin_medium"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/delete"
android:src="@drawable/action_delete_black"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/action_delete_black"
app:tint="?attr/colorControlNormal" />
<TextView

View File

@@ -26,11 +26,11 @@
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_margin="@dimen/margin_medium"
android:src="@drawable/ic_check_white"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="@+id/button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/button"
app:srcCompat="@drawable/ic_check_white"
app:tint="?attr/colorControlNormal"
tools:ignore="ContentDescription" />
@@ -52,10 +52,10 @@
android:layout_height="24dp"
android:layout_margin="@dimen/margin_medium"
android:contentDescription="@string/help"
android:src="@drawable/ic_help_outline_white"
android:tint="@color/briar_button_text_positive"
app:layout_constraintBottom_toBottomOf="@+id/button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/button" />
app:layout_constraintTop_toTopOf="@+id/button"
app:srcCompat="@drawable/ic_help_outline_white" />
</merge>

View File

@@ -1,5 +1,6 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
tools:showIn="@layout/fragment_keyagreement_qr">
@@ -25,6 +26,6 @@
android:alpha="0.54"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/show_qr_code_fullscreen"
android:src="@drawable/ic_fullscreen_black_48dp" />
app:srcCompat="@drawable/ic_fullscreen_black_48dp" />
</merge>

View File

@@ -1,5 +1,6 @@
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent">
@@ -9,6 +10,6 @@
android:layout_gravity="center"
android:layout_margin="@dimen/margin_xxlarge"
android:contentDescription="@string/app_name"
android:src="@drawable/splash_screen" />
app:srcCompat="@drawable/splash_screen" />
</FrameLayout>

View File

@@ -19,8 +19,8 @@
android:focusable="true"
android:padding="4dp"
android:scaleType="center"
android:src="@drawable/ic_image_off"
android:visibility="invisible"
app:srcCompat="@drawable/ic_image_off"
app:tint="?attr/colorControlNormal" />
<androidx.appcompat.widget.AppCompatImageButton
@@ -34,7 +34,7 @@
android:focusable="true"
android:padding="4dp"
android:scaleType="center"
android:src="@drawable/social_send_now_white"
app:srcCompat="@drawable/social_send_now_white"
app:tint="@color/briar_accent" />
<ProgressBar

View File

@@ -141,7 +141,7 @@
<style name="StepBubble.Completed">
<item name="android:background">@drawable/bubble_completed</item>
<item name="android:scaleType">center</item>
<item name="android:src">@drawable/ic_check_white</item>
<item name="srcCompat">@drawable/ic_check_white</item>
</style>
</resources>