Makes full use of the Android Support Design Library. A lot of small things fixed or improved. Added dozens of new colors.
This commit is contained in:
parent
b233b3b718
commit
31926d7983
45 changed files with 447 additions and 599 deletions
|
|
@ -4,6 +4,7 @@
|
|||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:background="?android:colorBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/header_image_height">
|
||||
|
||||
|
|
@ -73,11 +74,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:id="@+id/status_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/status_bar_padding"
|
||||
android:background="@android:color/transparent" />
|
||||
<include layout="@layout/status_bar" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
|
||||
<FrameLayout
|
||||
android:background="?android:colorBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/header_image_height">
|
||||
|
||||
|
|
@ -74,11 +75,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:id="@+id/status_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/status_bar_padding"
|
||||
android:background="@android:color/transparent" />
|
||||
<include layout="@layout/status_bar" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
|
|
@ -1,38 +1,33 @@
|
|||
<android.support.v4.widget.DrawerLayout
|
||||
android:fitsSystemWindows="true"
|
||||
android:id="@+id/drawer_layout"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".DrawerActivity">
|
||||
|
||||
<FrameLayout
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<LinearLayout
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/toolbar_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:elevation="@dimen/toolbar_elevation"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="UnusedAttribute">
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
|
||||
<FrameLayout
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
android:elevation="0dp">
|
||||
android:elevation="0dp"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
|
|
@ -43,42 +38,35 @@
|
|||
|
||||
</FrameLayout>
|
||||
|
||||
<com.astuetz.PagerSlidingTabStrip
|
||||
<android.support.design.widget.TabLayout
|
||||
android:id="@+id/tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/tab_height"
|
||||
android:background="?colorPrimary"
|
||||
android:elevation="0dp"
|
||||
android:paddingLeft="64dp"
|
||||
android:paddingStart="64dp"
|
||||
android:textColor="@color/sliding_tabs_deactivated"
|
||||
android:textColorPrimary="@color/sliding_tabs_activated"
|
||||
android:transitionName="sliding_tabs"
|
||||
app:pstsIndicatorHeight="3dp"
|
||||
app:pstsTabBackground="?selectableItemBackground"
|
||||
app:pstsTabPaddingLeftRight="8dp"
|
||||
tools:ignore="NewApi,RtlSymmetry,UnusedAttribute" />
|
||||
app:tabContentStart="72dp"
|
||||
app:tabIndicatorColor="#00000000"
|
||||
app:tabMode="scrollable" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:background="@drawable/shadow_down" />
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:layout_margin="16dp"
|
||||
android:id="@+id/fab"
|
||||
style="@style/PlayPauseFab"
|
||||
android:layout_gravity="end|bottom" />
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="16dp" />
|
||||
|
||||
</FrameLayout>
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
<android.support.design.widget.NavigationView
|
||||
android:id="@+id/nav_view"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:fitsSystemWindows="true"
|
||||
app:menu="@menu/menu_drawer" />
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
<!-- BOTTOM-->
|
||||
|
||||
<LinearLayout
|
||||
android:background="?android:colorBackground"
|
||||
android:id="@+id/footer_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -200,16 +201,18 @@
|
|||
|
||||
<!-- TOOLBAR-->
|
||||
|
||||
<FrameLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/toolbar_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/status_bar_padding">
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/status_bar" />
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
android:background="#00000000" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/status_bar_padding">
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -49,6 +48,7 @@
|
|||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
style="@style/PlayPauseFab"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
|
@ -2,8 +2,7 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/status_bar_padding">
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:columnWidth="56dp"
|
||||
android:numColumns="auto_fit"
|
||||
android:numColumns="7"
|
||||
android:verticalSpacing="4dp"
|
||||
android:horizontalSpacing="4dp"
|
||||
android:padding="16dp"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.kabouzeid.gramophone.views.CircleView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp" />
|
||||
<com.kabouzeid.gramophone.views.ColorView
|
||||
android:id="@+id/color_view"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="1dp">
|
||||
android:layout_margin="2dp">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/content"
|
||||
|
|
|
|||
|
|
@ -1,53 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="?inset_divider"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?rect_selector"
|
||||
android:minHeight="48dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:fontFamily="@string/font_fontFamily_medium"
|
||||
android:textStyle="@integer/font_textStyle_medium"
|
||||
android:textSize="14sp"
|
||||
android:gravity="center_vertical"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
android:gravity="center_vertical"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<com.kabouzeid.gramophone.views.CircleView
|
||||
<com.kabouzeid.gramophone.views.ColorView
|
||||
android:id="@+id/circle"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
|
|
|
|||
7
app/src/main/res/layout/status_bar.xml
Normal file
7
app/src/main/res/layout/status_bar.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<View
|
||||
android:id="@+id/status_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/status_bar_padding"
|
||||
android:background="@android:color/transparent"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android" />
|
||||
Loading…
Add table
Add a link
Reference in a new issue