Commit 62497220 authored by Matthew Finkel's avatar Matthew Finkel Committed by Matthew Finkel
Browse files

Bug 28329 - Part 4. Add new Tor Bootstrapping and configuration screens

Also:
Bug 30214 - Kill background thread when Activity is null
Bug 30239 - Render Fragments after crash
Bug 29982 - Force single-pane UI on Tor Preferences
parent d2bae648
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -63,6 +63,11 @@
                          android:layout_width="match_parent"
                          android:layout_height="match_parent"/>

                <ViewStub android:id="@+id/tor_bootstrap_pager_stub"
                          android:layout="@layout/tor_bootstrap_animation_container"
                          android:layout_width="match_parent"
                          android:layout_height="match_parent"/>

            </FrameLayout>

            <View android:id="@+id/doorhanger_overlay"
+25 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>

<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/.  -->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:minHeight="?android:attr/listPreferredItemHeight"
              android:gravity="center_vertical" >
    <TextView xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/tor_network_bridge_summary"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingTop="30sp"
        android:paddingBottom="30sp"
        android:paddingLeft="20sp"
        android:paddingRight="20sp"
        android:textSize="16sp"
        android:fontFamily="Roboto-Regular"
        android:textColor="#DE000000"
        android:lineSpacingMultiplier="1.43"
        android:text="@string/pref_category_tor_bridge_summary" />
</LinearLayout>
+85 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2006 The Android Open Source 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.
-->
<!-- Layout for a Preference in a PreferenceActivity. The
     Preference is able to place a specific widget for its particular
     type in the "widget_frame" layout.
     This is a modified version of the default Android Preference layout,
     See: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/pie-release/core/res/res/layout/preference.xml
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?android:attr/listPreferredItemHeight"
    android:gravity="center_vertical"
    android:paddingEnd="?android:attr/scrollbarSize"
    android:orientation="vertical"
    android:background="?android:attr/selectableItemBackground" >
    <TextView xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/tor_network_configuration_summary"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingTop="30sp"
        android:paddingBottom="30sp"
        android:paddingLeft="20sp"
        android:paddingRight="20sp"
        android:textSize="16sp"
        android:fontFamily="Roboto-Regular"
        android:textColor="#DE000000"
        android:lineSpacingMultiplier="1.43"
        android:text="@string/pref_category_tor_network_summary" />
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center_vertical" >
        <ImageView
            android:id="@+android:id/icon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            />
        <RelativeLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="15dp"
            android:layout_marginEnd="6dp"
            android:layout_marginTop="6dp"
            android:layout_marginBottom="12dp"
            android:layout_weight="1">
            <TextView android:id="@+android:id/title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:singleLine="true"
                android:fontFamily="Roboto-Regular"
                android:textSize="20sp"
                android:textColor="#DE000000"
                android:ellipsize="marquee"
                android:fadingEdge="horizontal" />
            <TextView android:id="@+android:id/summary"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@android:id/title"
                android:layout_alignStart="@android:id/title"
                android:fontFamily="Roboto-Regular"
                android:textSize="16sp"
                android:textColorLink="#8000FF"
                android:clickable="true"
                android:focusable="false"
                android:maxLines="2" />
        </RelativeLayout>
        <!-- Preference should place its actual preference widget here. -->
        <LinearLayout android:id="@+android:id/widget_frame"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center_vertical" />
    </LinearLayout>
</LinearLayout>
+15 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>

<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/.  -->

<Switch xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+android:id/switch_widget"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:focusable="false"
    android:clickable="true"
    android:thumbTint="@color/tor_bridges_enabled_colors"
    android:trackTint="@color/tor_bridges_enabled_colors"
    android:background="@null" />
+89 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>

<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/.  -->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:minHeight="?android:attr/listPreferredItemHeight"
              android:orientation="vertical"
              android:paddingEnd="?android:attr/scrollbarSize"
              android:gravity="center_vertical"
              android:background="?android:attr/selectableItemBackground" >
    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingLeft="16sp"
        android:paddingRight="16sp"
        android:orientation="vertical" >
        <TextView android:id="@+android:id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:fontFamily="Roboto-Regular"
            android:textSize="20sp"
            android:textColor="#DE000000"
            android:singleLine="true"
            android:ellipsize="marquee"
            android:fadingEdge="horizontal" />
        <TextView android:id="@+android:id/summary"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingBottom="30sp"
            android:fontFamily="Roboto-Regular"
            android:textSize="16sp"
            android:maxLines="4" />
        <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:minHeight="?android:attr/listPreferredItemHeight"
                      android:gravity="center_vertical"
                      android:orientation="vertical" >
            <EditText
                android:id="@+id/tor_network_provide_bridge1"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="10dp"
                android:inputType="text"
                android:textSize="20sp"
                android:fontFamily="Roboto-Regular"
                android:paddingTop="22sp"
                android:paddingLeft="16sp"
                android:paddingBottom="22sp"
                android:background="#DCDCDC"
                android:hint="@string/pref_tor_bridges_provide_manual_address_port_placeholder" />
            <EditText
                android:id="@+id/tor_network_provide_bridge2"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="10dp"
                android:inputType="text"
                android:textSize="20sp"
                android:fontFamily="Roboto-Regular"
                android:paddingTop="22sp"
                android:paddingLeft="16sp"
                android:paddingBottom="22sp"
                android:background="#DCDCDC"
                android:hint="@string/pref_tor_bridges_provide_manual_address_port_placeholder" />
            <EditText
                android:id="@+id/tor_network_provide_bridge3"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:inputType="text"
                android:textSize="20sp"
                android:fontFamily="Roboto-Regular"
                android:paddingTop="22sp"
                android:paddingLeft="16sp"
                android:paddingBottom="22sp"
                android:background="#DCDCDC"
                android:hint="@string/pref_tor_bridges_provide_manual_address_port_placeholder" />
        </LinearLayout>
    </LinearLayout>
    <LinearLayout android:id="@+android:id/widget_frame"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:gravity="center_vertical"
        android:orientation="vertical">
    </LinearLayout>
</LinearLayout>
Loading