Use support fragments consistently
This commit is contained in:
parent
b395722386
commit
0f32215145
@ -1,6 +1,6 @@
|
|||||||
package com.philliphsu.clock2;
|
package com.philliphsu.clock2;
|
||||||
|
|
||||||
import android.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Phillip Hsu on 6/30/2016.
|
* Created by Phillip Hsu on 6/30/2016.
|
||||||
|
|||||||
@ -126,7 +126,7 @@ public class EditAlarmActivity extends BaseActivity implements
|
|||||||
// Was the time picker in our backstack? It could have been if it was showing
|
// Was the time picker in our backstack? It could have been if it was showing
|
||||||
// and the device had rotated.
|
// and the device had rotated.
|
||||||
NumpadTimePickerDialog picker = (NumpadTimePickerDialog)
|
NumpadTimePickerDialog picker = (NumpadTimePickerDialog)
|
||||||
getFragmentManager().findFragmentByTag(TAG_TIME_PICKER);
|
getSupportFragmentManager().findFragmentByTag(TAG_TIME_PICKER);
|
||||||
if (picker != null) {
|
if (picker != null) {
|
||||||
// Restore the callback
|
// Restore the callback
|
||||||
picker.setOnTimeSetListener(this);
|
picker.setOnTimeSetListener(this);
|
||||||
@ -360,7 +360,7 @@ public class EditAlarmActivity extends BaseActivity implements
|
|||||||
@OnClick(R.id.input_time)
|
@OnClick(R.id.input_time)
|
||||||
void openTimePicker() {
|
void openTimePicker() {
|
||||||
NumpadTimePickerDialog picker = NumpadTimePickerDialog.newInstance(EditAlarmActivity.this);
|
NumpadTimePickerDialog picker = NumpadTimePickerDialog.newInstance(EditAlarmActivity.this);
|
||||||
picker.show(getFragmentManager(), TAG_TIME_PICKER);
|
picker.show(getSupportFragmentManager(), TAG_TIME_PICKER);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setWeekDaysText() {
|
private void setWeekDaysText() {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package com.philliphsu.clock2.editalarm;
|
package com.philliphsu.clock2.editalarm;
|
||||||
|
|
||||||
import android.app.DialogFragment;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.v4.app.DialogFragment;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -20,7 +20,6 @@ import butterknife.OnLongClick;
|
|||||||
/**
|
/**
|
||||||
* Created by Phillip Hsu on 7/12/2016.
|
* Created by Phillip Hsu on 7/12/2016.
|
||||||
*
|
*
|
||||||
* Note this extends the framework's DialogFragment, NOT the support version's!
|
|
||||||
*/
|
*/
|
||||||
public class NumpadTimePickerDialog extends DialogFragment
|
public class NumpadTimePickerDialog extends DialogFragment
|
||||||
implements NumpadTimePicker.OnInputChangeListener {
|
implements NumpadTimePicker.OnInputChangeListener {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user