[Android][Custom Search Engines] Design improvements (#36248)
* [Android][Custom Search Engines] Design improvements * Applied review suggestions
This commit is contained in:
@@ -64,5 +64,8 @@ android_resources("java_resources") {
|
||||
"java/res/values/dimens.xml",
|
||||
"java/res/values/styles.xml",
|
||||
]
|
||||
deps = [ "//brave/build/android:android_brave_strings_grd" ]
|
||||
deps = [
|
||||
"//brave/android/nala:java_resources",
|
||||
"//brave/build/android:android_brave_strings_grd",
|
||||
]
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
You can obtain one at https://mozilla.org/MPL/2.0/. -->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="false" android:alpha="0.2" android:color="@color/button_disabled"/>
|
||||
<item android:state_enabled="false" android:color="@color/button_disabled"/>
|
||||
<item android:color="@color/button_background"/>
|
||||
</selector>
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="false" android:alpha="0.5" android:color="@color/text_disabled"/>
|
||||
<item android:state_enabled="false" android:color="@color/text_disabled"/>
|
||||
<item android:color="@color/schemes_on_primary"/>
|
||||
</selector>
|
||||
|
||||
@@ -8,14 +8,10 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- Disabled state -->
|
||||
<item android:state_enabled="false">
|
||||
<layer-list>
|
||||
<item android:alpha="0.2">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="1000dp"/>
|
||||
<solid android:color="@color/button_disabled"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="1000dp"/>
|
||||
<solid android:color="@color/button_disabled"/>
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!-- Enabled state -->
|
||||
|
||||
+2
-2
@@ -8,8 +8,9 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="48dp"
|
||||
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
@@ -17,7 +18,6 @@
|
||||
android:id="@+id/add_custom_search_engine_footer_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="14dp"
|
||||
android:text="@string/add_custom_search_engine"
|
||||
style="@style/AddCustomSearchEngineItemTitle"/>
|
||||
|
||||
|
||||
+17
-16
@@ -96,26 +96,15 @@
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_margin="24dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/cancel_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cancel_action_text"
|
||||
android:textAllCaps="false"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:textColor="@color/schemes_on_surface_variant"
|
||||
style="?android:attr/borderlessButtonStyle"/>
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/add_search_engine_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/add_search_engine"
|
||||
android:textAllCaps="false"
|
||||
@@ -127,6 +116,18 @@
|
||||
app:elevation="0dp"
|
||||
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/cancel_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/cancel_action_text"
|
||||
android:textAllCaps="false"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="@color/schemes_on_surface_variant"
|
||||
style="?android:attr/borderlessButtonStyle"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
@@ -55,9 +57,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_edit_pencil"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:contentDescription="@null"
|
||||
android:layout_marginVertical="12dp"
|
||||
android:layout_marginStart="8dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
Reference in New Issue
Block a user