-
Notifications
You must be signed in to change notification settings - Fork 903
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Uplift of #6795 (squashed) to release
- Loading branch information
1 parent
dc8ba0e
commit b18a6ce
Showing
3 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
browser/touch_to_fill/android/internal/java/res/layout/touch_to_fill_header_item.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright 2020 The Brave Authors. All rights reserved. | ||
Use of this source code is governed by a BSD-style license that can be | ||
found in the LICENSE file. --> | ||
|
||
<!-- Please update R.dimens.touch_to_fill_sheet_height_single_credential | ||
when modifying the margins image or text sizes. --> | ||
<LinearLayout | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_height="wrap_content" | ||
android:layout_width="match_parent" | ||
android:layout_marginBottom="16dp" | ||
android:orientation="vertical"> | ||
|
||
<!-- <ImageView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_horizontal" | ||
android:importantForAccessibility="no" | ||
app:srcCompat="@drawable/touch_to_fill_header_image" /> --> | ||
|
||
<org.chromium.ui.widget.TextViewWithLeading | ||
android:id="@+id/touch_to_fill_sheet_title" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_horizontal" | ||
android:textAppearance="@style/TextAppearance.Headline.Primary" /> | ||
|
||
<org.chromium.ui.widget.TextViewWithLeading | ||
android:id="@+id/touch_to_fill_sheet_subtitle" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_horizontal" | ||
android:textAppearance="@style/TextAppearance.TextMedium.Secondary" /> | ||
</LinearLayout> |
35 changes: 35 additions & 0 deletions
35
browser/touch_to_fill/android/internal/java/res/values/dimens.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright 2020 The Brave Authors. All rights reserved. | ||
Use of this source code is governed by a BSD-style license that can be | ||
found in the LICENSE file. --> | ||
|
||
<resources> | ||
<dimen name="touch_to_fill_favicon_size">24dp</dimen> | ||
<dimen name="touch_to_fill_sheet_margin">16dp</dimen> | ||
|
||
<!-- Below are the different Half-state peeking heights. The height is the | ||
sum of all components. It varies depending on the suggestion count. The | ||
base height is 298dp: | ||
Bottom sheet shadows and padding (18dp) | ||
+ Handlebar (16dp) | ||
+ Title size and margin (48+16dp) | ||
+ First suggestion (72dp) --> | ||
<dimen name="touch_to_fill_sheet_height_single_credential">170dp</dimen> | ||
|
||
<!-- Top padding between RecyclerView elements (8 dp) | ||
+ Extra suggestion height (72 dp). --> | ||
<dimen name="touch_to_fill_sheet_height_second_credential">80dp</dimen> | ||
|
||
<!-- Top padding between RecyclerView elements (8 dp) | ||
+ Top margin (2 dp) | ||
+ button height (48 dp) | ||
+ Bottom margin (2 dp) --> | ||
<dimen name="touch_to_fill_sheet_height_button">60dp</dimen> | ||
|
||
<!-- Depending on the experiments that are active we might show a call to | ||
action button or branding message to the users, at which point we need | ||
different bottom paddings. They are exposed here, so that they can be | ||
added dynamically, depending on the state of the experiments. --> | ||
<dimen name="touch_to_fill_sheet_bottom_padding_credentials">16dp</dimen> | ||
<dimen name="touch_to_fill_sheet_bottom_padding_button">8dp</dimen> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters