Add domains `Snackbars` and ghosting of switches.
[PrivacyBrowser.git] / app / src / main / res / layout / domain_settings.xml
index 1ea1417c46723b2a21824e0649911018787a8ecb..7485ef0063878a10972fd525d0f8b3bccc241ae7 100644 (file)
         <LinearLayout
             android:layout_height="wrap_content"
             android:layout_width="match_parent"
-            android:orientation="horizontal" >
-
-            <ImageView
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:layout_marginBottom="26dp"
-                android:layout_marginEnd="10dp"
-                android:layout_gravity="bottom"
-                android:src="@drawable/domains"
-                android:tint="@color/blue_800"
-                tools:ignore="contentDescription" />
+            android:orientation="vertical">
 
-            <!-- `android.support.design.widget.TextInputLayout` makes the `android:hint` float above the `EditText`. -->
-            <android.support.design.widget.TextInputLayout
+            <LinearLayout
                 android:layout_height="wrap_content"
                 android:layout_width="match_parent"
-                android:layout_marginStart="6dp"
-                android:layout_marginBottom="14dp" >
+                android:orientation="horizontal" >
 
-                <!-- `android:inputType="textUri"` disables spell check in the `EditText`. -->
-                <android.support.design.widget.TextInputEditText
-                    android:id="@+id/domain_settings_name_edittext"
-                    android:layout_width="match_parent"
+                <ImageView
                     android:layout_height="wrap_content"
-                    android:hint="@string/domain_name"
-                    android:inputType="textUri" />
-            </android.support.design.widget.TextInputLayout>
+                    android:layout_width="wrap_content"
+                    android:layout_marginEnd="10dp"
+                    android:layout_marginBottom="12dp"
+                    android:layout_gravity="bottom"
+                    android:src="@drawable/domains"
+                    android:tint="@color/blue_800"
+                    tools:ignore="contentDescription" />
+
+                <!-- `android.support.design.widget.TextInputLayout` makes the `android:hint` float above the `EditText`. -->
+                <android.support.design.widget.TextInputLayout
+                    android:layout_height="wrap_content"
+                    android:layout_width="match_parent"
+                    android:layout_marginStart="6dp" >
+
+                    <!-- `android:inputType="textUri"` disables spell check in the `EditText`. -->
+                    <android.support.design.widget.TextInputEditText
+                        android:id="@+id/domain_settings_name_edittext"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:hint="@string/domain_name"
+                        android:inputType="textUri" />
+                </android.support.design.widget.TextInputLayout>
+            </LinearLayout>
+
+            <TextView
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                android:text="@string/domain_name_instructions"
+                android:textSize="12sp"
+                android:layout_marginStart="43dp"
+                android:layout_marginBottom="14dp" />
         </LinearLayout>
 
         <!-- JavaScript. -->
                 android:layout_marginTop="1dp"
                 android:layout_marginEnd="10dp"
                 android:layout_gravity="center_vertical"
-                android:src="@drawable/cookies_enabled"
-                android:tint="@color/domain_settings_icon_yellow_tint_selector"
+                android:src="@drawable/cookies_disabled"
                 tools:ignore="contentDescription" />
 
             <Switch
 
         <!-- Third-Party Cookies. -->
         <LinearLayout
+            android:id="@+id/domain_settings_third_party_cookies_linearlayout"
             android:layout_height="wrap_content"
             android:layout_width="match_parent"
             android:orientation="horizontal" >
                 android:layout_marginTop="1dp"
                 android:layout_marginEnd="10dp"
                 android:layout_gravity="center_vertical"
-                android:src="@drawable/cookies_enabled"
-                android:tint="@color/domain_settings_icon_red_tint_selector"
+                android:src="@drawable/cookies_disabled"
                 tools:ignore="contentDescription" />
 
             <Switch
                 android:layout_marginTop="1dp"
                 android:layout_marginEnd="10dp"
                 android:layout_gravity="center_vertical"
-                android:src="@drawable/dom_storage_enabled"
-                android:tint="@color/domain_settings_icon_yellow_tint_selector"
+                android:src="@drawable/dom_storage_disabled"
                 tools:ignore="contentDescription" />
 
             <Switch
                 android:layout_marginTop="1dp"
                 android:layout_marginEnd="10dp"
                 android:layout_gravity="center_vertical"
-                android:src="@drawable/form_data_enabled"
-                android:tint="@color/domain_settings_icon_yellow_tint_selector"
+                android:src="@drawable/form_data_disabled"
                 tools:ignore="contentDescription" />
 
             <Switch