2015-01-16 00:04:44 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2013 The CyanogenMod Project
|
2016-12-29 16:28:02 +00:00
|
|
|
* Copyright (C) 2017 The LineageOS Project
|
2015-01-16 00:04:44 +00:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package com.cyanogenmod.setupwizard.setup;
|
|
|
|
|
|
|
|
import android.app.Fragment;
|
2015-01-23 19:37:23 +00:00
|
|
|
import android.app.FragmentManager;
|
2015-01-16 00:04:44 +00:00
|
|
|
import android.content.Intent;
|
|
|
|
import android.os.Bundle;
|
|
|
|
|
|
|
|
public interface Page {
|
|
|
|
|
|
|
|
public static final String KEY_PAGE_ARGUMENT = "key_arg";
|
2015-01-23 19:37:23 +00:00
|
|
|
public static final String KEY_PAGE_ACTION= "action";
|
2015-01-16 00:04:44 +00:00
|
|
|
|
|
|
|
public static final int ACTION_NEXT = 1;
|
|
|
|
public static final int ACTION_PREVIOUS = 2;
|
|
|
|
|
|
|
|
public String getKey();
|
|
|
|
public int getTitleResId();
|
2016-12-29 16:28:02 +00:00
|
|
|
public int getIconResId();
|
2016-07-14 18:51:58 +00:00
|
|
|
public int getButtonBarBackgroundColorId();
|
2015-01-16 00:04:44 +00:00
|
|
|
public int getPrevButtonTitleResId();
|
|
|
|
public int getNextButtonTitleResId();
|
2015-01-23 19:37:23 +00:00
|
|
|
public Fragment getFragment(FragmentManager fragmentManager, int action);
|
2015-01-16 00:04:44 +00:00
|
|
|
public Bundle getData();
|
|
|
|
public void resetData(Bundle data);
|
|
|
|
public boolean isRequired();
|
|
|
|
public Page setRequired(boolean required);
|
2015-01-29 05:32:50 +00:00
|
|
|
public boolean isHidden();
|
2015-01-30 01:36:30 +00:00
|
|
|
public Page setHidden(boolean hidden);
|
2015-01-16 00:04:44 +00:00
|
|
|
public boolean doPreviousAction();
|
|
|
|
public boolean doNextAction();
|
2015-02-23 21:52:37 +00:00
|
|
|
public void doLoadAction(FragmentManager fragmentManager, int action);
|
2015-01-30 18:52:47 +00:00
|
|
|
public void onFinishSetup();
|
2015-01-19 22:29:43 +00:00
|
|
|
public boolean onActivityResult(int requestCode, int resultCode, Intent data);
|
|
|
|
public SetupDataCallbacks getCallbacks();
|
2015-01-16 00:04:44 +00:00
|
|
|
}
|