Skip to content

Commit 6346072

Browse files
Took the easy way out :)
1 parent 60b56e1 commit 6346072

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

app/src/main/java/com/blurr/voice/triggers/ui/CreateTriggerActivity.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ class CreateTriggerActivity : AppCompatActivity() {
5252
timePicker = findViewById(R.id.timePicker)
5353
appsRecyclerView = findViewById(R.id.appsRecyclerView)
5454
dayOfWeekChipGroup = findViewById(R.id.dayOfWeekChipGroup)
55-
scrollView = findViewById(R.id.scrollView)
56-
57-
instructionEditText.setOnFocusChangeListener { view, hasFocus ->
58-
if (hasFocus) {
59-
// Delay scrolling until the keyboard is likely to be visible
60-
view.postDelayed({
61-
scrollView.smoothScrollTo(0, view.bottom)
62-
}, 200)
63-
}
64-
}
55+
// scrollView = findViewById(R.id.scrollView)
56+
57+
// instructionEditText.setOnFocusChangeListener { view, hasFocus ->
58+
// if (hasFocus) {
59+
// // Delay scrolling until the keyboard is likely to be visible
60+
// view.postDelayed({
61+
// scrollView.smoothScrollTo(0, view.bottom)
62+
// }, 200)
63+
// }
64+
// }
6565

6666
// Set default checked state for all day chips
6767
for (i in 0 until dayOfWeekChipGroup.childCount) {

app/src/main/res/layout/activity_create_trigger.xml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,24 @@
4444
android:layout_height="wrap_content"
4545
android:theme="@style/AppTheme.NumberPicker"
4646
android:timePickerMode="spinner" />
47+
<TextView
48+
style="@style/PermissionHeading"
49+
android:text="Task Instruction" />
50+
51+
<EditText
52+
android:id="@+id/instructionEditText"
53+
android:layout_width="match_parent"
54+
android:layout_height="wrap_content"
55+
android:background="@drawable/edit_text_border"
56+
android:hint="e.g., 'Read the notification'"
57+
android:inputType="textMultiLine"
58+
android:minLines="2"
59+
android:maxLines="5"
60+
android:scrollbars="vertical"
61+
android:gravity="top"
62+
android:padding="12dp"
63+
android:textColor="@color/white"
64+
android:textColorHint="#8A8A8E" />
4765

4866
<TextView
4967
style="@style/PermissionHeading"
@@ -85,24 +103,6 @@
85103
tools:listitem="@layout/item_app" />
86104
</LinearLayout>
87105

88-
<TextView
89-
style="@style/PermissionHeading"
90-
android:text="Task Instruction" />
91-
92-
<EditText
93-
android:id="@+id/instructionEditText"
94-
android:layout_width="match_parent"
95-
android:layout_height="wrap_content"
96-
android:background="@drawable/edit_text_border"
97-
android:hint="e.g., 'Read the notification'"
98-
android:inputType="textMultiLine"
99-
android:minLines="2"
100-
android:maxLines="5"
101-
android:scrollbars="vertical"
102-
android:gravity="top"
103-
android:padding="12dp"
104-
android:textColor="@color/white"
105-
android:textColorHint="#8A8A8E" />
106106

107107
<Button
108108
android:id="@+id/saveTriggerButton"

0 commit comments

Comments
 (0)