[Android] Add Design support library

This commit is contained in:
zilmar 2016-07-07 17:37:40 +10:00
parent b2472a1a28
commit 73e5a15f03
42 changed files with 1632 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 The Android Open Source Project
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
distributed under the License is distributed on an "AS IS" BASIS,
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.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="android.support.design">
<uses-sdk android:minSdkVersion="7"/>
<application />
</manifest>

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 The Android Open Source Project
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
distributed under the License is distributed on an "AS IS" BASIS,
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.
-->
<!-- Definitions of attributes to be exposed as public -->
<resources>
<public type="attr" name="backgroundTint"/>
<public type="attr" name="backgroundTintMode"/>
<public type="attr" name="behavior_hideable"/>
<public type="attr" name="behavior_overlapTop"/>
<public type="attr" name="behavior_peekHeight"/>
<public type="attr" name="borderWidth"/>
<public type="attr" name="bottomSheetDialogTheme"/>
<public type="attr" name="bottomSheetStyle"/>
<public type="attr" name="collapsedTitleGravity"/>
<public type="attr" name="collapsedTitleTextAppearance"/>
<public type="attr" name="contentScrim"/>
<public type="attr" name="counterEnabled"/>
<public type="attr" name="counterMaxLength"/>
<public type="attr" name="counterOverflowTextAppearance"/>
<public type="attr" name="counterTextAppearance"/>
<public type="attr" name="elevation"/>
<public type="attr" name="errorEnabled"/>
<public type="attr" name="errorTextAppearance"/>
<public type="attr" name="expanded"/>
<public type="attr" name="expandedTitleGravity"/>
<public type="attr" name="expandedTitleMargin"/>
<public type="attr" name="expandedTitleMarginBottom"/>
<public type="attr" name="expandedTitleMarginEnd"/>
<public type="attr" name="expandedTitleMarginStart"/>
<public type="attr" name="expandedTitleMarginTop"/>
<public type="attr" name="expandedTitleTextAppearance"/>
<public type="attr" name="fabSize"/>
<public type="attr" name="headerLayout"/>
<public type="attr" name="hintAnimationEnabled"/>
<public type="attr" name="hintEnabled"/>
<public type="attr" name="hintTextAppearance"/>
<public type="attr" name="itemBackground"/>
<public type="attr" name="itemIconTint"/>
<public type="attr" name="itemTextAppearance"/>
<public type="attr" name="itemTextColor"/>
<public type="attr" name="keylines"/>
<public type="attr" name="layout_anchor"/>
<public type="attr" name="layout_anchorGravity"/>
<public type="attr" name="layout_behavior"/>
<public type="attr" name="layout_collapseMode"/>
<public type="attr" name="layout_collapseParallaxMultiplier"/>
<public type="attr" name="layout_keyline"/>
<public type="attr" name="layout_scrollFlags"/>
<public type="attr" name="layout_scrollInterpolator"/>
<public type="attr" name="menu"/>
<public type="attr" name="pressedTranslationZ"/>
<public type="attr" name="rippleColor"/>
<public type="attr" name="statusBarBackground"/>
<public type="attr" name="statusBarScrim"/>
<public type="attr" name="tabBackground"/>
<public type="attr" name="tabContentStart"/>
<public type="attr" name="tabGravity"/>
<public type="attr" name="tabIndicatorColor"/>
<public type="attr" name="tabIndicatorHeight"/>
<public type="attr" name="tabMaxWidth"/>
<public type="attr" name="tabMinWidth"/>
<public type="attr" name="tabMode"/>
<public type="attr" name="tabPadding"/>
<public type="attr" name="tabPaddingBottom"/>
<public type="attr" name="tabPaddingEnd"/>
<public type="attr" name="tabPaddingStart"/>
<public type="attr" name="tabPaddingTop"/>
<public type="attr" name="tabSelectedTextColor"/>
<public type="attr" name="tabTextAppearance"/>
<public type="attr" name="tabTextColor"/>
<public type="attr" name="textColorError"/>
<public type="attr" name="title"/>
<public type="attr" name="titleEnabled"/>
<public type="attr" name="toolbarId"/>
<public type="attr" name="useCompatPadding"/>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 The Android Open Source Project
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
distributed under the License is distributed on an "AS IS" BASIS,
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.
-->
<!-- Definitions of styles to be exposed as public -->
<resources>
<public type="string" name="appbar_scrolling_view_behavior"/>
<public type="string" name="bottom_sheet_behavior"/>
</resources>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 The Android Open Source Project
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
distributed under the License is distributed on an "AS IS" BASIS,
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.
-->
<!-- Definitions of styles to be exposed as public -->
<resources>
<public type="style" name="TextAppearance.Design.CollapsingToolbar.Expanded"/>
<public type="style" name="TextAppearance.Design.Counter"/>
<public type="style" name="TextAppearance.Design.Counter.Overflow"/>
<public type="style" name="TextAppearance.Design.Error"/>
<public type="style" name="TextAppearance.Design.Hint"/>
<public type="style" name="TextAppearance.Design.Snackbar.Message"/>
<public type="style" name="TextAppearance.Design.Tab"/>
<public type="style" name="Theme.Design"/>
<public type="style" name="Theme.Design.BottomSheetDialog"/>
<public type="style" name="Theme.Design.Light"/>
<public type="style" name="Theme.Design.Light.BottomSheetDialog"/>
<public type="style" name="Theme.Design.Light.NoActionBar"/>
<public type="style" name="Theme.Design.NoActionBar"/>
<public type="style" name="Widget.Design.AppBarLayout"/>
<public type="style" name="Widget.Design.BottomSheet.Modal"/>
<public type="style" name="Widget.Design.CollapsingToolbar"/>
<public type="style" name="Widget.Design.CoordinatorLayout"/>
<public type="style" name="Widget.Design.FloatingActionButton"/>
<public type="style" name="Widget.Design.NavigationView"/>
<public type="style" name="Widget.Design.Snackbar"/>
<public type="style" name="Widget.Design.TabLayout"/>
<public type="style" name="Widget.Design.TextInputLayout"/>
</resources>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="@integer/bottom_sheet_slide_duration"
android:interpolator="@android:interpolator/fast_out_linear_in">
<translate
android:fromYDelta="20%p"
android:toYDelta="0"/>
<alpha
android:fromAlpha="0.0"
android:toAlpha="1.0"/>
</set>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="@integer/bottom_sheet_slide_duration"
android:interpolator="@android:interpolator/fast_out_slow_in">
<translate
android:fromYDelta="0"
android:toYDelta="20%p"/>
<alpha
android:fromAlpha="1.0"
android:toAlpha="0.0"/>
</set>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="@integer/bottom_sheet_slide_duration"
android:interpolator="@android:anim/accelerate_decelerate_interpolator">
<translate
android:fromYDelta="20%p"
android:toYDelta="0"/>
<alpha
android:fromAlpha="0.0"
android:toAlpha="1.0"/>
</set>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="@integer/bottom_sheet_slide_duration"
android:interpolator="@android:anim/accelerate_interpolator">
<translate
android:fromYDelta="0"
android:toYDelta="20%p"/>
<alpha
android:fromAlpha="1.0"
android:toAlpha="0.0"/>
</set>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha android:fromAlpha="0.0"
android:toAlpha="1.0"/>
<scale android:fromXScale="0.0"
android:fromYScale="0.0"
android:toXScale="1.0"
android:toYScale="1.0"
android:pivotX="50%"
android:pivotY="50%"/>
</set>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha android:fromAlpha="1.0"
android:toAlpha="0.0"/>
<scale android:fromXScale="1.0"
android:fromYScale="1.0"
android:toXScale="0.0"
android:toYScale="0.0"
android:pivotX="50%"
android:pivotY="50%"/>
</set>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromYDelta="100%"
android:toYDelta="0"/>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromYDelta="0"
android:toYDelta="100%"/>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@android:color/white" />
</shape>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="@dimen/design_snackbar_background_corner_radius"/>
<solid android:color="@color/design_snackbar_background_color"/>
</shape>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<view xmlns:android="http://schemas.android.com/apk/res/android"
class="android.support.design.widget.Snackbar$SnackbarLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
style="@style/Widget.Design.Snackbar" />

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<android.support.design.widget.CoordinatorLayout
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">
<View
android:id="@+id/touch_outside"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:soundEffectsEnabled="false"/>
<FrameLayout
android:id="@+id/design_bottom_sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|top"
android:clickable="true"
app:layout_behavior="@string/bottom_sheet_behavior"
style="?attr/bottomSheetStyle"/>
</android.support.design.widget.CoordinatorLayout>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<view xmlns:android="http://schemas.android.com/apk/res/android"
class="android.support.design.widget.Snackbar$SnackbarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
style="@style/Widget.Design.Snackbar" />

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<TextView
android:id="@+id/snackbar_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingTop="@dimen/design_snackbar_padding_vertical"
android:paddingBottom="@dimen/design_snackbar_padding_vertical"
android:paddingLeft="@dimen/design_snackbar_padding_horizontal"
android:paddingRight="@dimen/design_snackbar_padding_horizontal"
android:textAppearance="@style/TextAppearance.Design.Snackbar.Message"
android:maxLines="@integer/design_snackbar_text_max_lines"
android:layout_gravity="center_vertical|left|start"
android:ellipsize="end"
android:textAlignment="viewStart"/>
<Button
android:id="@+id/snackbar_action"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/design_snackbar_extra_spacing_horizontal"
android:layout_marginStart="@dimen/design_snackbar_extra_spacing_horizontal"
android:layout_gravity="center_vertical|right|end"
android:paddingTop="@dimen/design_snackbar_padding_vertical"
android:paddingBottom="@dimen/design_snackbar_padding_vertical"
android:paddingLeft="@dimen/design_snackbar_padding_horizontal"
android:paddingRight="@dimen/design_snackbar_padding_horizontal"
android:visibility="gone"
android:textColor="?attr/colorAccent"
style="?attr/borderlessButtonStyle"/>
</merge>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="24dp"
android:layout_height="24dp"
android:scaleType="centerInside"/>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center"
android:maxLines="2"/>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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="wrap_content"
android:layout_height="match_parent"/>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<android.support.design.internal.NavigationMenuItemView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="?attr/listPreferredItemHeightSmall"
android:paddingLeft="?attr/listPreferredItemPaddingLeft"
android:paddingRight="?attr/listPreferredItemPaddingRight"
android:foreground="?attr/selectableItemBackground"
android:focusable="true"/>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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:id="@+id/navigation_header_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="@dimen/design_navigation_separator_vertical_padding" />

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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="wrap_content">
<View android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/listDivider"/>
</FrameLayout>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="?attr/listPreferredItemHeightSmall"
android:gravity="center_vertical|start"
android:maxLines="1"
android:paddingLeft="?attr/listPreferredItemPaddingLeft"
android:paddingRight="?attr/listPreferredItemPaddingRight"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:textColor="?android:textColorSecondary"/>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<android.support.design.internal.NavigationMenuView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/design_navigation_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/design_navigation_padding_bottom"
android:clipToPadding="false"
android:scrollbars="vertical"/>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<CheckedTextView
android:id="@+id/design_menu_item_text"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:drawablePadding="@dimen/design_navigation_icon_padding"
android:gravity="center_vertical|start"
android:maxLines="1"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"/>
<ViewStub
android:id="@+id/design_menu_item_action_area_stub"
android:inflatedId="@+id/design_menu_item_action_area"
android:layout="@layout/design_menu_item_action_area"
android:layout_width="wrap_content"
android:layout_height="match_parent"/>
</merge>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<resources>
<style name="Widget.Design.TabLayout" parent="Base.Widget.Design.TabLayout">
<item name="tabGravity">center</item>
<item name="tabMode">fixed</item>
</style>
</resources>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<resources>
<integer name="design_snackbar_text_max_lines">1</integer>
</resources>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<resources>
<dimen name="design_tab_scrollable_min_width">160dp</dimen>
<dimen name="design_snackbar_min_width">320dp</dimen>
<dimen name="design_snackbar_max_width">576dp</dimen>
<dimen name="design_snackbar_padding_vertical_2lines">@dimen/design_snackbar_padding_vertical</dimen>
<dimen name="design_snackbar_extra_spacing_horizontal">24dp</dimen>
<dimen name="design_snackbar_background_corner_radius">2dp</dimen>
<dimen name="design_snackbar_action_inline_max_width">0dp</dimen>
<!-- 5 * standard increment (64dp on tablets) -->
<dimen name="design_navigation_max_width">320dp</dimen>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<resources>
<style name="Widget.Design.TabLayout" parent="Base.Widget.Design.TabLayout">
<item name="tabGravity">center</item>
<item name="tabMode">fixed</item>
</style>
</resources>

