Commit bb0f2929 authored by Igor Oliveira's avatar Igor Oliveira Committed by Georg Koppen
Browse files

Bug 25696 - Design of alpha onboarding for Tor Browser for Android

- Update description copy and background color.
parent 56045608
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
    <LinearLayout android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:minHeight="@dimen/firstrun_min_height"
                  android:background="@android:color/white"
                  android:background="@color/tor_description_background_text"
                  android:gravity="center_horizontal"
                  android:orientation="vertical">

+1 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@

    <color name="tor_tab_inactive_text">#484848</color>
    <color name="tor_tab_active_text">#7D4698</color>
    <color name="tor_description_background_text">#FAFAFA</color>
    <!-- Restricted profiles palette -->

    <color name="restricted_profile_background_gold">#ffffcb51</color>
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ public class FirstrunPagerConfig {
    public static final String KEY_IMAGE = "imageRes";
    public static final String KEY_TEXT = "textRes";
    public static final String KEY_SUBTEXT = "subtextRes";
    public static final String KEY_CTATEXT = "ctatextRes";

   public static List<FirstrunPanelConfig> getDefault(Context context) {
        final List<FirstrunPanelConfig> panels = new LinkedList<>();
+2 −0
Original line number Diff line number Diff line
@@ -35,10 +35,12 @@ public class FirstrunPanel extends Fragment {
            final int imageRes = args.getInt(FirstrunPagerConfig.KEY_IMAGE);
            final int textRes = args.getInt(FirstrunPagerConfig.KEY_TEXT);
            final int subtextRes = args.getInt(FirstrunPagerConfig.KEY_SUBTEXT);
            final int ctatextRes = args.getInt(FirstrunPagerConfig.KEY_CTATEXT);

            ((ImageView) root.findViewById(R.id.firstrun_image)).setImageResource(imageRes);
            ((TextView) root.findViewById(R.id.firstrun_text)).setText(textRes);
            ((TextView) root.findViewById(R.id.firstrun_subtext)).setText(subtextRes);
            ((TextView) root.findViewById(R.id.firstrun_link)).setText(ctatextRes);
        }

        root.findViewById(R.id.firstrun_link).setOnClickListener(new View.OnClickListener() {
+10 −6
Original line number Diff line number Diff line
@@ -23,12 +23,14 @@ public class FirstrunTorPagerConfig {
    public static final String KEY_IMAGE = "imageRes";
    public static final String KEY_TEXT = "textRes";
    public static final String KEY_SUBTEXT = "subtextRes";
    public static final String KEY_CTATEXT = "ctatextRes";

    public static List<FirstrunTorPanelConfig> getDefault(Context context) {
       final List<FirstrunTorPanelConfig> panels = new LinkedList<>();
       panels.add(SimplePanelConfigs.welcomeTorPanelConfig);
       panels.add(SimplePanelConfigs.privacyPanelConfig);
       panels.add(SimplePanelConfigs.torNetworkPanelConfig);
       panels.add(SimplePanelConfigs.secSettingsPanelConfig);
       panels.add(SimplePanelConfigs.tipsPanelConfig);
       panels.add(SimplePanelConfigs.onionServicesPanelConfig);

@@ -41,7 +43,7 @@ public class FirstrunTorPagerConfig {
        private int titleRes;
        private Bundle args;

        public FirstrunTorPanelConfig(String classname, int titleRes, int imageRes, int textRes, int subtextRes) {
        public FirstrunTorPanelConfig(String classname, int titleRes, int imageRes, int textRes, int subtextRes, int ctatextRes) {
            this.classname = classname;
            this.titleRes = titleRes;

@@ -49,6 +51,7 @@ public class FirstrunTorPagerConfig {
            this.args.putInt(KEY_IMAGE, imageRes);
            this.args.putInt(KEY_TEXT, textRes);
            this.args.putInt(KEY_SUBTEXT, subtextRes);
            this.args.putInt(KEY_CTATEXT, ctatextRes);
        }

        public String getClassname() {
@@ -65,10 +68,11 @@ public class FirstrunTorPagerConfig {
    }

    private static class SimplePanelConfigs {
        public static final FirstrunTorPanelConfig welcomeTorPanelConfig = new FirstrunTorPanelConfig(FirstrunPanel.class.getName(), R.string.firstrun_welcome_tab_title, R.drawable.figure_welcome, R.string.firstrun_welcome_title, R.string.firstrun_welcome_message);
        public static final FirstrunTorPanelConfig privacyPanelConfig = new FirstrunTorPanelConfig(FirstrunPanel.class.getName(), R.string.firstrun_privacy_tab_title, R.drawable.figure_privacy, R.string.firstrun_privacy_title, R.string.firstrun_privacy_message);
        public static final FirstrunTorPanelConfig torNetworkPanelConfig = new FirstrunTorPanelConfig(FirstrunPanel.class.getName(), R.string.firstrun_tornetwork_tab_title, R.drawable.figure_network, R.string.firstrun_tornetwork_title, R.string.firstrun_tornetwork_message);
        public static final FirstrunTorPanelConfig tipsPanelConfig = new FirstrunTorPanelConfig(FirstrunPanel.class.getName(), R.string.firstrun_tips_tab_title, R.drawable.figure_experience, R.string.firstrun_tips_title, R.string.firstrun_tips_message);
        public static final FirstrunTorPanelConfig onionServicesPanelConfig = new FirstrunTorPanelConfig(LastPanel.class.getName(), R.string.firstrun_onionservices_tab_title, R.drawable.figure_onion, R.string.firstrun_onionservices_title, R.string.firstrun_onionservices_message);
        public static final FirstrunTorPanelConfig welcomeTorPanelConfig = new FirstrunTorPanelConfig(FirstrunPanel.class.getName(), R.string.firstrun_welcome_tab_title, R.drawable.figure_welcome, R.string.firstrun_welcome_title, R.string.firstrun_welcome_message, R.string.firstrun_welcome_next);
        public static final FirstrunTorPanelConfig privacyPanelConfig = new FirstrunTorPanelConfig(FirstrunPanel.class.getName(), R.string.firstrun_privacy_tab_title, R.drawable.figure_privacy, R.string.firstrun_privacy_title, R.string.firstrun_privacy_message, R.string.firstrun_privacy_next);
        public static final FirstrunTorPanelConfig torNetworkPanelConfig = new FirstrunTorPanelConfig(FirstrunPanel.class.getName(), R.string.firstrun_tornetwork_tab_title, R.drawable.figure_network, R.string.firstrun_tornetwork_title, R.string.firstrun_tornetwork_message, R.string.firstrun_tornetwork_next);
        public static final FirstrunTorPanelConfig secSettingsPanelConfig = new FirstrunTorPanelConfig(FirstrunPanel.class.getName(), R.string.firstrun_secsettings_tab_title, R.drawable.figure_security, R.string.firstrun_secsettings_title, R.string.firstrun_secsettings_message, R.string.firstrun_secsettings_next);
        public static final FirstrunTorPanelConfig tipsPanelConfig = new FirstrunTorPanelConfig(FirstrunPanel.class.getName(), R.string.firstrun_tips_tab_title, R.drawable.figure_experience, R.string.firstrun_tips_title, R.string.firstrun_tips_message, R.string.firstrun_tips_next);
        public static final FirstrunTorPanelConfig onionServicesPanelConfig = new FirstrunTorPanelConfig(LastPanel.class.getName(), R.string.firstrun_onionservices_tab_title, R.drawable.figure_onion, R.string.firstrun_onionservices_title, R.string.firstrun_onionservices_message, R.string.firstrun_onionservices_next);
    }
}
Loading