Skip to content

Commit 4daa734

Browse files
authored
Set background of Input Mode Widget (#6741)
Task/Issue URL: https://app.asana.com/1/137249556945/project/1200204095367872/task/1211244094853968?focus=true ### Description - Fixes an issue where content is visible behind the input when scrolling under certain scenarios. ### Steps to test this PR - [x] Fresh install - [x] Submit “hello" search query - [x] Tap the omnibar again - [x] With the “Same privacy…” card visible, scroll up - [x] Verify that the content does not scroll under the Input Mode Widget
1 parent e31c380 commit 4daa734

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item>
4+
<shape>
5+
<gradient
6+
android:angle="270"
7+
android:centerColor="?attr/daxColorBackground"
8+
android:centerY="0.8"
9+
android:endColor="@android:color/transparent"
10+
android:startColor="?attr/daxColorBackground"
11+
android:type="linear" />
12+
</shape>
13+
</item>
14+
</layer-list>

duckchat/duckchat-impl/src/main/res/layout/fragment_input_screen.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
android:id="@+id/inputModeWidget"
2626
android:layout_width="0dp"
2727
android:layout_height="wrap_content"
28-
android:layout_marginTop="@dimen/keyline_2"
2928
android:elevation="1dp"
3029
app:layout_constraintEnd_toEndOf="parent"
3130
app:layout_constraintStart_toStartOf="parent"

duckchat/duckchat-impl/src/main/res/layout/view_input_mode_switch_widget.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,22 @@
22
xmlns:app="http://schemas.android.com/apk/res-auto"
33
android:theme="@style/Widget.DuckDuckGo.ToolbarTheme">
44

5+
<View
6+
android:id="@+id/backgroundLayer"
7+
android:layout_width="0dp"
8+
android:layout_height="0dp"
9+
android:background="@drawable/input_mode_widget_background_gradient"
10+
app:layout_constraintTop_toTopOf="parent"
11+
app:layout_constraintStart_toStartOf="parent"
12+
app:layout_constraintEnd_toEndOf="parent"
13+
app:layout_constraintBottom_toBottomOf="parent" />
14+
515
<com.duckduckgo.duckchat.impl.inputscreen.ui.view.InputModeTabLayout
616
android:id="@+id/inputModeSwitch"
717
style="@style/Widget.DuckChat.TabLayout.Rounded"
818
android:layout_width="wrap_content"
919
android:layout_height="@dimen/inputModeSwitchHeight"
20+
android:layout_marginTop="@dimen/keyline_2"
1021
app:layout_constraintStart_toStartOf="parent"
1122
app:layout_constraintEnd_toEndOf="parent"
1223
app:layout_constraintTop_toTopOf="parent"

0 commit comments

Comments
 (0)