View File

@ -0,0 +1,374 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<resources>
<declare-styleable name="FloatingActionButton">
<!-- Background for the FloatingActionButton -->
<attr name="backgroundTint"/>
<attr name="backgroundTintMode"/>
<!-- Ripple color for the FAB. -->
<attr name="rippleColor" format="color"/>
<!-- Size for the FAB. -->
<attr name="fabSize">
<enum name="normal" value="0"/>
<enum name="mini" value="1"/>
</attr>
<!-- Elevation value for the FAB -->
<attr name="elevation"/>
<!-- TranslationZ value for the FAB when pressed-->
<attr name="pressedTranslationZ" format="dimension"/>
<!-- The width of the border around the FAB. -->
<attr name="borderWidth" format="dimension"/>
<!-- Enable compat padding. -->
<attr name="useCompatPadding" format="boolean"/>
</declare-styleable>
<declare-styleable name="ScrimInsetsFrameLayout">
<attr name="insetForeground" format="color|reference"/>
</declare-styleable>
<declare-styleable name="NavigationView">
<attr name="android:background"/>
<attr name="android:fitsSystemWindows"/>
<attr name="android:maxWidth"/>
<attr name="elevation"/>
<!-- The menu resource to inflate and populate items from. -->
<attr name="menu" format="reference"/>
<attr name="itemIconTint" format="color"/>
<attr name="itemTextColor" format="color"/>
<attr name="itemBackground" format="reference"/>
<attr name="itemTextAppearance" format="reference"/>
<!-- Layout resource to inflate as the header -->
<attr name="headerLayout" format="reference"/>
</declare-styleable>
<declare-styleable name="ForegroundLinearLayout">
<attr name="android:foreground" />
<attr name="android:foregroundGravity" />
<attr name="foregroundInsidePadding" format="boolean" />
</declare-styleable>
<declare-styleable name="TabLayout">
<!-- Color of the indicator used to show the currently selected tab. -->
<attr name="tabIndicatorColor" format="color"/>
<!-- Height of the indicator used to show the currently selected tab. -->
<attr name="tabIndicatorHeight" format="dimension"/>
<!-- Position in the Y axis from the starting edge that tabs should be positioned from. -->
<attr name="tabContentStart" format="dimension"/>
<!-- Reference to a background to be applied to tabs. -->
<attr name="tabBackground" format="reference"/>
<!-- The behavior mode for the Tabs in this layout -->
<attr name="tabMode">
<enum name="scrollable" value="0"/>
<enum name="fixed" value="1"/>
</attr>
<!-- Gravity constant for tabs. -->
<attr name="tabGravity">
<enum name="fill" value="0"/>
<enum name="center" value="1"/>
</attr>
<!-- The minimum width for tabs. -->
<attr name="tabMinWidth" format="dimension"/>
<!-- The maximum width for tabs. -->
<attr name="tabMaxWidth" format="dimension"/>
<!-- A reference to a TextAppearance style to be applied to tabs. -->
<attr name="tabTextAppearance" format="reference"/>
<!-- The default text color to be applied to tabs. -->
<attr name="tabTextColor" format="color"/>
<!-- The text color to be applied to the currently selected tab. -->
<attr name="tabSelectedTextColor" format="color"/>
<!-- The preferred padding along the start edge of tabs. -->
<attr name="tabPaddingStart" format="dimension"/>
<!-- The preferred padding along the top edge of tabs. -->
<attr name="tabPaddingTop" format="dimension"/>
<!-- The preferred padding along the end edge of tabs. -->
<attr name="tabPaddingEnd" format="dimension"/>
<!-- The preferred padding along the bottom edge of tabs. -->
<attr name="tabPaddingBottom" format="dimension"/>
<!-- The preferred padding along all edges of tabs. -->
<attr name="tabPadding" format="dimension"/>
</declare-styleable>
<declare-styleable name="TabItem">
<!-- Text to display in the tab. -->
<attr name="android:text" />
<!-- Icon to display in the tab. -->
<attr name="android:icon" />
<!-- A reference to a layout resource to be displayed in the tab. -->
<attr name="android:layout" />
</declare-styleable>
<declare-styleable name="CoordinatorLayout">
<!-- A reference to an array of integers representing the
locations of horizontal keylines in dp from the starting edge.
Child views can refer to these keylines for alignment using
layout_keyline="index" where index is a 0-based index into
this array. -->
<attr name="keylines" format="reference"/>
<!-- Drawable to display behind the status bar when the view is set to draw behind it. -->
<attr name="statusBarBackground" format="reference"/>
</declare-styleable>
<declare-styleable name="CoordinatorLayout_LayoutParams">
<attr name="android:layout_gravity"/>
<!-- The class name of a Behavior class defining special runtime behavior
for this child view. -->
<attr name="layout_behavior" format="string"/>
<!-- The id of an anchor view that this view should position relative to. -->
<attr name="layout_anchor" format="reference"/>
<!-- The index of a keyline this view should position relative to.
android:layout_gravity will affect how the view aligns to the
specified keyline. -->
<attr name="layout_keyline" format="integer"/>
<!-- Specifies how an object should position relative to an anchor, on both the X and Y axes,
within its parent's bounds. -->
<attr name="layout_anchorGravity">
<!-- Push object to the top of its container, not changing its size. -->
<flag name="top" value="0x30"/>
<!-- Push object to the bottom of its container, not changing its size. -->
<flag name="bottom" value="0x50"/>
<!-- Push object to the left of its container, not changing its size. -->
<flag name="left" value="0x03"/>
<!-- Push object to the right of its container, not changing its size. -->
<flag name="right" value="0x05"/>
<!-- Place object in the vertical center of its container, not changing its size. -->
<flag name="center_vertical" value="0x10"/>
<!-- Grow the vertical size of the object if needed so it completely fills its container. -->
<flag name="fill_vertical" value="0x70"/>
<!-- Place object in the horizontal center of its container, not changing its size. -->
<flag name="center_horizontal" value="0x01"/>
<!-- Grow the horizontal size of the object if needed so it completely fills its container. -->
<flag name="fill_horizontal" value="0x07"/>
<!-- Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. -->
<flag name="center" value="0x11"/>
<!-- Grow the horizontal and vertical size of the object if needed so it completely fills its container. -->
<flag name="fill" value="0x77"/>
<!-- Additional option that can be set to have the top and/or bottom edges of
the child clipped to its container's bounds.
The clip will be based on the vertical gravity: a top gravity will clip the bottom
edge, a bottom gravity will clip the top edge, and neither will clip both edges. -->
<flag name="clip_vertical" value="0x80"/>
<!-- Additional option that can be set to have the left and/or right edges of
the child clipped to its container's bounds.
The clip will be based on the horizontal gravity: a left gravity will clip the right
edge, a right gravity will clip the left edge, and neither will clip both edges. -->
<flag name="clip_horizontal" value="0x08"/>
<!-- Push object to the beginning of its container, not changing its size. -->
<flag name="start" value="0x00800003"/>
<!-- Push object to the end of its container, not changing its size. -->
<flag name="end" value="0x00800005"/>
</attr>
</declare-styleable>
<declare-styleable name="TextInputLayout">
<attr name="hintTextAppearance" format="reference"/>
<!-- The hint to display in the floating label -->
<attr name="android:hint"/>
<!-- Whether the layout's floating label functionality is enabled -->
<attr name="hintEnabled" format="boolean"/>
<!-- Whether the layout is laid out as if an error will be displayed -->
<attr name="errorEnabled" format="boolean"/>
<!-- TextAppearance of any error message displayed -->
<attr name="errorTextAppearance" format="reference"/>
<!-- Whether the layout is laid out as if the character counter will be displayed -->
<attr name="counterEnabled" format="boolean"/>
<!-- The max length to display in the character counter -->
<attr name="counterMaxLength" format="integer" />
<!-- TextAppearance of the character counter -->
<attr name="counterTextAppearance" format="reference"/>
<!-- TextAppearance of the character counter when the text is longer than the max -->
<attr name="counterOverflowTextAppearance" format="reference"/>
<attr name="android:textColorHint"/>
<!-- Whether to animate hint state changes. -->
<attr name="hintAnimationEnabled" format="boolean"/>
</declare-styleable>
<declare-styleable name="SnackbarLayout">
<attr name="android:maxWidth"/>
<attr name="elevation"/>
<attr name="maxActionInlineWidth" format="dimension"/>
</declare-styleable>
<declare-styleable name="AppBarLayout">
<attr name="elevation" />
<attr name="android:background" />
<!-- The initial expanded state for the AppBarLayout. This only takes effect when this
view is a direct child of a CoordinatorLayout. -->
<attr name="expanded" format="boolean" />
</declare-styleable>
<declare-styleable name="AppBarLayout_LayoutParams">
<attr name="layout_scrollFlags">
<!-- The view will be scroll in direct relation to scroll events. This flag needs to be
set for any of the other flags to take effect. If any sibling views
before this one do not have this flag, then this value has no effect. -->
<flag name="scroll" value="0x1"/>
<!-- When exiting (scrolling off screen) the view will be scrolled until it is
'collapsed'. The collapsed height is defined by the view's minimum height. -->
<flag name="exitUntilCollapsed" value="0x2"/>
<!-- When entering (scrolling on screen) the view will scroll on any downwards
scroll event, regardless of whether the scrolling view is also scrolling. This
is commonly referred to as the 'quick return' pattern. -->
<flag name="enterAlways" value="0x4"/>
<!-- An additional flag for 'enterAlways' which modifies the returning view to
only initially scroll back to it's collapsed height. Once the scrolling view has
reached the end of it's scroll range, the remainder of this view will be scrolled
into view. -->
<flag name="enterAlwaysCollapsed" value="0x8"/>
<!-- Upon a scroll ending, if the view is only partially visible then it will be
snapped and scrolled to it's closest edge. -->
<flag name="snap" value="0x10"/>
</attr>
<!-- An interpolator to use when scrolling this View. Only takes effect when View
is scrollable. -->
<attr name="layout_scrollInterpolator" format="reference" />
</declare-styleable>
<declare-styleable name="ScrollingViewBehavior_Params">
<!-- The amount that the scrolling view should overlap the bottom of any AppBarLayout -->
<attr name="behavior_overlapTop" format="dimension" />
</declare-styleable>
<declare-styleable name="CollapsingToolbarLayout">
<!-- Specifies extra space on the start, top, end and bottom
sides of the the expanded title text. Margin values should be positive. -->
<attr name="expandedTitleMargin" format="dimension"/>
<!-- Specifies extra space on the start side of the the expanded title text.
Margin values should be positive. -->
<attr name="expandedTitleMarginStart" format="dimension"/>
<!-- Specifies extra space on the top side of the the expanded title text.
Margin values should be positive. -->
<attr name="expandedTitleMarginTop" format="dimension"/>
<!-- Specifies extra space on the end side of the the expanded title text.
Margin values should be positive. -->
<attr name="expandedTitleMarginEnd" format="dimension"/>
<!-- Specifies extra space on the bottom side of the the expanded title text.
Margin values should be positive. -->
<attr name="expandedTitleMarginBottom" format="dimension"/>
<!-- The text appearance of the CollapsingToolbarLayout's title when it is fully
'expanded' -->
<attr name="expandedTitleTextAppearance" format="reference"/>
<!-- The text appearance of the CollapsingToolbarLayouts title when it is fully
'collapsed' -->
<attr name="collapsedTitleTextAppearance" format="reference"/>
<!-- The drawable to use as a scrim on top of the CollapsingToolbarLayouts content when
it has been scrolled sufficiently off screen. -->
<attr name="contentScrim" format="color"/>
<!-- The drawable to use as a scrim for the status bar content when the
CollapsingToolbarLayout has been scrolled sufficiently off screen. Only works on
Lollipop with the correct setup. -->
<attr name="statusBarScrim" format="color" />
<!-- The id of the primary Toolbar child that you wish to use for the purpose of collapsing.
This Toolbar descendant view does not need to be a direct child of the layout.
If you do not set this, the first direct Toolbar child found will be used. -->
<attr name="toolbarId" format="reference"/>
<!-- Specifies how the title should be positioned when collapsed. -->
<attr name="collapsedTitleGravity">
<!-- Push title to the top of its container, not changing its size. -->
<flag name="top" value="0x30"/>
<!-- Push title to the bottom of its container, not changing its size. -->
<flag name="bottom" value="0x50"/>
<!-- Push title to the left of its container, not changing its size. -->
<flag name="left" value="0x03"/>
<!-- Push title to the right of its container, not changing its size. -->
<flag name="right" value="0x05"/>
<!-- Place title in the vertical center of its container, not changing its size. -->
<flag name="center_vertical" value="0x10"/>
<!-- Grow the vertical size of the title if needed so it completely fills its container. -->
<flag name="fill_vertical" value="0x70"/>
<!-- Place title in the horizontal center of its container, not changing its size. -->
<flag name="center_horizontal" value="0x01"/>
<!-- Place the title in the center of its container in both the vertical and horizontal axis, not changing its size. -->
<flag name="center" value="0x11"/>
<!-- Push title to the beginning of its container, not changing its size. -->
<flag name="start" value="0x00800003"/>
<!-- Push title to the end of its container, not changing its size. -->
<flag name="end" value="0x00800005"/>
</attr>
<!-- Specifies how the title should be positioned when expanded. -->
<attr name="expandedTitleGravity">
<!-- Push title to the top of its container, not changing its size. -->
<flag name="top" value="0x30"/>
<!-- Push title to the bottom of its container, not changing its size. -->
<flag name="bottom" value="0x50"/>
<!-- Push title to the left of its container, not changing its size. -->
<flag name="left" value="0x03"/>
<!-- Push title to the right of its container, not changing its size. -->
<flag name="right" value="0x05"/>
<!-- Place title in the vertical center of its container, not changing its size. -->
<flag name="center_vertical" value="0x10"/>
<!-- Grow the vertical size of the title if needed so it completely fills its container. -->
<flag name="fill_vertical" value="0x70"/>
<!-- Place title in the horizontal center of its container, not changing its size. -->
<flag name="center_horizontal" value="0x01"/>
<!-- Place the title in the center of its container in both the vertical and horizontal axis, not changing its size. -->
<flag name="center" value="0x11"/>
<!-- Push title to the beginning of its container, not changing its size. -->
<flag name="start" value="0x00800003"/>
<!-- Push title to the end of its container, not changing its size. -->
<flag name="end" value="0x00800005"/>
</attr>
<!-- Whether the CollapsingToolbarLayout should draw its own shrinking/growing title. -->
<attr name="titleEnabled" format="boolean"/>
<!-- The title to show when titleEnabled is set to true. -->
<attr name="title"/>
</declare-styleable>
<declare-styleable name="CollapsingAppBarLayout_LayoutParams">
<attr name="layout_collapseMode">
<!-- The view will act as normal with no collapsing behavior. -->
<enum name="none" value="0"/>
<!-- The view will pin in place. -->
<enum name="pin" value="1"/>
<!-- The view will scroll in a parallax fashion. See the
layout_collapseParallaxMultiplier attribute to change the multiplier. -->
<enum name="parallax" value="2"/>
</attr>
<!-- The multiplier used when layout_collapseMode is set to 'parallax'. The value should
be between 0.0 and 1.0. -->
<attr name="layout_collapseParallaxMultiplier" format="float"/>
</declare-styleable>
<declare-styleable name="BottomSheetBehavior_Params">
<!-- The height of the bottom sheet when it is collapsed. -->
<attr name="behavior_peekHeight" format="dimension"/>
<attr name="behavior_hideable" format="boolean"/>
</declare-styleable>
<declare-styleable name="DesignTheme">
<!-- Theme to use for modal bottom sheet dialogs spawned from this theme. -->
<attr name="bottomSheetDialogTheme" format="reference" />
<!-- Style to use for modal bottom sheets in this theme. -->
<attr name="bottomSheetStyle" format="reference" />
<!-- Text color used to indicate an error has occurred. -->
<attr name="textColorError" format="color" />
</declare-styleable>
</resources>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<resources>
<!-- Color for the top outer pixels in the stroke: 18% white (these are multiplied) -->
<color name="design_fab_stroke_top_outer_color">#2EFFFFFF</color>
<!-- Color for the top inner pixels in the stroke: 10% white (these are multiplied) -->
<color name="design_fab_stroke_top_inner_color">#1AFFFFFF</color>
<!-- Color for the bottom outer pixels in the stroke: 6% black (these are multiplied) -->
<color name="design_fab_stroke_end_outer_color">#0F000000</color>
<!-- Color for the bottom inner pixels in the stroke: 4% black (these are multiplied) -->
<color name="design_fab_stroke_end_inner_color">#0A000000</color>
<!-- Shadow color for the first pixels of a shadow -->
<color name="design_fab_shadow_start_color">#44000000</color>
<!-- Shadow color for the middle pixels of a shadow -->
<color name="design_fab_shadow_mid_color">#14000000</color>
<!-- Shadow color for the furthest pixels of a shadow -->
<color name="design_fab_shadow_end_color">@android:color/transparent</color>
<color name="design_textinput_error_color_light">#FFD50000</color>
<color name="design_textinput_error_color_dark">#FFFF6E6E</color>
<color name="design_snackbar_background_color">#323232</color>
</resources>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<resources>
<integer name="design_snackbar_text_max_lines">2</integer>
</resources>

