mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Use vector support libraries instead of rasterizing all drawables
https://developer.android.com/guide/topics/graphics/vector-drawable-resources#vector-drawables-backward-solution
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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" />
|
||||
|
||||
|
||||
@@ -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" />
|
||||
|
||||
|
||||
@@ -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" />
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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" />
|
||||
|
||||
|
||||
@@ -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" />
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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" />
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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" />
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user