Fix a number of lint issues (#2)

* Fix systemUiVisibility deprecation warnings

This commit extracts setSystemUiVisibility as
an extension and uses the new API depending on
the Build.VERSION

* Fix splash fragment vector issues

Clip-path isn't available before V24 and
width/height should not exceed 200 dp.

* Remove unused disclaimer fragment header

* Remove unused ic_launcher_round

* Ignore IconMissingDensityFolder lint

Ignoring it because all the images are vector

* Ignore UnusedAttribute lint

It warns about networkSecurityConfig which
is used only in debug builds to allow
user SSL certificates. Lint says it's not
available before v24. But it doesn't matter
since before v24 the user SSL certificates
were allowed by default.

* Use plurals for disclaimer count down
This commit is contained in:
Kirill Kamakin
2021-11-27 16:10:00 +03:00
committed by GitHub
parent dee0d00507
commit 44458dd146
17 changed files with 60 additions and 28 deletions

View File

@@ -1,11 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="360dp"
android:height="640dp"
android:width="113dp"
android:height="200dp"
android:viewportWidth="360"
android:viewportHeight="640">
<group>
<clip-path android:pathData="M0,0h360v640h-360z" />
<path android:pathData="M0,0h360v640h-360z">
<aapt:attr name="android:fillColor">
<gradient

View File

@@ -40,7 +40,7 @@
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_small"
android:clickable="false"
android:text="@string/fragment_disclaimer_button_okay_timer"
tools:text="Okay (3 seconds)"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main_text_holder" />

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<plurals name="fragment_disclaimer_button_okay_timer">
<item quantity="one">Хорошо (%d секунда)</item>
<item quantity="few">Хорошо (%d секунды)</item>
<item quantity="many">Хорошо (%d секунд)</item>
</plurals>
</resources>

View File

@@ -9,10 +9,8 @@
<string name="view_holder_recipe_text_placeholder">Загрузка</string>
<string name="fragment_recipe_info_ingredients_header">Ингредиенты</string>
<string name="fragment_recipe_info_instructions_header">Инструкции</string>
<string name="fragment_disclaimer_button_okay_timer">Хорошо (%d секунд)</string>
<string name="view_holder_recipe_instructions_step">Шаг: %d</string>
<string name="fragment_disclaimer_button_okay">Хорошо</string>
<string name="fragment_disclaimer_header">ДИСКЛЕЙМЕР</string>
<string name="fragment_disclaimer_main_text">Этот проект разрабатывается независимо от основного проекта Meale. Он не связан с разработчиками Mealie. О любых проблемах следует писать в репозиторий Mealient, НЕ в репозиторий Mealie.</string>
<string name="fragment_authentication_email_input_empty">E-mail не может быть пустым</string>
<string name="fragment_authentication_password_input_empty">Пароль не может быть пустым</string>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<plurals name="fragment_disclaimer_button_okay_timer">
<item quantity="one">Okay (%d second)</item>
<item quantity="other">Okay (%d seconds)</item>
</plurals>
</resources>

View File

@@ -11,9 +11,7 @@
<string name="content_description_fragment_recipe_info_image" translatable="false">@string/content_description_view_holder_recipe_image</string>
<string name="fragment_recipe_info_ingredients_header">Ingredients</string>
<string name="fragment_recipe_info_instructions_header">Instructions</string>
<string name="fragment_disclaimer_button_okay_timer">Okay (%d seconds)</string>
<string name="fragment_disclaimer_main_text">This project is developed independently from the core Mealie project. It is NOT associated with the core Mealie developers. Any issues must be reported to the Mealient repository, NOT the Mealie repository.</string>
<string name="fragment_disclaimer_header">DISCLAIMER</string>
<string name="fragment_disclaimer_button_okay">Okay</string>
<string name="view_holder_recipe_instructions_step">Step: %d</string>
<string name="fragment_authentication_email_input_empty">E-mail can\'t be empty</string>