View File

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<resources>
<dimen name="design_fab_elevation">6dp</dimen>
<dimen name="design_fab_translation_z_pressed">6dp</dimen>
<dimen name="design_fab_image_size">24dp</dimen>
<dimen name="design_fab_size_normal">56dp</dimen>
<dimen name="design_fab_size_mini">40dp</dimen>
<dimen name="design_fab_border_width">0.5dp</dimen>
<!-- 5 * standard increment (56dp) -->
<dimen name="design_navigation_max_width">280dp</dimen>
<dimen name="design_navigation_elevation">16dp</dimen>
<dimen name="design_navigation_icon_padding">32dp</dimen>
<dimen name="design_navigation_icon_size">24dp</dimen>
<dimen name="design_navigation_separator_vertical_padding">8dp</dimen>
<dimen name="design_navigation_padding_bottom">8dp</dimen>
<dimen name="design_tab_scrollable_min_width">72dp</dimen>
<dimen name="design_tab_max_width">264dp</dimen>
<dimen name="design_tab_text_size">14sp</dimen>
<dimen name="design_tab_text_size_2line">12sp</dimen>
<dimen name="design_snackbar_min_width">-1px</dimen>
<dimen name="design_snackbar_max_width">-1px</dimen>
<dimen name="design_snackbar_elevation">6dp</dimen>
<dimen name="design_snackbar_background_corner_radius">0dp</dimen>
<dimen name="design_snackbar_padding_horizontal">12dp</dimen>
<dimen name="design_snackbar_padding_vertical">14dp</dimen>
<dimen name="design_snackbar_padding_vertical_2lines">24dp</dimen>
<!-- Extra spacing between the action and message views -->
<dimen name="design_snackbar_extra_spacing_horizontal">0dp</dimen>
<!-- The maximum width for a Snackbar's inline action. If the view is width than this then
the Snackbar will change to vertical stacking -->
<dimen name="design_snackbar_action_inline_max_width">128dp</dimen>
<dimen name="design_snackbar_text_size">14sp</dimen>
<dimen name="design_appbar_elevation">4dp</dimen>
<dimen name="design_bottom_sheet_modal_elevation">16dp</dimen>
<dimen name="design_bottom_sheet_modal_peek_height">256dp</dimen>
</resources>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<resources>
<item name="view_offset_helper" type="id" />
</resources>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<resources>
<integer name="bottom_sheet_slide_duration">150</integer>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<resources>
<!-- The class name to the ScrollingChildBehavior required for AppBarLayout -->
<string name="appbar_scrolling_view_behavior" translatable="false">android.support.design.widget.AppBarLayout$ScrollingViewBehavior</string>
<!-- The class name to the BottomSheetBehavior -->
<string name="bottom_sheet_behavior" translatable="false">android.support.design.widget.BottomSheetBehavior</string>
<!-- The text pattern for the character counter -->
<string name="character_counter_pattern" translatable="false">%1$d / %2$d</string>
</resources>

