Add shadow
This commit is contained in:
1 parent
b63ea27415
commit
d1dc607bed
10 files changed
+191
-33
No files matched your search
@@ -13,10 +13,14 @@
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
<resources>
|
||||
|
||||
<!-- Search category padding start / end -->
|
||||
<dimen name="search_category_padding_start">4dp</dimen>
|
||||
<dimen name="search_category_padding_end">4dp</dimen>
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
</resources>
|
||||
<gradient
|
||||
android:startColor="@android:color/transparent"
|
||||
android:endColor="@color/shadow_light"
|
||||
android:angle="90"/>
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2015 Hippo Seven
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.hippo.widget.Appbar
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/appbar_height"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:elevation="@dimen/default_elevation"/>
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:elevation="@dimen/default_elevation"/>
|
||||
|
||||
</FrameLayout>
|
||||
@@ -20,11 +20,24 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.hippo.widget.Appbar
|
||||
android:id="@+id/appbar"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/appbar_height"
|
||||
android:background="?attr/colorPrimary"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.hippo.widget.Appbar
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/appbar_height"
|
||||
android:background="?attr/colorPrimary"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/appbar_shadow_height"
|
||||
android:background="@drawable/drop_shadow"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/viewPager"
|
||||
|
||||
@@ -15,9 +15,11 @@
|
||||
-->
|
||||
<android.support.v7.widget.CardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:auto="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/search_category_interval">
|
||||
android:layout_marginBottom="@dimen/search_category_interval"
|
||||
auto:cardElevation="@dimen/default_elevation">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2015 Hippo Seven
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.hippo.widget.Appbar
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/appbar_size"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:elevation="@dimen/default_elevation"/>
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright (C) 2015 Hippo Seven
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/search_category_interval"
|
||||
android:paddingLeft="@dimen/search_category_padding_start"
|
||||
android:paddingRight="@dimen/search_category_padding_end"
|
||||
android:paddingBottom="@dimen/search_category_padding_bottom"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/search_category_background_color"
|
||||
android:elevation="@dimen/default_elevation">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/category_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/search_category_title_height"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:gravity="center_vertical"
|
||||
android:textAppearance="@style/TextAppearance.CategoryTitle"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/category_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -25,9 +25,20 @@
|
||||
android:layout_height="@dimen/appbar_size"
|
||||
android:background="?attr/colorPrimary"/>
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/viewPager"
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/appbar_shadow_height"
|
||||
android:background="@drawable/drop_shadow"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -17,25 +17,37 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/search_category_interval"
|
||||
android:paddingLeft="@dimen/search_category_padding_start"
|
||||
android:paddingRight="@dimen/search_category_padding_end"
|
||||
android:paddingBottom="@dimen/search_category_padding_bottom"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/search_category_background_color">
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/category_title"
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/search_category_title_height"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:gravity="center_vertical"
|
||||
android:textAppearance="@style/TextAppearance.CategoryTitle"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/search_category_padding_start"
|
||||
android:paddingRight="@dimen/search_category_padding_end"
|
||||
android:paddingBottom="@dimen/search_category_padding_bottom"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/search_category_background_color">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/category_content"
|
||||
<TextView
|
||||
android:id="@+id/category_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/search_category_title_height"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:gravity="center_vertical"
|
||||
android:textAppearance="@style/TextAppearance.CategoryTitle"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/category_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="@dimen/search_category_interval"
|
||||
android:background="@drawable/drop_shadow"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -61,4 +61,6 @@
|
||||
|
||||
<color name="search_category_background_color">@android:color/white</color>
|
||||
|
||||
<color name="shadow_light">#38000000</color>
|
||||
|
||||
</resources>
|
||||
@@ -20,9 +20,6 @@
|
||||
<dimen name="search_category_padding_end">16dp</dimen>
|
||||
<dimen name="search_category_padding_bottom">8dp</dimen>
|
||||
|
||||
<!-- Search category panel elevation -->
|
||||
<dimen name="search_category_elevation">4dp</dimen>
|
||||
|
||||
<!-- Search category title layout height -->
|
||||
<dimen name="search_category_title_height">48dp</dimen>
|
||||
|
||||
@@ -30,7 +27,7 @@
|
||||
<dimen name="search_item_interval">8dp</dimen>
|
||||
|
||||
<!-- Search category interval -->
|
||||
<dimen name="search_category_interval">16dp</dimen>
|
||||
<dimen name="search_category_interval">8dp</dimen>
|
||||
|
||||
<dimen name="search_action_button_width">0dp</dimen>
|
||||
|
||||
@@ -43,6 +40,7 @@
|
||||
<!-- AppBar -->
|
||||
<dimen name="appbar_size">56dp</dimen>
|
||||
<dimen name="appbar_height">@dimen/appbar_size</dimen>
|
||||
<dimen name="appbar_shadow_height">8dp</dimen>
|
||||
<dimen name="appbar_fab_margin_top">28dp</dimen>
|
||||
|
||||
<!-- CategoryTable -->
|
||||
@@ -52,4 +50,6 @@
|
||||
<!-- AdvanceSearchTable -->
|
||||
<dimen name="advance_search_table_item_margin_half">4dp</dimen>
|
||||
|
||||
<dimen name="default_elevation">4dp</dimen>
|
||||
|
||||
</resources>
|
||||
Reference in new issue
Block a user