Add about dialog

Add an about dialog with information about this app.
This commit is contained in:
OxygenCobalt
2020-12-18 10:05:31 -07:00
parent 4933531ca3
commit 0d32ab0f7e
29 changed files with 463 additions and 37 deletions
+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M11,18h2v-2h-2v2zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM12,6c-2.21,0 -4,1.79 -4,4h2c0,-1.1 0.9,-2 2,-2s2,0.9 2,2c0,2 -3,1.75 -3,5h2c0,-2.25 3,-2.5 3,-5 0,-2.21 -1.79,-4 -4,-4z"/>
</vector>
+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM21.41,6.34l-3.75,-3.75 -2.53,2.54 3.75,3.75 2.53,-2.54z"/>
</vector>
+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M9.4,16.6L4.8,12l4.6,-4.6L8,6l-6,6 6,6 1.4,-1.4zM14.6,16.6l4.6,-4.6 -4.6,-4.6L16,6l6,6 -6,6 -1.4,-1.4z"/>
</vector>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M4,6L2,6v16h16v-2L4,20L4,6zM22,2L6,2v16h16L22,2zM19,11L9,11L9,9h10v2zM15,15L9,15v-2h6v2zM19,7L9,7L9,5h10v2z"/>
</vector>
+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M4.01,2L4,22h16V8l-6,-6H4.01zM13,9V3.5L18.5,9H13z"/>
</vector>
+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M11,7h2v2h-2zM11,11h2v6h-2zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z"/>
</vector>
+168
View File
@@ -0,0 +1,168 @@
<?xml version="1.0" encoding="utf-8"?>
<layout 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">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background"
android:theme="@style/Theme.Neutral">
<ImageView
android:id="@+id/about_auxio_icon"
android:layout_width="@dimen/size_app_icon"
android:layout_height="@dimen/size_app_icon"
android:layout_marginTop="@dimen/margin_medium"
android:contentDescription="@string/description_auxio_icon"
android:src="@mipmap/ic_launcher"
app:layout_constraintEnd_toStartOf="@+id/about_app_name"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/about_app_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_medium"
android:fontFamily="@font/inter_semibold"
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline5"
app:layout_constraintBottom_toBottomOf="@+id/about_auxio_icon"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/about_auxio_icon"
app:layout_constraintTop_toTopOf="@+id/about_auxio_icon" />
<TextView
android:id="@+id/about_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_small"
android:text="@string/app_desc"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/about_auxio_icon" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/version_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:padding="@dimen/padding_medium"
app:layout_constraintBottom_toTopOf="@+id/about_code"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/about_desc"
app:layout_constraintVertical_bias="0"
app:layout_constraintVertical_chainStyle="packed">
<ImageView
android:id="@+id/about_version_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/label_version"
android:src="@drawable/ic_version"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/about_version_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_medium"
android:text="@string/label_version"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
app:layout_constraintBottom_toTopOf="@+id/about_version"
app:layout_constraintStart_toEndOf="@+id/about_version_icon"
app:layout_constraintTop_toTopOf="@+id/about_version_icon" />
<TextView
android:id="@+id/about_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
app:layout_constraintBottom_toBottomOf="@+id/about_version_icon"
app:layout_constraintStart_toEndOf="@+id/about_version_icon"
app:layout_constraintTop_toBottomOf="@+id/about_version_title"
tools:text="0.0.0" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/about_code"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ui_ripple"
android:clickable="true"
android:drawablePadding="@dimen/padding_medium"
android:focusable="true"
android:padding="@dimen/padding_medium"
android:text="@string/label_code"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
app:drawableLeftCompat="@drawable/ic_code"
app:layout_constraintBottom_toTopOf="@+id/about_faq"
app:layout_constraintTop_toBottomOf="@+id/version_container" />
<TextView
android:id="@+id/about_licenses"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ui_ripple"
android:clickable="true"
android:drawablePadding="@dimen/padding_medium"
android:focusable="true"
android:padding="@dimen/padding_medium"
android:text="@string/label_licenses"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
app:drawableLeftCompat="@drawable/ic_license"
app:layout_constraintBottom_toTopOf="@+id/about_song_count"
app:layout_constraintTop_toBottomOf="@+id/about_faq" />
<TextView
android:id="@+id/about_faq"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ui_ripple"
android:clickable="true"
android:drawablePadding="@dimen/padding_medium"
android:focusable="true"
android:padding="@dimen/padding_medium"
android:text="@string/label_faq"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
app:drawableLeftCompat="@drawable/ic_about"
app:layout_constraintBottom_toTopOf="@+id/about_licenses"
app:layout_constraintTop_toBottomOf="@+id/about_code"
tools:layout_editor_absoluteX="0dp" />
<TextView
android:id="@+id/about_song_count"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/padding_medium"
android:padding="@dimen/padding_medium"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
app:drawableLeftCompat="@drawable/ic_song"
app:layout_constraintBottom_toTopOf="@+id/about_author"
app:layout_constraintTop_toBottomOf="@+id/about_licenses"
tools:text="Songs Loaded: 1616" />
<TextView
android:id="@+id/about_author"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/padding_medium"
android:padding="@dimen/padding_medium"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
app:drawableLeftCompat="@drawable/ic_author"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/about_song_count"
tools:text="Created by OxygenCobalt" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
@@ -8,10 +8,11 @@
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/song_toolbar"
android:id="@+id/settings_toolbar"
style="@style/Toolbar.Style"
android:background="?android:attr/windowBackground"
android:elevation="@dimen/elevation_normal"
app:menu="@menu/menu_settings"
app:title="@string/setting_title" />
<androidx.fragment.app.FragmentContainerView
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_open_about"
android:title="@string/label_about"
android:icon="@drawable/ic_about"
app:showAsAction="always" />
</menu>
+2
View File
@@ -34,6 +34,8 @@
<dimen name="size_play_pause">70dp</dimen>
<dimen name="size_play_pause_compact">36dp</dimen>
<dimen name="size_app_icon">60dp</dimen>
<!-- Text Size Namespace | Text Sizes -->
<dimen name="text_size_min">10sp</dimen>
<dimen name="text_size_increment">2sp</dimen>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="author_oxycblt">OxygenCobalt</string>
</resources>
+12
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Auxio</string>
<string name="app_desc">A sensible and customizable music player for android.</string>
<!-- Label Namespace | Static Labels -->
<string name="label_retry">Retry</string>
@@ -36,6 +37,12 @@
<string name="label_channel">Music Playback</string>
<string name="label_service_playback">The music playback service for Auxio.</string>
<string name="label_about">About</string>
<string name="label_version">Version</string>
<string name="label_code">View on Github</string>
<string name="label_licenses">Licenses</string>
<string name="label_faq">FAQ</string>
<!-- Settings namespace | Settings-related labels -->
<string name="setting_title">Settings</string>
<string name="setting_ui">Appearance</string>
@@ -94,6 +101,7 @@
<string name="error_no_music">No music found.</string>
<string name="error_music_load_failed">Music loading failed.</string>
<string name="error_no_perms">Permissions to read storage are needed.</string>
<string name="error_no_browser">Could not open link.</string>
<!-- Hint Namespace | EditText Hints -->
<string name="hint_search_library">Search Library…</string>
@@ -116,6 +124,8 @@
<string name="description_shuffle_on">Turn shuffle on</string>
<string name="description_shuffle_off">Turn shuffle off</string>
<string name="description_change_loop">Change Repeat Mode</string>
<string name="description_auxio_icon">Auxio icon</string>
<string name="description_code">Code</string>
<!-- Placeholder Namespace | Placeholder values -->
<string name="placeholder_genre">Unknown Genre</string>
@@ -151,6 +161,8 @@
<string name="format_double_counts">%1$s, %2$s</string>
<string name="format_next_from">Next From: %s</string>
<string name="format_accent_summary">&lt;b>%1$s&lt;/b>:&#160;%2$s</string>
<string name="format_songs_loaded">Songs Loaded: %s</string>
<string name="format_author">Created by %s</string>
<plurals name="format_song_count">
<item quantity="one">%s Song</item>
+6
View File
@@ -167,4 +167,10 @@
<item name="android:paddingEnd">@dimen/padding_medium</item>
<item name="android:background">@drawable/ui_small_unbounded_ripple</item>
</style>
<!-- Bottomsheet style -->
<style name="Theme.BottomSheetFix" parent="@style/Theme.Design.BottomSheetDialog">
<item name="android:windowIsFloating">false</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
</resources>