View File

@ -0,0 +1,130 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<resources>
<style name="Widget.Design.FloatingActionButton" parent="android:Widget">
<item name="android:background">@drawable/design_fab_background</item>
<item name="backgroundTint">?attr/colorAccent</item>
<item name="fabSize">normal</item>
<item name="elevation">@dimen/design_fab_elevation</item>
<item name="pressedTranslationZ">@dimen/design_fab_translation_z_pressed</item>
<item name="rippleColor">?attr/colorControlHighlight</item>
<item name="borderWidth">@dimen/design_fab_border_width</item>
</style>
<style name="Widget.Design.ScrimInsetsFrameLayout" parent="">
<item name="insetForeground">#4000</item>
</style>
<style name="Widget.Design.NavigationView" parent="">
<item name="elevation">@dimen/design_navigation_elevation</item>
<item name="android:background">?android:attr/windowBackground</item>
<item name="android:fitsSystemWindows">true</item>
<item name="android:maxWidth">@dimen/design_navigation_max_width</item>
</style>
<style name="Widget.Design.TabLayout" parent="Base.Widget.Design.TabLayout">
<item name="tabGravity">fill</item>
<item name="tabMode">fixed</item>
</style>
<style name="Base.Widget.Design.TabLayout" parent="android:Widget">
<item name="tabMaxWidth">@dimen/design_tab_max_width</item>
<item name="tabIndicatorColor">?attr/colorAccent</item>
<item name="tabIndicatorHeight">2dp</item>
<item name="tabPaddingStart">12dp</item>
<item name="tabPaddingEnd">12dp</item>
<item name="tabBackground">?attr/selectableItemBackground</item>
<item name="tabTextAppearance">@style/TextAppearance.Design.Tab</item>
<item name="tabSelectedTextColor">?android:textColorPrimary</item>
</style>
<style name="TextAppearance.Design.Tab" parent="TextAppearance.AppCompat.Button">
<item name="android:textSize">@dimen/design_tab_text_size</item>
<item name="android:textColor">?android:textColorSecondary</item>
<item name="textAllCaps">true</item>
</style>
<style name="Widget.Design.TextInputLayout" parent="android:Widget">
<item name="hintTextAppearance">@style/TextAppearance.Design.Hint</item>
<item name="errorTextAppearance">@style/TextAppearance.Design.Error</item>
<item name="counterTextAppearance">@style/TextAppearance.Design.Counter</item>
<item name="counterOverflowTextAppearance">@style/TextAppearance.Design.Counter.Overflow</item>
</style>
<style name="TextAppearance.Design.Hint" parent="TextAppearance.AppCompat.Caption">
<item name="android:textColor">?attr/colorControlActivated</item>
</style>
<style name="TextAppearance.Design.Error" parent="TextAppearance.AppCompat.Caption">
<item name="android:textColor">?attr/textColorError</item>
</style>
<style name="TextAppearance.Design.Counter" parent="TextAppearance.AppCompat.Caption"/>
<style name="TextAppearance.Design.Counter.Overflow" parent="TextAppearance.AppCompat.Caption">
<item name="android:textColor">?attr/textColorError</item>
</style>
<style name="TextAppearance.Design.Snackbar.Message" parent="android:TextAppearance">
<item name="android:textSize">@dimen/design_snackbar_text_size</item>
<item name="android:textColor">?android:textColorPrimary</item>
</style>
<style name="Widget.Design.Snackbar" parent="android:Widget">
<item name="android:theme">@style/ThemeOverlay.AppCompat.Dark</item>
<item name="android:minWidth">@dimen/design_snackbar_min_width</item>
<item name="android:maxWidth">@dimen/design_snackbar_max_width</item>
<item name="android:background">@drawable/design_snackbar_background</item>
<item name="android:paddingLeft">@dimen/design_snackbar_padding_horizontal</item>
<item name="android:paddingRight">@dimen/design_snackbar_padding_horizontal</item>
<item name="elevation">@dimen/design_snackbar_elevation</item>
<item name="maxActionInlineWidth">@dimen/design_snackbar_action_inline_max_width</item>
</style>
<style name="Widget.Design.CollapsingToolbar" parent="android:Widget">
<item name="expandedTitleMargin">32dp</item>
<item name="statusBarScrim">?attr/colorPrimaryDark</item>
</style>
<style name="Widget.Design.AppBarLayout" parent="android:Widget">
<item name="elevation">@dimen/design_appbar_elevation</item>
<item name="android:background">?attr/colorPrimary</item>
</style>
<style name="Widget.Design.CoordinatorLayout" parent="android:Widget">
<item name="statusBarBackground">?attr/colorPrimaryDark</item>
</style>
<style name="TextAppearance.Design.CollapsingToolbar.Expanded" parent="TextAppearance.AppCompat.Display1">
<item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
<style name="Animation.Design.BottomSheetDialog" parent="Animation.AppCompat.Dialog">
<item name="android:windowEnterAnimation">@anim/design_bottom_sheet_slide_in</item>
<item name="android:windowExitAnimation">@anim/design_bottom_sheet_slide_out</item>
</style>
<style name="Widget.Design.BottomSheet.Modal" parent="android:Widget">
<item name="android:background">?android:attr/colorBackground</item>
<item name="android:elevation">@dimen/design_bottom_sheet_modal_elevation</item>
<item name="behavior_peekHeight">@dimen/design_bottom_sheet_modal_peek_height</item>
<item name="behavior_hideable">true</item>
</style>
</resources>

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ 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
~ distributed under the License is distributed on an "AS IS" BASIS,
~ 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.
-->
<resources>
<style name="Theme.Design.BottomSheetDialog" parent="Theme.AppCompat.Dialog">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowAnimationStyle">@style/Animation.Design.BottomSheetDialog</item>
<item name="bottomSheetStyle">@style/Widget.Design.BottomSheet.Modal</item>
</style>
<style name="Theme.Design.Light.BottomSheetDialog" parent="Theme.AppCompat.Light.Dialog">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowAnimationStyle">@style/Animation.Design.BottomSheetDialog</item>
<item name="bottomSheetStyle">@style/Widget.Design.BottomSheet.Modal</item>
</style>
<style name="Theme.Design" parent="Theme.AppCompat">
<item name="textColorError">@color/design_textinput_error_color_dark</item>
</style>
<style name="Theme.Design.Light" parent="Theme.AppCompat.Light">
<item name="textColorError">@color/design_textinput_error_color_light</item>
</style>
<style name="Theme.Design.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.Design.Light.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
</resources>

View File

@ -0,0 +1,2 @@
This hidden file is there to ensure there is an src folder.
Once we support binary library this will go away.