Add current song
BIN
app/src/main/res/drawable-hdpi/round_music_note.png
Normal file
After Width: | Height: | Size: 405 B |
BIN
app/src/main/res/drawable-hdpi/round_music_note_black_18.png
Normal file
After Width: | Height: | Size: 218 B |
BIN
app/src/main/res/drawable-hdpi/round_music_note_black_24.png
Normal file
After Width: | Height: | Size: 248 B |
BIN
app/src/main/res/drawable-hdpi/round_music_note_black_36.png
Normal file
After Width: | Height: | Size: 338 B |
BIN
app/src/main/res/drawable-hdpi/round_queue_music.png
Normal file
After Width: | Height: | Size: 360 B |
BIN
app/src/main/res/drawable-hdpi/round_queue_music_black_18.png
Normal file
After Width: | Height: | Size: 254 B |
BIN
app/src/main/res/drawable-hdpi/round_queue_music_black_24.png
Normal file
After Width: | Height: | Size: 257 B |
BIN
app/src/main/res/drawable-hdpi/round_queue_music_black_48.png
Normal file
After Width: | Height: | Size: 412 B |
BIN
app/src/main/res/drawable-mdpi/round_music_note.png
Normal file
After Width: | Height: | Size: 286 B |
BIN
app/src/main/res/drawable-mdpi/round_music_note_black_18.png
Normal file
After Width: | Height: | Size: 175 B |
BIN
app/src/main/res/drawable-mdpi/round_music_note_black_24.png
Normal file
After Width: | Height: | Size: 181 B |
BIN
app/src/main/res/drawable-mdpi/round_music_note_black_36.png
Normal file
After Width: | Height: | Size: 248 B |
BIN
app/src/main/res/drawable-mdpi/round_queue_music.png
Normal file
After Width: | Height: | Size: 257 B |
BIN
app/src/main/res/drawable-mdpi/round_queue_music_black_18.png
Normal file
After Width: | Height: | Size: 168 B |
BIN
app/src/main/res/drawable-mdpi/round_queue_music_black_24.png
Normal file
After Width: | Height: | Size: 165 B |
BIN
app/src/main/res/drawable-mdpi/round_queue_music_black_48.png
Normal file
After Width: | Height: | Size: 283 B |
BIN
app/src/main/res/drawable-xhdpi/round_music_note.png
Normal file
After Width: | Height: | Size: 525 B |
BIN
app/src/main/res/drawable-xhdpi/round_music_note_black_18.png
Normal file
After Width: | Height: | Size: 248 B |
BIN
app/src/main/res/drawable-xhdpi/round_music_note_black_24.png
Normal file
After Width: | Height: | Size: 286 B |
BIN
app/src/main/res/drawable-xhdpi/round_music_note_black_36.png
Normal file
After Width: | Height: | Size: 405 B |
BIN
app/src/main/res/drawable-xhdpi/round_queue_music.png
Normal file
After Width: | Height: | Size: 412 B |
BIN
app/src/main/res/drawable-xhdpi/round_queue_music_black_18.png
Normal file
After Width: | Height: | Size: 257 B |
BIN
app/src/main/res/drawable-xhdpi/round_queue_music_black_24.png
Normal file
After Width: | Height: | Size: 283 B |
BIN
app/src/main/res/drawable-xhdpi/round_queue_music_black_48.png
Normal file
After Width: | Height: | Size: 507 B |
BIN
app/src/main/res/drawable-xxhdpi/round_music_note.png
Normal file
After Width: | Height: | Size: 774 B |
BIN
app/src/main/res/drawable-xxhdpi/round_music_note_black_18.png
Normal file
After Width: | Height: | Size: 338 B |
BIN
app/src/main/res/drawable-xxhdpi/round_music_note_black_24.png
Normal file
After Width: | Height: | Size: 405 B |
BIN
app/src/main/res/drawable-xxhdpi/round_music_note_black_36.png
Normal file
After Width: | Height: | Size: 588 B |
BIN
app/src/main/res/drawable-xxhdpi/round_queue_music.png
Normal file
After Width: | Height: | Size: 618 B |
BIN
app/src/main/res/drawable-xxhdpi/round_queue_music_black_18.png
Normal file
After Width: | Height: | Size: 360 B |
BIN
app/src/main/res/drawable-xxhdpi/round_queue_music_black_24.png
Normal file
After Width: | Height: | Size: 412 B |
BIN
app/src/main/res/drawable-xxhdpi/round_queue_music_black_48.png
Normal file
After Width: | Height: | Size: 789 B |
BIN
app/src/main/res/drawable-xxxhdpi/round_music_note.png
Normal file
After Width: | Height: | Size: 943 B |
BIN
app/src/main/res/drawable-xxxhdpi/round_music_note_black_18.png
Normal file
After Width: | Height: | Size: 405 B |
BIN
app/src/main/res/drawable-xxxhdpi/round_music_note_black_24.png
Normal file
After Width: | Height: | Size: 525 B |
BIN
app/src/main/res/drawable-xxxhdpi/round_music_note_black_36.png
Normal file
After Width: | Height: | Size: 774 B |
BIN
app/src/main/res/drawable-xxxhdpi/round_queue_music.png
Normal file
After Width: | Height: | Size: 789 B |
BIN
app/src/main/res/drawable-xxxhdpi/round_queue_music_black_18.png
Normal file
After Width: | Height: | Size: 412 B |
BIN
app/src/main/res/drawable-xxxhdpi/round_queue_music_black_24.png
Normal file
After Width: | Height: | Size: 507 B |
BIN
app/src/main/res/drawable-xxxhdpi/round_queue_music_black_48.png
Normal file
After Width: | Height: | Size: 982 B |
10
app/src/main/res/drawable/round_music_note_24.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<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="M12,5v8.55c-0.94,-0.54 -2.1,-0.75 -3.33,-0.32 -1.34,0.48 -2.37,1.67 -2.61,3.07 -0.46,2.74 1.86,5.08 4.59,4.65 1.96,-0.31 3.35,-2.11 3.35,-4.1V7h2c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2h-2c-1.1,0 -2,0.9 -2,2z"/>
|
||||
</vector>
|
10
app/src/main/res/drawable/round_queue_music_24.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<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="M14,6L4,6c-0.55,0 -1,0.45 -1,1s0.45,1 1,1h10c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1zM14,10L4,10c-0.55,0 -1,0.45 -1,1s0.45,1 1,1h10c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1zM4,16h6c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1L4,14c-0.55,0 -1,0.45 -1,1s0.45,1 1,1zM19,6c-1.1,0 -2,0.9 -2,2v6.18c-0.31,-0.11 -0.65,-0.18 -1,-0.18 -1.84,0 -3.28,1.64 -2.95,3.54 0.21,1.21 1.2,2.2 2.41,2.41 1.9,0.33 3.54,-1.11 3.54,-2.95L19,8h2c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1h-2z"/>
|
||||
</vector>
|
125
app/src/main/res/layout/fragment_music_settings.xml
Normal file
@ -0,0 +1,125 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<data>
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel" />
|
||||
<variable
|
||||
name="isMusicVisible"
|
||||
type="Boolean" />
|
||||
</data>
|
||||
<ScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/scrollView"
|
||||
android:scrollbarThumbVertical="@color/colorPrimary"
|
||||
android:background="@color/colorPrimaryDark">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@+id/action_show_music"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/round_music_note"
|
||||
android:tint="@color/colorPrimaryText"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/AnotherWidget.Settings.Title"
|
||||
android:text="@string/settings_show_music_title"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/show_music_label"
|
||||
android:text="@string/settings_show_music_enabled_subtitle"
|
||||
style="@style/AnotherWidget.Settings.Subtitle"/>
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:letterSpacing="0"
|
||||
android:textAllCaps="false"
|
||||
android:clickable="true"
|
||||
android:layout_marginStart="-8dp"
|
||||
android:layout_marginBottom="-8dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:paddingTop="0dp"
|
||||
android:focusable="true"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/notification_permission_alert"
|
||||
android:textColor="@color/errorColorText"
|
||||
android:text="@string/action_grant_permission"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/weather_settings"
|
||||
android:alpha="@{isMusicVisible ? 1f : 0.2f, default=1}"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@+id/action_music_info_format"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/round_queue_music"
|
||||
android:tint="@color/colorPrimaryText"/>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/AnotherWidget.Settings.Title"
|
||||
android:text="@string/settings_song_info_format_title"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/label_music_info_format"
|
||||
style="@style/AnotherWidget.Settings.Subtitle"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</layout>
|
@ -102,6 +102,36 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/action_next"
|
||||
android:src="@drawable/round_chevron_right" />
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/special_weather">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:id="@+id/divider3"
|
||||
android:text="@string/divider"
|
||||
android:includeFontPadding="false"
|
||||
style="@style/AnotherWidget.Subtitle"/>
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:id="@+id/special_weather_icon"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/AnotherWidget.Date.Big"
|
||||
android:maxLines="1"
|
||||
android:includeFontPadding="false"
|
||||
android:id="@+id/special_temp"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -129,6 +129,10 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:id="@+id/action_next_rect" />
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/special_weather_rect" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -208,4 +208,10 @@
|
||||
<string name="next_alarm_warning">The next alarm clock seems to be wrong.\nIt has been set by %s.</string>
|
||||
<string name="settings_title">Settings</string>
|
||||
<string name="settings_clock_text_color_title">Clock text color</string>
|
||||
<string name="settings_music_title">Music</string>
|
||||
<string name="settings_show_music_title">Show current playing song</string>
|
||||
<string name="settings_show_music_enabled_subtitle">Playing song info visible</string>
|
||||
<string name="settings_show_music_disabled_subtitle">Playing song info hidden</string>
|
||||
<string name="settings_song_info_format_title">Song info format</string>
|
||||
<string name="settings_request_notification_access">We need the notification access permission to check the current playing song.</string>
|
||||
</resources>
|
@ -188,4 +188,10 @@
|
||||
<string name="next_alarm_warning">The next alarm clock seems to be wrong.\nIt has been set by %s.</string>
|
||||
<string name="settings_title">Settings</string>
|
||||
<string name="settings_clock_text_color_title">Clock text color</string>
|
||||
<string name="settings_music_title">Music</string>
|
||||
<string name="settings_show_music_title">Show current playing song</string>
|
||||
<string name="settings_show_music_enabled_subtitle">Playing song info visible</string>
|
||||
<string name="settings_show_music_disabled_subtitle">Playing song info hidden</string>
|
||||
<string name="settings_song_info_format_title">Song info format</string>
|
||||
<string name="settings_request_notification_access">We need the notification access permission to check the current playing song.</string>
|
||||
</resources>
|
@ -187,4 +187,10 @@
|
||||
<string name="next_alarm_warning">La sveglia sembra impostata male.\nÈ stata impostata dall\'app %s.</string>
|
||||
<string name="settings_title">Impostazioni</string>
|
||||
<string name="settings_clock_text_color_title">Colore orologio</string>
|
||||
<string name="settings_music_title">Musica</string>
|
||||
<string name="settings_show_music_title">Mostra brano in riproduzione</string>
|
||||
<string name="settings_show_music_enabled_subtitle">Visibile</string>
|
||||
<string name="settings_show_music_disabled_subtitle">Non visibile</string>
|
||||
<string name="settings_song_info_format_title">Formato informazioni brano</string>
|
||||
<string name="settings_request_notification_access">Concedi all\'app il permesso di monitorare le notifiche, è necessario per poter mostrare il brano in riproduzione.</string>
|
||||
</resources>
|
@ -199,4 +199,10 @@
|
||||
<string name="next_alarm_warning">The next alarm clock seems to be wrong.\nIt has been set by %s.</string>
|
||||
<string name="settings_title">Settings</string>
|
||||
<string name="settings_clock_text_color_title">Clock text color</string>
|
||||
<string name="settings_music_title">Music</string>
|
||||
<string name="settings_show_music_title">Show current playing song</string>
|
||||
<string name="settings_show_music_enabled_subtitle">Playing song info visible</string>
|
||||
<string name="settings_show_music_disabled_subtitle">Playing song info hidden</string>
|
||||
<string name="settings_song_info_format_title">Song info format</string>
|
||||
<string name="settings_request_notification_access">We need the notification access permission to check the current playing song.</string>
|
||||
</resources>
|
||||
|