@@ -609,7 +609,7 @@ public void onCreate(Bundle savedInstanceState) {
609
609
null pointer exceptions on the configuration methods
610
610
If the user did not supply a custom limiter we need to ensure both mDefaultLimiter
611
611
and mLimiter are the same reference, so that the config methods actually
612
- ffect the behaviour of the picker (in the unlikely event the user reconfigures
612
+ affect the behaviour of the picker (in the unlikely event the user reconfigures
613
613
the picker when it is shown)
614
614
*/
615
615
mDefaultLimiter = mLimiter instanceof DefaultTimepointLimiter
@@ -648,18 +648,18 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
648
648
mSelectedColor = ContextCompat .getColor (context , R .color .mdtp_white );
649
649
mUnselectedColor = ContextCompat .getColor (context , R .color .mdtp_accent_color_focused );
650
650
651
- mHourView = ( TextView ) view .findViewById (R .id .mdtp_hours );
651
+ mHourView = view .findViewById (R .id .mdtp_hours );
652
652
mHourView .setOnKeyListener (keyboardListener );
653
- mHourSpaceView = ( TextView ) view .findViewById (R .id .mdtp_hour_space );
654
- mMinuteSpaceView = ( TextView ) view .findViewById (R .id .mdtp_minutes_space );
655
- mMinuteView = ( TextView ) view .findViewById (R .id .mdtp_minutes );
653
+ mHourSpaceView = view .findViewById (R .id .mdtp_hour_space );
654
+ mMinuteSpaceView = view .findViewById (R .id .mdtp_minutes_space );
655
+ mMinuteView = view .findViewById (R .id .mdtp_minutes );
656
656
mMinuteView .setOnKeyListener (keyboardListener );
657
- mSecondSpaceView = ( TextView ) view .findViewById (R .id .mdtp_seconds_space );
658
- mSecondView = ( TextView ) view .findViewById (R .id .mdtp_seconds );
657
+ mSecondSpaceView = view .findViewById (R .id .mdtp_seconds_space );
658
+ mSecondView = view .findViewById (R .id .mdtp_seconds );
659
659
mSecondView .setOnKeyListener (keyboardListener );
660
- mAmTextView = ( TextView ) view .findViewById (R .id .mdtp_am_label );
660
+ mAmTextView = view .findViewById (R .id .mdtp_am_label );
661
661
mAmTextView .setOnKeyListener (keyboardListener );
662
- mPmTextView = ( TextView ) view .findViewById (R .id .mdtp_pm_label );
662
+ mPmTextView = view .findViewById (R .id .mdtp_pm_label );
663
663
mPmTextView .setOnKeyListener (keyboardListener );
664
664
mAmPmLayout = view .findViewById (R .id .mdtp_ampm_layout );
665
665
String [] amPmTexts = new DateFormatSymbols ().getAmPmStrings ();
@@ -674,7 +674,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
674
674
675
675
mInitialTime = roundToNearest (mInitialTime );
676
676
677
- mTimePicker = ( RadialPickerLayout ) view .findViewById (R .id .mdtp_time_picker );
677
+ mTimePicker = view .findViewById (R .id .mdtp_time_picker );
678
678
mTimePicker .setOnValueSelectedListener (this );
679
679
mTimePicker .setOnKeyListener (keyboardListener );
680
680
mTimePicker .initialize (getActivity (), this , mInitialTime , mIs24HourMode );
@@ -709,7 +709,7 @@ public void onClick(View view) {
709
709
}
710
710
});
711
711
712
- mOkButton = ( Button ) view .findViewById (R .id .mdtp_ok );
712
+ mOkButton = view .findViewById (R .id .mdtp_ok );
713
713
mOkButton .setOnClickListener (new OnClickListener () {
714
714
@ Override
715
715
public void onClick (View v ) {
@@ -727,7 +727,7 @@ public void onClick(View v) {
727
727
if (mOkString != null ) mOkButton .setText (mOkString );
728
728
else mOkButton .setText (mOkResid );
729
729
730
- mCancelButton = ( Button ) view .findViewById (R .id .mdtp_cancel );
730
+ mCancelButton = view .findViewById (R .id .mdtp_cancel );
731
731
mCancelButton .setOnClickListener (new OnClickListener () {
732
732
@ Override
733
733
public void onClick (View v ) {
@@ -814,7 +814,7 @@ public void onClick(View v) {
814
814
);
815
815
paramsSeparator .addRule (RelativeLayout .CENTER_HORIZONTAL );
816
816
paramsSeparator .addRule (RelativeLayout .ABOVE , R .id .mdtp_center_view );
817
- TextView separatorView = ( TextView ) view .findViewById (R .id .mdtp_separator );
817
+ TextView separatorView = view .findViewById (R .id .mdtp_separator );
818
818
separatorView .setLayoutParams (paramsSeparator );
819
819
} else if (!mEnableSeconds ) {
820
820
// Hour + Minutes + Am/Pm indicator
@@ -824,7 +824,7 @@ public void onClick(View v) {
824
824
);
825
825
paramsSeparator .addRule (RelativeLayout .CENTER_HORIZONTAL );
826
826
paramsSeparator .addRule (RelativeLayout .ABOVE , R .id .mdtp_center_view );
827
- TextView separatorView = ( TextView ) view .findViewById (R .id .mdtp_separator );
827
+ TextView separatorView = view .findViewById (R .id .mdtp_separator );
828
828
separatorView .setLayoutParams (paramsSeparator );
829
829
// Put the am/pm indicator below the separator
830
830
RelativeLayout .LayoutParams paramsAmPm = new RelativeLayout .LayoutParams (
@@ -841,7 +841,7 @@ public void onClick(View v) {
841
841
);
842
842
paramsSeparator .addRule (RelativeLayout .CENTER_HORIZONTAL );
843
843
paramsSeparator .addRule (RelativeLayout .ABOVE , R .id .mdtp_seconds_space );
844
- TextView separatorView = ( TextView ) view .findViewById (R .id .mdtp_separator );
844
+ TextView separatorView = view .findViewById (R .id .mdtp_separator );
845
845
separatorView .setLayoutParams (paramsSeparator );
846
846
// Center the seconds
847
847
RelativeLayout .LayoutParams paramsSeconds = new RelativeLayout .LayoutParams (
@@ -863,7 +863,7 @@ public void onClick(View v) {
863
863
);
864
864
paramsSeparator .addRule (RelativeLayout .CENTER_HORIZONTAL );
865
865
paramsSeparator .addRule (RelativeLayout .ABOVE , R .id .mdtp_seconds_space );
866
- TextView separatorView = ( TextView ) view .findViewById (R .id .mdtp_separator );
866
+ TextView separatorView = view .findViewById (R .id .mdtp_separator );
867
867
separatorView .setLayoutParams (paramsSeparator );
868
868
// Put the Am/Pm indicator below the seconds
869
869
RelativeLayout .LayoutParams paramsAmPm = new RelativeLayout .LayoutParams (
@@ -880,7 +880,7 @@ else if (mIs24HourMode && !mEnableSeconds && mEnableMinutes) {
880
880
LayoutParams .WRAP_CONTENT , LayoutParams .WRAP_CONTENT
881
881
);
882
882
paramsSeparator .addRule (RelativeLayout .CENTER_IN_PARENT );
883
- TextView separatorView = ( TextView ) view .findViewById (R .id .mdtp_separator );
883
+ TextView separatorView = view .findViewById (R .id .mdtp_separator );
884
884
separatorView .setLayoutParams (paramsSeparator );
885
885
} else if (!mEnableMinutes && !mEnableSeconds ) {
886
886
// center the hour
@@ -945,7 +945,7 @@ else if (mIs24HourMode && !mEnableSeconds && mEnableMinutes) {
945
945
}
946
946
947
947
// Set the title (if any)
948
- TextView timePickerHeader = ( TextView ) view .findViewById (R .id .mdtp_time_picker_header );
948
+ TextView timePickerHeader = view .findViewById (R .id .mdtp_time_picker_header );
949
949
if (!mTitle .isEmpty ()) {
950
950
timePickerHeader .setVisibility (TextView .VISIBLE );
951
951
timePickerHeader .setText (mTitle .toUpperCase (Locale .getDefault ()));
0 commit comments