Fix crash due to resource id conflict when showing library's number pad time picker
This commit is contained in:
parent
991c9184d6
commit
3f93ad9ecb
@ -33,6 +33,8 @@ import butterknife.OnClick;
|
||||
* Created by Phillip Hsu on 7/12/2016.
|
||||
*
|
||||
*/
|
||||
// TODO: Use library's NumberPadTimePickerDialog instead.
|
||||
@Deprecated
|
||||
public class NumpadTimePickerDialog extends BaseTimePickerDialog
|
||||
implements NumpadTimePicker.OnInputChangeListener {
|
||||
private static final String TAG = "NumpadTimePickerDialog";
|
||||
@ -147,7 +149,7 @@ public class NumpadTimePickerDialog extends BaseTimePickerDialog
|
||||
|
||||
@Override
|
||||
protected int contentLayout() {
|
||||
return R.layout.dialog_time_picker_numpad;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,48 +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.
|
||||
-->
|
||||
|
||||
<!-- TOneverDO: Use LinearLayout as root container when the
|
||||
dialog is a DialogFragment (or a subclass of), or else LWM
|
||||
doesn't work. -->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/input_time"
|
||||
android:layout_width="@dimen/left_side_width"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/text_size_display_3"
|
||||
android:fontFamily="sans-serif"
|
||||
style="@style/TextAppearance.AppCompat"/>
|
||||
|
||||
<!--<View style="@style/FocusGrabber"
|
||||
android:id="@+id/focus_grabber"/>-->
|
||||
|
||||
<com.philliphsu.clock2.timepickers.NumpadTimePicker
|
||||
android:id="@+id/number_grid"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="@dimen/bottom_sheet_vertical_space"
|
||||
android:layout_marginStart="@dimen/bottom_sheet_edge_margin"
|
||||
android:layout_marginEnd="@dimen/bottom_sheet_edge_margin"/>
|
||||
|
||||
</LinearLayout>
|
||||
@ -1,47 +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.
|
||||
-->
|
||||
|
||||
<!-- TOneverDO: Use LinearLayout as root container when the
|
||||
dialog is a DialogFragment (or a subclass of), or else LWM
|
||||
doesn't work. -->
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/input_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/numeric_keypad_output_box_height"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/text_size_display_3"
|
||||
android:fontFamily="sans-serif"
|
||||
style="@style/TextAppearance.AppCompat"/>
|
||||
|
||||
<!--<View style="@style/FocusGrabber"
|
||||
android:id="@+id/focus_grabber"/>-->
|
||||
|
||||
<com.philliphsu.clock2.timepickers.NumpadTimePicker
|
||||
android:id="@+id/number_grid"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/numeric_keypad_height"
|
||||
android:layout_marginTop="@dimen/bottom_sheet_vertical_space"
|
||||
android:layout_marginStart="@dimen/bottom_sheet_edge_margin"
|
||||
android:layout_marginEnd="@dimen/bottom_sheet_edge_margin"/>
|
||||
|
||||
</LinearLayout>
|
||||
Loading…
Reference in New Issue
Block a user