本文整理汇总了Java中android.support.v17.leanback.app.GuidedStepFragment.add方法的典型用法代码示例。如果您正苦于以下问题:Java GuidedStepFragment.add方法的具体用法?Java GuidedStepFragment.add怎么用?Java GuidedStepFragment.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.v17.leanback.app.GuidedStepFragment
的用法示例。
在下文中一共展示了GuidedStepFragment.add方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onGuidedActionClicked
import android.support.v17.leanback.app.GuidedStepFragment; //导入方法依赖的package包/类
@Override
public void onGuidedActionClicked(GuidedAction action) {
DvrManager dvrManager = TvApplication.getSingletons(getContext()).getDvrManager();
long duration = mDurations.get((int) action.getId());
long startTimeMs = System.currentTimeMillis();
long endTimeMs = System.currentTimeMillis() + duration;
List<ScheduledRecording> conflicts = dvrManager.getConflictingSchedules(
mChannel.getId(), startTimeMs, endTimeMs);
dvrManager.addSchedule(mChannel, startTimeMs, endTimeMs);
if (conflicts.isEmpty()) {
dismissDialog();
} else {
GuidedStepFragment fragment = new DvrChannelRecordConflictFragment();
Bundle args = new Bundle();
args.putLong(DvrHalfSizedDialogFragment.KEY_CHANNEL_ID, mChannel.getId());
args.putLong(DvrHalfSizedDialogFragment.KEY_START_TIME_MS, startTimeMs);
args.putLong(DvrHalfSizedDialogFragment.KEY_END_TIME_MS, endTimeMs);
fragment.setArguments(args);
GuidedStepFragment.add(getFragmentManager(), fragment,
R.id.halfsized_dialog_host);
}
}
示例2: onGuidedActionClicked
import android.support.v17.leanback.app.GuidedStepFragment; //导入方法依赖的package包/类
@Override
public void onGuidedActionClicked(GuidedAction action) {
FragmentManager fm = getFragmentManager();
if (action.getId() == CONTINUE) {
GuidedStepFragment.add(fm, new SecondStepFragment());
} else {
getActivity().finishAfterTransition();
}
}
示例3: onCreateView
import android.support.v17.leanback.app.GuidedStepFragment; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.halfsized_dialog, container, false);
GuidedStepFragment fragment = new DvrStopSeriesRecordingFragment();
fragment.setArguments(getArguments());
GuidedStepFragment.add(getChildFragmentManager(), fragment, R.id.halfsized_dialog_host);
return view;
}
示例4: onCreateView
import android.support.v17.leanback.app.GuidedStepFragment; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = super.onCreateView(inflater, container, savedInstanceState);
mFragment = onCreateGuidedStepFragment();
mFragment.setArguments(getArguments());
mFragment.setOnActionClickListener(getOnActionClickListener());
GuidedStepFragment.add(getChildFragmentManager(),
mFragment, R.id.halfsized_dialog_host);
return view;
}
示例5: onGuidedActionClicked
import android.support.v17.leanback.app.GuidedStepFragment; //导入方法依赖的package包/类
@Override
public void onGuidedActionClicked(GuidedAction action) {
if (action.getId() == ACTION_RECORD_EPISODE) {
getDvrManager().addSchedule(mProgram);
List<ScheduledRecording> conflicts = getDvrManager().getConflictingSchedules(mProgram);
if (conflicts.isEmpty()) {
DvrUiHelper.showAddScheduleToast(getContext(), mProgram.getTitle(),
mProgram.getStartTimeUtcMillis(), mProgram.getEndTimeUtcMillis());
dismissDialog();
} else {
GuidedStepFragment fragment = new DvrProgramConflictFragment();
Bundle args = new Bundle();
args.putParcelable(DvrHalfSizedDialogFragment.KEY_PROGRAM, mProgram);
fragment.setArguments(args);
GuidedStepFragment.add(getFragmentManager(), fragment,
R.id.halfsized_dialog_host);
}
} else if (action.getId() == ACTION_RECORD_SERIES) {
SeriesRecording seriesRecording = TvApplication.getSingletons(getContext())
.getDvrDataManager().getSeriesRecording(mProgram.getSeriesId());
if (seriesRecording == null) {
seriesRecording = getDvrManager().addSeriesRecording(mProgram,
Collections.emptyList(), SeriesRecording.STATE_SERIES_STOPPED);
} else {
// Reset priority to the highest.
seriesRecording = SeriesRecording.buildFrom(seriesRecording)
.setPriority(TvApplication.getSingletons(getContext())
.getDvrScheduleManager().suggestNewSeriesPriority())
.build();
getDvrManager().updateSeriesRecording(seriesRecording);
}
DvrUiHelper.startSeriesSettingsActivity(getContext(),
seriesRecording.getId(), null, true, true, true);
dismissDialog();
}
}
示例6: onGuidedActionClicked
import android.support.v17.leanback.app.GuidedStepFragment; //导入方法依赖的package包/类
@Override
public void onGuidedActionClicked(GuidedAction action) {
if (action.getId() == ACTION_FORGET_STORAGE) {
DvrForgetStorageErrorFragment fragment = new DvrForgetStorageErrorFragment();
Bundle args = new Bundle();
args.putString(DvrHalfSizedDialogFragment.KEY_INPUT_ID, mInputId);
fragment.setArguments(args);
GuidedStepFragment.add(getFragmentManager(), fragment, R.id.halfsized_dialog_host);
return;
}
dismissDialog();
}
示例7: onCreate
import android.support.v17.leanback.app.GuidedStepFragment; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (null == savedInstanceState) {
GuidedStepFragment.add(getFragmentManager(), new PTVPreferencesFragment());
}
}
示例8: goToNext
import android.support.v17.leanback.app.GuidedStepFragment; //导入方法依赖的package包/类
@Override
public void goToNext(RingAccountViewModel ringAccountViewModel) {
GuidedStepFragment next;
if (ringAccountViewModel.isLink()) {
next = TVRingLinkAccountFragment.newInstance((RingAccountViewModelImpl) ringAccountViewModel);
} else {
next = TVRingAccountCreationFragment.newInstance((RingAccountViewModelImpl) ringAccountViewModel);
}
GuidedStepFragment.add(getFragmentManager(), next);
}
示例9: onCreate
import android.support.v17.leanback.app.GuidedStepFragment; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (null == savedInstanceState) {
GuidedStepFragment.add(getFragmentManager(), new FirstStepFragment());
}
}
示例10: onGuidedActionClicked
import android.support.v17.leanback.app.GuidedStepFragment; //导入方法依赖的package包/类
@Override
public void onGuidedActionClicked(GuidedAction action) {
FragmentManager fm = getFragmentManager();
if (action.getId() == CONTINUE) {
GuidedStepFragment.add(fm, new SecondStepFragment());
} else {
getActivity().finish();
}
}
示例11: onGuidedActionClicked
import android.support.v17.leanback.app.GuidedStepFragment; //导入方法依赖的package包/类
@Override
public void onGuidedActionClicked(GuidedAction action) {
long actionId = action.getId();
if (actionId == GuidedAction.ACTION_ID_OK) {
if (mEpisodicProgramLoadTask != null) {
mEpisodicProgramLoadTask.cancel(true);
mEpisodicProgramLoadTask = null;
}
if (mChannelOption != mSeriesRecording.getChannelOption()
|| mSeriesRecording.isStopped()
|| (mChannelOption == SeriesRecording.OPTION_CHANNEL_ONE
&& mSeriesRecording.getChannelId() != mSelectedChannelId)) {
SeriesRecording.Builder builder = SeriesRecording.buildFrom(mSeriesRecording)
.setChannelOption(mChannelOption)
.setState(SeriesRecording.STATE_SERIES_NORMAL);
if (mSelectedChannelId != Channel.INVALID_ID) {
builder.setChannelId(mSelectedChannelId);
}
TvApplication.getSingletons(getContext()).getDvrManager()
.updateSeriesRecording(builder.build());
SeriesRecordingScheduler scheduler =
SeriesRecordingScheduler.getInstance(getContext());
// Since dialog is used even after the fragment is closed, we should
// use application context.
ProgressDialog dialog = ProgressDialog.show(getContext(), null, getString(
R.string.dvr_series_schedules_progress_message_updating_programs));
scheduler.addOnSeriesRecordingUpdatedListener(
new OnSeriesRecordingUpdatedListener() {
@Override
public void onSeriesRecordingUpdated(SeriesRecording... seriesRecordings) {
for (SeriesRecording seriesRecording : seriesRecordings) {
if (seriesRecording.getId() == mSeriesRecordingId) {
dialog.dismiss();
scheduler.removeOnSeriesRecordingUpdatedListener(this);
showConfirmDialog();
return;
}
}
}
});
} else {
showConfirmDialog();
}
} else if (actionId == GuidedAction.ACTION_ID_CANCEL) {
finishGuidedStepFragments();
} else if (actionId == ACTION_ID_PRIORITY) {
FragmentManager fragmentManager = getFragmentManager();
PrioritySettingsFragment fragment = new PrioritySettingsFragment();
Bundle args = new Bundle();
args.putLong(PrioritySettingsFragment.COME_FROM_SERIES_RECORDING_ID,
mSeriesRecording.getId());
fragment.setArguments(args);
GuidedStepFragment.add(fragmentManager, fragment, R.id.dvr_settings_view_frame);
}
}
示例12: showExportDialog
import android.support.v17.leanback.app.GuidedStepFragment; //导入方法依赖的package包/类
@Override
public void showExportDialog(String pAccountID) {
GuidedStepFragment wizard = TVAccountExport.createInstance(pAccountID);
GuidedStepFragment.add(getFragmentManager(), wizard, R.id.main_browse_fragment);
}
示例13: goToAccountCreation
import android.support.v17.leanback.app.GuidedStepFragment; //导入方法依赖的package包/类
@Override
public void goToAccountCreation() {
RingAccountViewModelImpl ringAccountViewModel = new RingAccountViewModelImpl();
ringAccountViewModel.setLink(false);
GuidedStepFragment.add(getFragmentManager(), TVProfileCreationFragment.newInstance(ringAccountViewModel));
}
示例14: goToAccountLink
import android.support.v17.leanback.app.GuidedStepFragment; //导入方法依赖的package包/类
@Override
public void goToAccountLink() {
RingAccountViewModelImpl ringAccountViewModel = new RingAccountViewModelImpl();
ringAccountViewModel.setLink(true);
GuidedStepFragment.add(getFragmentManager(), TVProfileCreationFragment.newInstance(ringAccountViewModel));
}