diff options
author | aLIEzTed <JianGuo@aLIEzTeddeMacBook-Pro.local> | 2015-12-15 19:00:53 +0800 |
---|---|---|
committer | TedaLIEz <aliezted@gmail.com> | 2015-12-22 17:36:28 +0800 |
commit | 5aec8b409f2638443094c644aec9b057c60ada76 (patch) | |
tree | 9d9052b67d06c0fb4ad9fe50e6ea49ec99a958a8 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain | |
parent | 2e8efbee853ad6f5addda29ea3df08f2bab5c4b6 (diff) | |
download | open-keychain-5aec8b409f2638443094c644aec9b057c60ada76.tar.gz open-keychain-5aec8b409f2638443094c644aec9b057c60ada76.tar.bz2 open-keychain-5aec8b409f2638443094c644aec9b057c60ada76.zip |
Issue #1595
link to faq
link to app
Issue #1595
Issue#1595
Revert commits
Sorry for overhead annotation
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/BackupCodeFragment.java | 23 | ||||
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/HelpActivity.java | 16 |
2 files changed, 32 insertions, 7 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/BackupCodeFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/BackupCodeFragment.java index 8afdb5f94..3e53e35da 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/BackupCodeFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/BackupCodeFragment.java @@ -54,6 +54,7 @@ import org.sufficientlysecure.keychain.operations.results.ExportResult; import org.sufficientlysecure.keychain.provider.TemporaryFileProvider; import org.sufficientlysecure.keychain.service.BackupKeyringParcel; import org.sufficientlysecure.keychain.ui.base.CryptoOperationFragment; +import org.sufficientlysecure.keychain.ui.dialog.ProgressDialogFragment; import org.sufficientlysecure.keychain.ui.util.Notify; import org.sufficientlysecure.keychain.ui.util.Notify.ActionListener; import org.sufficientlysecure.keychain.ui.util.Notify.Style; @@ -68,9 +69,9 @@ public class BackupCodeFragment extends CryptoOperationFragment<BackupKeyringPar public static final String BACK_STACK_INPUT = "state_display"; public static final String ARG_EXPORT_SECRET = "export_secret"; public static final String ARG_MASTER_KEY_IDS = "master_key_ids"; - public static final String ARG_CURRENT_STATE = "current_state"; + public static final int REQUEST_SAVE = 1; public static final String ARG_BACK_STACK = "back_stack"; @@ -80,8 +81,7 @@ public class BackupCodeFragment extends CryptoOperationFragment<BackupKeyringPar String mBackupCode; private EditText[] mCodeEditText; - private ToolableViewAnimator mStatusAnimator, mTitleAnimator, mCodeFieldsAnimator; - + private ToolableViewAnimator mStatusAnimator, mTitleAnimator, mCodeFieldsAnimator, mFaqAnimator; private Integer mBackStackLevel; private Uri mCachedBackupUri; @@ -115,14 +115,14 @@ public class BackupCodeFragment extends CryptoOperationFragment<BackupKeyringPar mTitleAnimator.setDisplayedChild(0, animate); mStatusAnimator.setDisplayedChild(0, animate); mCodeFieldsAnimator.setDisplayedChild(0, animate); - + mFaqAnimator.setDisplayedChild(0, animate); break; case STATE_INPUT: mTitleAnimator.setDisplayedChild(1, animate); mStatusAnimator.setDisplayedChild(1, animate); mCodeFieldsAnimator.setDisplayedChild(1, animate); - + mFaqAnimator.setDisplayedChild(1, animate); for (EditText editText : mCodeEditText) { editText.setText(""); } @@ -135,6 +135,7 @@ public class BackupCodeFragment extends CryptoOperationFragment<BackupKeyringPar mTitleAnimator.setDisplayedChild(1, false); mStatusAnimator.setDisplayedChild(2, animate); mCodeFieldsAnimator.setDisplayedChild(1, false); + mFaqAnimator.setDisplayedChild(0, false); hideKeyboard(); @@ -151,6 +152,7 @@ public class BackupCodeFragment extends CryptoOperationFragment<BackupKeyringPar mTitleAnimator.setDisplayedChild(2, animate); mStatusAnimator.setDisplayedChild(3, animate); mCodeFieldsAnimator.setDisplayedChild(1, false); + mFaqAnimator.setDisplayedChild(0, animate); hideKeyboard(); @@ -220,6 +222,7 @@ public class BackupCodeFragment extends CryptoOperationFragment<BackupKeyringPar mStatusAnimator = (ToolableViewAnimator) view.findViewById(R.id.status_animator); mTitleAnimator = (ToolableViewAnimator) view.findViewById(R.id.title_animator); mCodeFieldsAnimator = (ToolableViewAnimator) view.findViewById(R.id.code_animator); + mFaqAnimator = (ToolableViewAnimator) view.findViewById(R.id.faq_animator); View backupInput = view.findViewById(R.id.button_backup_input); backupInput.setOnClickListener(new OnClickListener() { @@ -255,9 +258,19 @@ public class BackupCodeFragment extends CryptoOperationFragment<BackupKeyringPar } }); + view.findViewById(R.id.tv_faq).setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + showFaq(); + } + }); return view; } + private void showFaq() { + HelpActivity.startHelpActivity(getActivity(), HelpActivity.TAB_FAQ); + } + @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/HelpActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/HelpActivity.java index c757c8e88..b96c7edb5 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/HelpActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/HelpActivity.java @@ -17,8 +17,10 @@ package org.sufficientlysecure.keychain.ui; +import android.content.Context; import android.content.Intent; import android.os.Bundle; +import android.support.annotation.IntDef; import android.support.v4.view.ViewPager; import android.view.View; @@ -28,13 +30,16 @@ import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.ui.adapter.PagerTabStripAdapter; import org.sufficientlysecure.keychain.ui.base.BaseActivity; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + public class HelpActivity extends BaseActivity { public static final String EXTRA_SELECTED_TAB = "selected_tab"; public static final int TAB_START = 0; - public static final int TAB_FAQ = 1; - public static final int TAB_TRUST = 2; + public static final int TAB_CONFIRM = 1; + public static final int TAB_FAQ = 2; public static final int TAB_CHANGELOG = 3; public static final int TAB_ABOUT = 4; @@ -99,4 +104,11 @@ public class HelpActivity extends BaseActivity { protected void initLayout() { setContentView(R.layout.help_activity); } + + public static void startHelpActivity(Context context, int code) { + Intent intent = new Intent(context, HelpActivity.class); + intent.putExtra(HelpActivity.EXTRA_SELECTED_TAB, code); + context.startActivity(intent); + } + } |