Use support fragments consistently

This commit is contained in:
Phillip Hsu 2016-07-14 00:02:16 -07:00
parent b395722386
commit 0f32215145
3 changed files with 4 additions and 5 deletions

View File

@ -1,6 +1,6 @@
package com.philliphsu.clock2;
import android.app.Fragment;
import android.support.v4.app.Fragment;
/**
* Created by Phillip Hsu on 6/30/2016.

View File

@ -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
// and the device had rotated.
NumpadTimePickerDialog picker = (NumpadTimePickerDialog)
getFragmentManager().findFragmentByTag(TAG_TIME_PICKER);
getSupportFragmentManager().findFragmentByTag(TAG_TIME_PICKER);
if (picker != null) {
// Restore the callback
picker.setOnTimeSetListener(this);
@ -360,7 +360,7 @@ public class EditAlarmActivity extends BaseActivity implements
@OnClick(R.id.input_time)
void openTimePicker() {
NumpadTimePickerDialog picker = NumpadTimePickerDialog.newInstance(EditAlarmActivity.this);
picker.show(getFragmentManager(), TAG_TIME_PICKER);
picker.show(getSupportFragmentManager(), TAG_TIME_PICKER);
}
private void setWeekDaysText() {

View File

@ -1,7 +1,7 @@
package com.philliphsu.clock2.editalarm;
import android.app.DialogFragment;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -20,7 +20,6 @@ import butterknife.OnLongClick;
/**
* 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
implements NumpadTimePicker.OnInputChangeListener {