aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-12-13 17:24:36 -0600
committerIván Ávalos <avalos@disroot.org>2022-12-13 17:24:36 -0600
commit4caf2dca669717a8e5d60abd60ae1f76a83b1850 (patch)
treee7fac9dc6ecb787913b2d35f4de86ec23ae9c7c2
parent09514a573919b7e25e96d632161a0db8fc581909 (diff)
downloaddsub-4caf2dca669717a8e5d60abd60ae1f76a83b1850.tar.gz
dsub-4caf2dca669717a8e5d60abd60ae1f76a83b1850.tar.bz2
dsub-4caf2dca669717a8e5d60abd60ae1f76a83b1850.zip
Improved Now Playing UI
-rw-r--r--app/build.gradle2
-rw-r--r--app/src/main/res/layout-port/download.xml99
-rw-r--r--app/src/main/res/layout/download_media_buttons.xml3
-rw-r--r--app/src/main/res/layout/download_slider.xml40
-rw-r--r--build.gradle2
-rw-r--r--gradle/wrapper/gradle-wrapper.properties2
6 files changed, 80 insertions, 68 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 7c924173..e380fdef 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -4,7 +4,7 @@ android {
compileSdkVersion 30
defaultConfig {
- applicationId "github.daneren2005.dsub"
+ applicationId "me.avalos.dsub"
minSdkVersion 15
targetSdkVersion 29
versionCode 208
diff --git a/app/src/main/res/layout-port/download.xml b/app/src/main/res/layout-port/download.xml
index 39b5e5e9..143240d9 100644
--- a/app/src/main/res/layout-port/download.xml
+++ b/app/src/main/res/layout-port/download.xml
@@ -28,53 +28,62 @@
android:layout_height="0dp"
android:layout_weight="1">
- <FrameLayout android:orientation="vertical"
+ <github.daneren2005.dsub.view.CardView
android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_margin="14dp">
- <github.daneren2005.dsub.view.RecyclingImageView
- android:id="@+id/download_album_art_image"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:scaleType="fitCenter"
- android:layout_gravity="center_horizontal|top"/>
-
- <LinearLayout
- android:id="@+id/download_overlay_buttons"
+ <FrameLayout android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal|bottom"
- android:background="@color/overlayColor"
- android:visibility="invisible"
- android:gravity="center"
- android:orientation="horizontal">
-
- <ImageButton
- android:id="@+id/download_rating_bad"
- style="@style/DownloadActionImageButton"
- android:src="@drawable/ic_action_rating_bad_dark"/>
-
- <ImageButton
- android:id="@+id/download_star"
- style="@style/DownloadActionImageButton"
- android:src="@drawable/ic_toggle_star_outline_dark"/>
-
- <ImageButton
- android:id="@+id/download_playback_speed"
- style="@style/DownloadActionImageButton"
- android:src="@drawable/ic_action_playback_speed_dark"/>
-
- <ImageButton
- android:id="@+id/download_bookmark"
- style="@style/DownloadActionImageButton"
- android:src="@drawable/ic_menu_bookmark_dark"/>
-
- <ImageButton
- android:id="@+id/download_rating_good"
- style="@style/DownloadActionImageButton"
- android:src="@drawable/ic_action_rating_good_dark"/>
- </LinearLayout>
- </FrameLayout>
+ android:layout_gravity="center_vertical">
+
+ <github.daneren2005.dsub.view.RecyclingImageView
+ android:id="@+id/download_album_art_image"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:scaleType="fitCenter"
+ android:adjustViewBounds="true"
+ android:layout_gravity="center"/>
+
+ <LinearLayout
+ android:id="@+id/download_overlay_buttons"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal|bottom"
+ android:background="@color/overlayColor"
+ android:visibility="invisible"
+ android:gravity="center"
+ android:orientation="horizontal">
+
+ <ImageButton
+ android:id="@+id/download_rating_bad"
+ style="@style/DownloadActionImageButton"
+ android:src="@drawable/ic_action_rating_bad_dark"/>
+
+ <ImageButton
+ android:id="@+id/download_star"
+ style="@style/DownloadActionImageButton"
+ android:src="@drawable/ic_toggle_star_outline_dark"/>
+
+ <ImageButton
+ android:id="@+id/download_playback_speed"
+ style="@style/DownloadActionImageButton"
+ android:src="@drawable/ic_action_playback_speed_dark"/>
+
+ <ImageButton
+ android:id="@+id/download_bookmark"
+ style="@style/DownloadActionImageButton"
+ android:src="@drawable/ic_menu_bookmark_dark"/>
+
+ <ImageButton
+ android:id="@+id/download_rating_good"
+ style="@style/DownloadActionImageButton"
+ android:src="@drawable/ic_action_rating_good_dark"/>
+ </LinearLayout>
+ </FrameLayout>
+ </github.daneren2005.dsub.view.CardView>
</FrameLayout>
<TextView
@@ -107,8 +116,8 @@
</ViewFlipper>
- <include layout="@layout/download_media_buttons"/>
-
<include layout="@layout/download_slider"/>
+
+ <include layout="@layout/download_media_buttons"/>
</LinearLayout>
</FrameLayout>
diff --git a/app/src/main/res/layout/download_media_buttons.xml b/app/src/main/res/layout/download_media_buttons.xml
index 0610c5f9..b60357a0 100644
--- a/app/src/main/res/layout/download_media_buttons.xml
+++ b/app/src/main/res/layout/download_media_buttons.xml
@@ -3,7 +3,8 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:paddingVertical="15dp">
<ImageButton
style="@style/PlaybackControl"
diff --git a/app/src/main/res/layout/download_slider.xml b/app/src/main/res/layout/download_slider.xml
index bfd4c120..d50262c1 100644
--- a/app/src/main/res/layout/download_slider.xml
+++ b/app/src/main/res/layout/download_slider.xml
@@ -5,37 +5,39 @@
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:background="@android:color/transparent"
- android:paddingBottom="10dip">
-
+ android:layout_marginTop="15dip"
+ android:layout_marginHorizontal="14dp">
+
<TextView
- android:id="@+id/download_position"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"
- android:paddingLeft="8dip"
- android:text="0:00"
- android:textSize="12sp"
- android:textColor="?android:textColorPrimary"
- android:paddingBottom="4dip"/>
+ android:id="@+id/download_position"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
+ android:layout_alignParentStart="true"
+ android:layout_alignParentLeft="true"
+ android:text="0:00"
+ android:textColor="?android:textColorPrimary"
+ android:textSize="12sp" />
<SeekBar
android:id="@+id/download_progress_bar"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
android:indeterminate="false"
- android:paddingLeft="55dip"
- android:paddingRight="55dip"
- android:paddingTop="3dip"
- android:paddingBottom="7dip" />
+ android:layout_toEndOf="@id/download_position"
+ android:layout_toRightOf="@id/download_position"
+ android:layout_toStartOf="@id/download_duration"
+ android:layout_toLeftOf="@id/download_duration"
+ />
<TextView
android:id="@+id/download_duration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
android:layout_centerVertical="true"
- android:paddingRight="8dip"
+ android:layout_alignParentEnd="true"
+ android:layout_alignParentRight="true"
android:text="-:--"
android:textSize="12sp"
android:textColor="?android:textColorPrimary"
diff --git a/build.gradle b/build.gradle
index 3fc890c1..b9f891af 100644
--- a/build.gradle
+++ b/build.gradle
@@ -10,7 +10,7 @@ buildscript {
google()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.2.1'
+ classpath 'com.android.tools.build:gradle:3.6.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index d2c45a4b..5028f28f 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists