Add artist image to DetailFragment

Add the artist image to the DetailFragment. Still considering what I want to do design-wise with this.
This commit is contained in:
OxygenCobalt
2020-09-13 19:32:33 -06:00
parent 860033ac14
commit 26b53bd502
21 changed files with 94 additions and 103 deletions
@@ -10,7 +10,7 @@
type="org.oxycblt.auxio.music.models.Artist" />
</data>
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
@@ -22,14 +22,22 @@
android:layout_height="?android:attr/actionBarSize"
android:background="?android:attr/windowBackground"
android:elevation="@dimen/elevation_normal"
app:titleTextAppearance="@style/TextAppearance.Toolbar.Bold"
app:layout_constraintTop_toTopOf="parent"
app:title="@string/title_library_fragment"
app:titleTextAppearance="@style/TextAppearance.Toolbar.Bold"
tools:titleTextColor="@color/blue" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{artist.name}" />
<ImageView
android:id="@+id/artist_image"
android:layout_width="@dimen/cover_size_huge"
android:layout_height="@dimen/cover_size_huge"
android:layout_margin="@dimen/margin_medium"
app:artistImage="@{artist}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/toolbar"
tools:ignore="ContentDescription"
tools:src="@drawable/ic_artist"
tools:tint="@color/blue" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
+1 -1
View File
@@ -25,6 +25,6 @@
android:layout_height="0dp"
android:layout_weight="1"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_album" />
tools:listitem="@layout/item_artist" />
</LinearLayout>
</layout>
+3 -2
View File
@@ -26,8 +26,9 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/backgrounds/scenic"
tools:ignore="ContentDescription" />
tools:ignore="ContentDescription"
tools:src="@drawable/ic_album"
tools:tint="@color/blue" />
<TextView
android:id="@+id/album_name"
+5 -3
View File
@@ -22,12 +22,14 @@
android:id="@+id/artist_image"
android:layout_width="@dimen/cover_size_normal"
android:layout_height="@dimen/cover_size_normal"
app:artistImage="@{artist}"
android:src="@drawable/ic_exit"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/backgrounds/scenic"
tools:ignore="ContentDescription" />
app:artistImage="@{artist}"
tools:ignore="ContentDescription"
tools:src="@drawable/ic_artist"
tools:tint="@color/blue" />
<TextView
android:id="@+id/artist_name"
+3 -2
View File
@@ -26,8 +26,9 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/backgrounds/scenic"
tools:ignore="ContentDescription" />
tools:ignore="ContentDescription"
tools:src="@drawable/ic_song"
tools:tint="@color/blue" />
<TextView
android:id="@+id/song_name"
+5 -1
View File
@@ -22,7 +22,11 @@
tools:layout="@layout/fragment_main">
<action
android:id="@+id/action_show_artist"
app:destination="@id/artist_detail_fragment" />
app:destination="@id/artist_detail_fragment"
app:enterAnim="@anim/fragment_fade_enter"
app:exitAnim="@anim/fragment_fade_exit"
app:popEnterAnim="@anim/fragment_fade_enter"
app:popExitAnim="@anim/fragment_fade_exit" />
</fragment>
<fragment
android:id="@+id/artist_detail_fragment"
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<fade xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="@android:integer/config_mediumAnimTime"/>
android:duration="@android:integer/config_mediumAnimTime" />
-30
View File
@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="background">#151515</color>
<color name="divider_color">#323232</color>
<color name="selection_color">#484848</color>
<!--
Base color set derived from Music Player GO.
https://github.com/enricocid/Music-Player-GO
-->
<color name="red">#ef9a9a</color>
<color name="pink">#f48fb1</color>
<color name="purple">#ce93d8</color>
<color name="deep_purple">#b39ddb</color>
<color name="indigo">#9fa8da</color>
<color name="blue">#90caf9</color>
<color name="light_blue">#81d4fa</color>
<color name="cyan">#80deea</color>
<color name="teal">#80cbc4</color>
<color name="green">#a5d6a7</color>
<color name="light_green">#c5e1a5</color>
<color name="lime">#e6ee9c</color>
<color name="yellow">#fff59d</color>
<color name="amber">#ffe082</color>
<color name="orange">#ffcc80</color>
<color name="deep_orange">#ffab91</color>
<color name="brown">#bcaaa4</color>
<color name="grey">#eeeeee</color>
<color name="blue_grey">#b0bec5</color>
</resources>
+22 -22
View File
@@ -1,30 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="background">#fafafa</color>
<color name="divider_color">#cbcbcb</color>
<color name="selection_color">#cbcbcb</color>
<color name="background">#151515</color>
<color name="divider_color">#323232</color>
<color name="selection_color">#484848</color>
<!--
Base color set derived from Music Player GO.
https://github.com/enricocid/Music-Player-GO
-->
<color name="red">#f44336</color>
<color name="pink">#e91e63</color>
<color name="purple">#9c27b0</color>
<color name="deep_purple">#673ab7</color>
<color name="indigo">#3f51b5</color>
<color name="blue">#2196f3</color>
<color name="light_blue">#03a9f4</color>
<color name="cyan">#00bcd4</color>
<color name="teal">#009688</color>
<color name="green">#4caf50</color>
<color name="light_green">#8bc34a</color>
<color name="lime">#cddc39</color>
<color name="yellow">#ffeb3b</color>
<color name="amber">#ffc107</color>
<color name="orange">#ff9800</color>
<color name="deep_orange">#ff5722</color>
<color name="brown">#795548</color>
<color name="grey">#9e9e9e</color>
<color name="blue_grey">#607d8b</color>
<color name="red">#ef9a9a</color>
<color name="pink">#f48fb1</color>
<color name="purple">#ce93d8</color>
<color name="deep_purple">#b39ddb</color>
<color name="indigo">#9fa8da</color>
<color name="blue">#90caf9</color>
<color name="light_blue">#81d4fa</color>
<color name="cyan">#80deea</color>
<color name="teal">#80cbc4</color>
<color name="green">#a5d6a7</color>
<color name="light_green">#c5e1a5</color>
<color name="lime">#e6ee9c</color>
<color name="yellow">#fff59d</color>
<color name="amber">#ffe082</color>
<color name="orange">#ffcc80</color>
<color name="deep_orange">#ffab91</color>
<color name="brown">#bcaaa4</color>
<color name="grey">#eeeeee</color>
<color name="blue_grey">#b0bec5</color>
</resources>
+1
View File
@@ -13,6 +13,7 @@
<dimen name="cover_size_compact">44dp</dimen>
<dimen name="cover_size_normal">56dp</dimen>
<dimen name="cover_size_huge">168dp</dimen>
<dimen name="elevation_normal">4dp</dimen>
</resources>
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Base theme -->
<style name="Theme.Base" parent="Theme.AppCompat.DayNight.NoActionBar">
<style name="Theme.Base" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">@color/background</item>
<item name="android:statusBarColor">@android:color/black</item>
<item name="android:fontFamily">@font/inter</item>