Update BottomSheetPickers to 2.3.1 and delete outdated layouts for grid time picker from our source code.

This commit is contained in:
Phillip Hsu 2017-02-26 18:42:45 -08:00
parent 98411170d7
commit db78b89c1c
3 changed files with 1 additions and 220 deletions

View File

@ -87,7 +87,7 @@ dependencies {
compile 'com.android.support:gridlayout-v7:25.1.0'
compile 'com.android.support:cardview-v7:25.1.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile('com.philliphsu:bottomsheetpickers:2.3.0') {
compile('com.philliphsu:bottomsheetpickers:2.3.1') {
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'com.android.support', module: 'design'
exclude group: 'com.android.support', module: 'gridlayout-v7'

View File

@ -1,108 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2016 Phillip Hsu
~
~ 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="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dialog_height"
android:orientation="horizontal">
<FrameLayout
android:id="@+id/time_display_background"
android:layout_width="@dimen/left_side_width"
android:layout_height="match_parent"
android:background="@android:color/white" >
<include
layout="@layout/time_header_label"
android:layout_width="match_parent"
android:layout_height="@dimen/header_height"
android:layout_gravity="center" />
</FrameLayout>
<com.philliphsu.clock2.timepickers.GridSelectorLayout
android:id="@+id/time_picker"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:paddingTop="@dimen/bottom_sheet_vertical_space"
android:layout_marginStart="@dimen/bottom_sheet_edge_margin"
android:paddingEnd="@dimen/anchored_fab_vertical_space"
android:paddingBottom="@dimen/bottom_sheet_vertical_space"/>
<View
android:id="@+id/divider"
style="@style/Divider.Vertical"/>
<!--TODO: Be wary of this vertical LL with weighted children.-->
<LinearLayout
android:id="@+id/half_day_toggles"
android:layout_width="@dimen/half_day_button_bar_height"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:id="@+id/half_day_toggle_1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="?android:attr/selectableItemBackground">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_gravity="center"
style="@style/TextAppearance.AppCompat.Button"/>
</FrameLayout>
<FrameLayout
android:id="@+id/half_day_toggle_2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="?android:attr/selectableItemBackground">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_gravity="center"
style="@style/TextAppearance.AppCompat.Button"/>
</FrameLayout>
</LinearLayout>
</LinearLayout>
<!-- app:borderWidth="0dp"
Remove the stroke that is otherwise visible when long pressed -->
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_done_24dp"
app:layout_anchor="@id/divider"
app:layout_anchorGravity="center_vertical"/>
</android.support.design.widget.CoordinatorLayout>

View File

@ -1,111 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2016 Phillip Hsu
~
~ 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="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<FrameLayout
android:id="@+id/time_display_background"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white" >
<include
layout="@layout/time_header_label"
android:layout_width="match_parent"
android:layout_height="@dimen/header_height"
android:layout_gravity="center" />
</FrameLayout>
<!--TOneverDO: Change marginTop to paddingTop without also adding the
padding amount to the height. -->
<!--TOneverDO: Change paddingBottom to marginBottom without also subtracting the
margin amount from the height. -->
<!--TODO: As a library, we probably also want to paddingLeft/Right-->
<com.philliphsu.clock2.timepickers.GridSelectorLayout
android:id="@+id/time_picker"
android:layout_width="match_parent"
android:layout_height="@dimen/number_grid_height"
android:layout_marginTop="@dimen/bottom_sheet_vertical_space"
android:paddingStart="@dimen/bottom_sheet_edge_margin"
android:paddingEnd="@dimen/bottom_sheet_edge_margin"
android:paddingBottom="@dimen/anchored_fab_vertical_space"/>
<View
android:id="@+id/divider"
style="@style/Divider.Horizontal"/>
<LinearLayout
android:id="@+id/half_day_toggles"
android:layout_width="match_parent"
android:layout_height="@dimen/half_day_button_bar_height"
android:orientation="horizontal">
<FrameLayout
android:id="@+id/half_day_toggle_1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?android:attr/selectableItemBackground">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_gravity="center"
style="@style/TextAppearance.AppCompat.Button"/>
</FrameLayout>
<FrameLayout
android:id="@+id/half_day_toggle_2"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?android:attr/selectableItemBackground">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_gravity="center"
style="@style/TextAppearance.AppCompat.Button"/>
</FrameLayout>
</LinearLayout>
</LinearLayout>
<!-- app:borderWidth="0dp"
Remove the stroke that is otherwise visible when long pressed -->
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_done_24dp"
app:layout_anchor="@id/divider"
app:layout_anchorGravity="center_horizontal"/>
</android.support.design.widget.CoordinatorLayout>