Added logic to switch between now playing screens.

This commit is contained in:
Karim Abou Zeid 2016-04-17 00:30:18 +02:00
commit ea3f95d401
15 changed files with 333 additions and 18 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v4.view.ViewPager
android:id="@+id/now_playing_screen_view_pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:clipToPadding="false"
android:paddingLeft="72dp"
android:paddingRight="72dp" />
<com.heinrichreimersoftware.materialintro.view.InkPageIndicator
android:id="@+id/page_indicator"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
app:currentPageIndicatorColor="?android:textColorPrimary"
app:dotDiameter="8dp"
app:dotGap="8dp"
app:pageIndicatorColor="?android:textColorHint" />
</LinearLayout>

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:ignore="ContentDescription">
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="16dp"
android:textColor="?android:textColorSecondary"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
tools:text="Card layout" />
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
tools:src="@drawable/tutorial_queue_swipe_up" />
</LinearLayout>

View file

@ -19,9 +19,8 @@
android:layout_height="match_parent"
android:background="?android:colorBackground">
<fragment android:id="@+id/player_fragment"
class="com.kabouzeid.gramophone.ui.fragments.player.flat.FlatPlayerFragment"
xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout
android:id="@+id/player_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />

View file

@ -14,6 +14,9 @@
<string name="twitter" translatable="false">Twitter</string>
<string name="git_hub" translatable="false">GitHub</string>
<string name="card">Card</string>
<string name="flat">Flat</string>
<string-array name="donation_ids" translatable="false">
<item>donation_1</item>
<item>donation_2</item>

View file

@ -229,7 +229,7 @@
<string name="website">Website</string>
<string name="loading_products">Loading products…</string>
<string name="up_next">Up next</string>
<string name="pref_title_now_playing_layout">Now playing layout</string>
<string name="pref_title_now_playing_screen_appearance">Appearance</string>
<string name="intro_label">Introduction</string>
<string name="press_back_again_to_exit_intro">Press back again to skip the intro.</string>
<string name="welcome_to_phonograph">"Welcome to Phonograph, a beautiful and lightweight music player for Android. "</string>

View file

@ -3,13 +3,9 @@
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/pref_header_now_playing_screen">
<com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEListPreference
android:enabled="false"
android:key="now_playing_layout"
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:summary="Coming soon"
android:title="@string/pref_title_now_playing_layout" />
<com.kabouzeid.gramophone.preferences.NowPlayingScreenPreference
android:key="now_playing_screen_id"
android:title="@string/pref_title_now_playing_screen_appearance" />
</com.kabouzeid.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>