Change app style
Update the app style by modifying some colors & using Source Code Pro. Yes, this looks like Music Player GO but Ill probably make some more changes in the future.
This commit is contained in:
parent
5662725c72
commit
1e4f80b779
10 changed files with 25 additions and 16 deletions
|
@ -3,7 +3,6 @@ package org.oxycblt.auxio
|
|||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
|
||||
|
@ -11,7 +10,7 @@ class MainActivity : AppCompatActivity() {
|
|||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
|
||||
// AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
|
||||
|
||||
Log.d(this::class.simpleName, "Activity Created.")
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package org.oxycblt.auxio.music.processing
|
|||
import android.app.Application
|
||||
import android.content.ContentResolver
|
||||
import android.database.Cursor
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.ImageDecoder
|
||||
import android.os.Build
|
||||
import android.provider.MediaStore
|
||||
|
@ -198,12 +197,11 @@ class MusicLoader(private val app: Application) {
|
|||
// Album art loading during the initial load isn't really practical for a large amount of albums
|
||||
// Use glide or something
|
||||
val artUri = id.toAlbumArtURI()
|
||||
var cover: Bitmap? = null
|
||||
|
||||
// Get the album art through either ImageDecoder or MediaStore depending on the
|
||||
// version.
|
||||
try {
|
||||
cover = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
val cover = try {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
ImageDecoder.decodeBitmap(
|
||||
ImageDecoder.createSource(resolver, artUri)
|
||||
)
|
||||
|
@ -211,7 +209,7 @@ class MusicLoader(private val app: Application) {
|
|||
MediaStore.Images.Media.getBitmap(resolver, artUri)
|
||||
}
|
||||
} catch (noFound: FileNotFoundException) {
|
||||
cover = null
|
||||
null
|
||||
}
|
||||
|
||||
albums.add(
|
||||
|
|
BIN
app/src/main/res/font/source_sans_pro.ttf
Normal file
BIN
app/src/main/res/font/source_sans_pro.ttf
Normal file
Binary file not shown.
BIN
app/src/main/res/font/source_sans_pro_black.ttf
Normal file
BIN
app/src/main/res/font/source_sans_pro_black.ttf
Normal file
Binary file not shown.
|
@ -31,9 +31,11 @@
|
|||
android:id="@+id/albumNameText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{album.title}"
|
||||
android:textAppearance="?attr/textAppearanceListItem"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:fontFamily="@font/source_sans_pro"
|
||||
android:text="@{album.title}"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.05"
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
android:textColor="?attr/titleTextColor"
|
||||
app:titleTextAppearance="@style/ToolbarText"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:title="@string/title_library_fragment" />
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
android:id="@+id/loading_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminateTint="?attr/colorAccent"
|
||||
android:indeterminateTint="?android:attr/colorAccent"
|
||||
android:indeterminateTintMode="src_in"
|
||||
android:paddingBottom="@dimen/padding_small"
|
||||
app:layout_constraintBottom_toTopOf="@+id/error_text"
|
||||
|
@ -32,6 +32,7 @@
|
|||
android:id="@+id/error_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/source_sans_pro"
|
||||
app:layout_constraintBottom_toTopOf="@+id/reset_button"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
|
@ -44,8 +45,9 @@
|
|||
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_retry"
|
||||
android:fontFamily="@font/source_sans_pro"
|
||||
android:onClick="@{() -> loadingModel.retry()}"
|
||||
android:text="@string/label_retry"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
|
@ -9,4 +9,7 @@
|
|||
<color name="black">#000000</color>
|
||||
|
||||
<color name="white">#ffffff</color>
|
||||
|
||||
<!-- TODO: Placeholder accent color, need to remove -->
|
||||
<color name="blue">#2979FF</color>
|
||||
</resources>
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<string name="label_retry">Retry</string>
|
||||
|
||||
<string name="title_library_fragment">Library</string>
|
||||
<string name="title_library_fragment"><b>Library</b></string>
|
||||
|
||||
<string name="description_cover_art">Cover art for </string>
|
||||
</resources>
|
|
@ -3,6 +3,11 @@
|
|||
<!-- Base theme -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<!-- TODO: Make this accent settable -->
|
||||
<item name="colorAccent">#295DE5</item>
|
||||
<item name="colorAccent">@color/blue</item>
|
||||
</style>
|
||||
|
||||
<style name="ToolbarText" parent="TextAppearance.AppCompat.Title">
|
||||
<item name="android:fontFamily">@font/source_sans_pro_black</item>
|
||||
<item name="android:textColor">@color/blue</item>
|
||||
</style>
|
||||
</resources>
|
Loading…
Reference in a new issue