From 0021e4e8a6a20f3b7da854a81f4f5294982af753 Mon Sep 17 00:00:00 2001 From: h4h13 Date: Tue, 7 Jan 2020 18:44:33 +0530 Subject: [PATCH] Create landscape --- .../retromusic/views/BreadCrumbLayout.java | 12 +- .../layout-land/fragment_circle_player.xml | 225 ++++++++++++++++++ app/src/main/res/layout/activity_search.xml | 197 +++++++-------- app/src/main/res/layout/bread_crumb.xml | 4 +- .../res/layout/fragment_circle_player.xml | 2 +- .../fragment_player_playback_controls.xml | 3 +- app/src/main/res/layout/item_option_menu.xml | 2 - app/src/main/res/transition/grid_exit.xml | 13 - 8 files changed, 338 insertions(+), 120 deletions(-) create mode 100644 app/src/main/res/layout-land/fragment_circle_player.xml delete mode 100644 app/src/main/res/transition/grid_exit.xml diff --git a/app/src/main/java/code/name/monkey/retromusic/views/BreadCrumbLayout.java b/app/src/main/java/code/name/monkey/retromusic/views/BreadCrumbLayout.java index c942a1be..366dabb2 100644 --- a/app/src/main/java/code/name/monkey/retromusic/views/BreadCrumbLayout.java +++ b/app/src/main/java/code/name/monkey/retromusic/views/BreadCrumbLayout.java @@ -16,11 +16,8 @@ package code.name.monkey.retromusic.views; import android.content.Context; import android.graphics.PorterDuff; -import android.os.Build; import android.os.Parcel; import android.os.Parcelable; -import androidx.annotation.ColorInt; -import androidx.annotation.NonNull; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; @@ -29,17 +26,16 @@ import android.widget.HorizontalScrollView; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; - +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; import code.name.monkey.appthemehelper.ThemeStore; - +import code.name.monkey.retromusic.R; import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; -import code.name.monkey.retromusic.R; - /** * @author Aidan Follestad (afollestad), modified for Phonograph by Karim Abou Zeid (kabouzeid) */ @@ -194,7 +190,7 @@ public class BreadCrumbLayout extends HorizontalScrollView implements View.OnCli view.setOnClickListener(this); ImageView iv = (ImageView) view.getChildAt(1); - if (Build.VERSION.SDK_INT >= 19 && iv.getDrawable() != null) { + if (iv.getDrawable() != null) { iv.getDrawable().setAutoMirrored(true); } iv.setVisibility(View.GONE); diff --git a/app/src/main/res/layout-land/fragment_circle_player.xml b/app/src/main/res/layout-land/fragment_circle_player.xml new file mode 100644 index 00000000..466cd3a9 --- /dev/null +++ b/app/src/main/res/layout-land/fragment_circle_player.xml @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_search.xml b/app/src/main/res/layout/activity_search.xml index 22cd7b2c..090b4d69 100755 --- a/app/src/main/res/layout/activity_search.xml +++ b/app/src/main/res/layout/activity_search.xml @@ -1,121 +1,132 @@ - - + android:layout_height="0dp" + android:background="?attr/colorSurface" + tools:ignore="UnusedAttribute" /> - + + + android:background="@android:color/transparent" + android:elevation="0dp" + app:elevation="0dp" + app:liftOnScroll="true"> - + android:layout_marginStart="@dimen/toolbar_margin_horizontal" + android:layout_marginTop="@dimen/toolbar_margin_vertical" + android:layout_marginEnd="@dimen/toolbar_margin_horizontal" + android:layout_marginBottom="@dimen/toolbar_margin_vertical" + app:cardBackgroundColor="?colorSurface" + app:cardCornerRadius="8dp" + app:cardUseCompatPadding="true" + app:layout_scrollFlags="scroll|enterAlways"> - - - - - - - - - + android:gravity="center_vertical"> + app:srcCompat="@drawable/ic_keyboard_backspace_black_24dp" + app:tint="?colorOnSurface" /> - + + + + + - - - - + android:layout_weight="0"> - + + android:background="?roundSelector" + android:padding="12dp" + app:srcCompat="@drawable/ic_mic_white_24dp" + app:tint="?colorOnSurface" + tools:visibility="visible" /> - - + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/bread_crumb.xml b/app/src/main/res/layout/bread_crumb.xml index 86d12987..30aa25a3 100644 --- a/app/src/main/res/layout/bread_crumb.xml +++ b/app/src/main/res/layout/bread_crumb.xml @@ -4,7 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:foreground="?rectSelector" + android:background="?rectSelector" android:gravity="center_vertical|start" android:minHeight="@dimen/tab_height" android:orientation="horizontal" @@ -27,7 +27,7 @@ android:scaleType="fitXY" android:visibility="gone" app:srcCompat="@drawable/ic_keyboard_arrow_right_white_24dp" - tools:tint="#000" + tools:tint="?android:attr/colorControlNormal" tools:visibility="visible" /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_circle_player.xml b/app/src/main/res/layout/fragment_circle_player.xml index 6cec175c..37cff51b 100644 --- a/app/src/main/res/layout/fragment_circle_player.xml +++ b/app/src/main/res/layout/fragment_circle_player.xml @@ -97,7 +97,7 @@ app:roundEdges="true" app:startAngle="30" app:sweepAngle="300" - app:touchInside="true" + app:touchInside="false" tools:progress="50" /> diff --git a/app/src/main/res/layout/item_option_menu.xml b/app/src/main/res/layout/item_option_menu.xml index 9c534511..4c5c175b 100644 --- a/app/src/main/res/layout/item_option_menu.xml +++ b/app/src/main/res/layout/item_option_menu.xml @@ -21,9 +21,7 @@ android:gravity="center_vertical" android:orientation="horizontal" android:paddingStart="8dp" - android:paddingTop="4dp" android:paddingEnd="8dp" - android:paddingBottom="4dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent"> diff --git a/app/src/main/res/transition/grid_exit.xml b/app/src/main/res/transition/grid_exit.xml deleted file mode 100644 index 06a436b7..00000000 --- a/app/src/main/res/transition/grid_exit.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file