mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 18:03:33 +00:00
feat: Make all objects in Tempo references for quick access (#158)
This commit is contained in:
commit
9c088a7e88
22 changed files with 1119 additions and 53 deletions
10
app/src/main/res/drawable/ic_link.xml
Normal file
10
app/src/main/res/drawable/ic_link.xml
Normal file
|
|
@ -0,0 +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:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="?attr/colorOnSurfaceVariant"
|
||||
android:pathData="M3.9,12c0,1.71 1.39,3.1 3.1,3.1h3v1.8h-3c-2.7,0 -4.9,-2.2 -4.9,-4.9s2.2,-4.9 4.9,-4.9h3v1.8h-3c-1.71,0 -3.1,1.39 -3.1,3.1zM7,13h10v-2H7v2zM17,6.9h-3v-1.8h3c2.7,0 4.9,2.2 4.9,4.9s-2.2,4.9 -4.9,4.9h-3v-1.8h3c1.71,0 3.1,-1.39 3.1,-3.1s-1.39,-3.1 -3.1,-3.1z" />
|
||||
</vector>
|
||||
|
|
@ -68,6 +68,14 @@
|
|||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<include
|
||||
android:id="@+id/song_asset_link_row"
|
||||
layout="@layout/view_asset_link_row"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="12dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/option_linear_layout"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -209,4 +217,4 @@
|
|||
android:text="@string/song_bottom_sheet_share"
|
||||
android:visibility="gone"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -57,6 +57,17 @@
|
|||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<include
|
||||
android:id="@+id/player_asset_link_row"
|
||||
layout="@layout/view_asset_link_row"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/player_media_quality_sector" />
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/player_media_cover_view_pager"
|
||||
android:layout_width="0dp"
|
||||
|
|
@ -66,7 +77,7 @@
|
|||
app:layout_constraintBottom_toTopOf="@id/guideline"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/player_media_quality_sector" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/player_asset_link_row" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline"
|
||||
|
|
@ -400,4 +411,4 @@
|
|||
app:srcCompat="@drawable/ic_eq" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
|||
55
app/src/main/res/layout/view_asset_link_row.xml
Normal file
55
app/src/main/res/layout/view_asset_link_row.xml
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.chip.ChipGroup xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/asset_link_chip_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
app:singleLine="true"
|
||||
app:selectionRequired="false"
|
||||
app:singleSelection="false">
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/asset_link_song_chip"
|
||||
style="@style/Widget.Material3.Chip.Assist"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checkable="false"
|
||||
android:clickable="true"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text=""
|
||||
app:chipIcon="@drawable/ic_link"
|
||||
app:chipIconTint="?attr/colorOnSurfaceVariant"
|
||||
app:rippleColor="@color/ripple_material_light" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/asset_link_album_chip"
|
||||
style="@style/Widget.Material3.Chip.Assist"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checkable="false"
|
||||
android:clickable="true"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text=""
|
||||
app:chipIcon="@drawable/ic_link"
|
||||
app:chipIconTint="?attr/colorOnSurfaceVariant"
|
||||
app:rippleColor="@color/ripple_material_light" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/asset_link_artist_chip"
|
||||
style="@style/Widget.Material3.Chip.Assist"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checkable="false"
|
||||
android:clickable="true"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text=""
|
||||
app:chipIcon="@drawable/ic_link"
|
||||
app:chipIconTint="?attr/colorOnSurfaceVariant"
|
||||
app:rippleColor="@color/ripple_material_light" />
|
||||
</com.google.android.material.chip.ChipGroup>
|
||||
3
app/src/main/res/values/ids.xml
Normal file
3
app/src/main/res/values/ids.xml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<resources>
|
||||
<item name="tag_link_original_color" type="id" />
|
||||
</resources>
|
||||
|
|
@ -410,6 +410,22 @@
|
|||
<string name="share_bottom_sheet_update">Update share</string>
|
||||
<string name="share_subtitle_item">Expiration date: %1$s</string>
|
||||
<string name="share_unsupported_error">Sharing is not supported or not enabled</string>
|
||||
<string name="asset_link_clipboard_label">Tempo asset link</string>
|
||||
<string name="asset_link_label_song">Song UID</string>
|
||||
<string name="asset_link_label_album">Album UID</string>
|
||||
<string name="asset_link_label_artist">Artist UID</string>
|
||||
<string name="asset_link_label_playlist">Playlist UID</string>
|
||||
<string name="asset_link_label_genre">Genre UID</string>
|
||||
<string name="asset_link_label_year">Year UID</string>
|
||||
<string name="asset_link_label_unknown">Asset UID</string>
|
||||
<string name="asset_link_error_unsupported">Unsupported asset link</string>
|
||||
<string name="asset_link_error_song">Song could not be opened</string>
|
||||
<string name="asset_link_error_album">Album could not be opened</string>
|
||||
<string name="asset_link_error_artist">Artist could not be opened</string>
|
||||
<string name="asset_link_error_playlist">Playlist could not be opened</string>
|
||||
<string name="asset_link_chip_text">%1$s • %2$s</string>
|
||||
<string name="asset_link_copied_toast">Copied %1$s to clipboard</string>
|
||||
<string name="asset_link_debug_toast">Asset link: %1$s</string>
|
||||
<string name="share_update_dialog_hint_description">Description</string>
|
||||
<string name="share_update_dialog_hint_expiration_date">Expiration date</string>
|
||||
<string name="share_update_dialog_negative_button">Cancel</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue