diff options
author | Joey Rizzoli <joey@lineageos.it> | 2016-12-29 17:28:02 +0100 |
---|---|---|
committer | Abhisek Devkota <ciwrl@lineageos.org> | 2017-01-14 18:36:57 -0800 |
commit | d1331884a16916a36b16ca4d53d4c72d2bda6738 (patch) | |
tree | 3fe040402b001a5aa55b5bfd80a9089408158469 /src/com/cyanogenmod/setupwizard/ui | |
parent | 65d6ac1299720f8cc8e40cc8cc875fe3da2337dd (diff) | |
download | packages_apps_SetupWizard-d1331884a16916a36b16ca4d53d4c72d2bda6738.zip packages_apps_SetupWizard-d1331884a16916a36b16ca4d53d4c72d2bda6738.tar.gz packages_apps_SetupWizard-d1331884a16916a36b16ca4d53d4c72d2bda6738.tar.bz2 |
SetupWizard: rebrand to LineageOS
* Rebrand UI
* Add privacy guard to setup
* Disable Cyngn inc MOD platform and account setup
* Make privacy policy view-able again
Change-Id: Iacd60886992ca72d3f75bb21a905d612432751fc
Signed-off-by: Joey Rizzoli <joey@lineageos.it>
Diffstat (limited to 'src/com/cyanogenmod/setupwizard/ui')
3 files changed, 16 insertions, 102 deletions
diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java b/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java index b0df440..2ec8e3a 100644 --- a/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java +++ b/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java @@ -23,6 +23,7 @@ import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.ImageView; import android.widget.TextView; import com.cyanogenmod.setupwizard.R; @@ -37,6 +38,7 @@ public abstract class SetupPageFragment extends Fragment { protected Page mPage; protected View mRootView; protected TextView mTitleView; + protected ImageView mIconView; protected ViewGroup mHeaderView; @Override @@ -52,7 +54,8 @@ public abstract class SetupPageFragment extends Fragment { Bundle savedInstanceState) { mRootView = inflater.inflate(getLayoutResource(), container, false); mTitleView = (TextView) mRootView.findViewById(android.R.id.title); - mHeaderView = (ViewGroup ) mRootView.findViewById(R.id.header); + mHeaderView = (ViewGroup) mRootView.findViewById(R.id.header); + mIconView = (ImageView) mRootView.findViewById(R.id.header_icon); initializePage(); return mRootView; } @@ -84,6 +87,13 @@ public abstract class SetupPageFragment extends Fragment { if (mTitleView != null) { mTitleView.setText(mPage.getTitleResId()); } + if (mIconView != null) { + int mResId = mPage.getIconResId(); + if (mResId != -1) { + mIconView.setImageResource(mResId); + mIconView.setVisibility(View.VISIBLE); + } + } mCallbacks.onPageLoaded(mPage); getActivity().startPostponedEnterTransition(); } diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java index cf56631..4782b36 100644 --- a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java +++ b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java @@ -287,21 +287,11 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks, null, null, null); } final Resources resources = getResources(); - if (mSetupData.isLastPage()) { - mNextButton.setCompoundDrawablesWithIntrinsicBounds(null, null, - getDrawable(R.drawable.ic_chevron_right_wht), null); - mNextButton.setTextColor(resources.getColor(R.color.white)); - mPrevButton.setCompoundDrawablesWithIntrinsicBounds( - getDrawable(R.drawable.ic_chevron_left_wht), null, - null, null); - mPrevButton.setTextColor(resources.getColor(R.color.white)); - } else { - mButtonBar.setBackgroundResource(R.color.button_bar_background); - mNextButton.setCompoundDrawablesWithIntrinsicBounds(null, null, - getDrawable(R.drawable.ic_chevron_right_dark), null); - mNextButton.setTextColor(resources.getColorStateList(R.color.button_bar_text)); - mPrevButton.setTextColor(resources.getColorStateList(R.color.button_bar_text)); - } + mButtonBar.setBackgroundResource(R.color.button_bar_background); + mNextButton.setCompoundDrawablesWithIntrinsicBounds(null, null, + getDrawable(R.drawable.ic_chevron_right_dark), null); + mNextButton.setTextColor(resources.getColorStateList(R.color.button_bar_text)); + mPrevButton.setTextColor(resources.getColorStateList(R.color.button_bar_text)); } @Override diff --git a/src/com/cyanogenmod/setupwizard/ui/WebViewDialogFragment.java b/src/com/cyanogenmod/setupwizard/ui/WebViewDialogFragment.java deleted file mode 100644 index 46f22ae..0000000 --- a/src/com/cyanogenmod/setupwizard/ui/WebViewDialogFragment.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2013 The CyanogenMod Project - * - * 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.ui; - -import android.app.AlertDialog; -import android.app.Dialog; -import android.app.DialogFragment; -import android.content.DialogInterface; -import android.os.Bundle; -import android.view.View; -import android.webkit.WebView; -import android.webkit.WebViewClient; - -import com.cyanogenmod.setupwizard.R; - -public class WebViewDialogFragment extends DialogFragment { - - public static String TAG = WebViewDialogFragment.class.getSimpleName(); - - private View mRootView; - private WebView mWebView; - private String mUri; - private Dialog mDialog; - - public static WebViewDialogFragment newInstance() { - return new WebViewDialogFragment(); - } - - public WebViewDialogFragment() { - - } - - public WebViewDialogFragment setUri(String uri) { - mUri = uri; - return this; - } - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setRetainInstance(true); - mRootView = getActivity().getLayoutInflater().inflate(R.layout.terms_webview, null, false); - mWebView = (WebView)mRootView.findViewById(R.id.webview); - mWebView.setWebViewClient(new WebViewClient() { - @Override - public boolean shouldOverrideUrlLoading(WebView view, String url) { - return false; - } - }); - mWebView.getSettings().setJavaScriptEnabled(true); - mWebView.getSettings().setUseWideViewPort(true); - mWebView.loadUrl(mUri); - } - - @Override - public Dialog onCreateDialog(Bundle savedInstanceState) { - if (mDialog == null) { - mDialog =new AlertDialog.Builder(getActivity()) - .setView(mRootView) - .setCancelable(false) - .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialogInterface, int i) { - dialogInterface.dismiss(); - } - }) - .create(); - } - return mDialog; - } -} - |