Skip to content

Commit

Permalink
Merge pull request #78 from Linfye/remove-cog
Browse files Browse the repository at this point in the history
Remove settings cog
  • Loading branch information
andrewtavis authored Sep 5, 2024
2 parents 9693b6e + 41046e1 commit 780041b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 60 deletions.
18 changes: 2 additions & 16 deletions app/src/main/java/be/scri/views/MyKeyboardView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
topKeyboardDivider.background = ColorDrawable(strokeColor)

background = ColorDrawable(toolbarColor)
settingsCog.applyColorFilter(mTextColor)
}
}
}
Expand Down Expand Up @@ -352,25 +351,12 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut

mToolbarHolder?.let { toolbarHolder ->
_keyboardBinding?.let { binding ->
binding.settingsCog?.apply {
setOnLongClickListener {
context?.toast(R.string.settings)
true
}
setOnClickListener {
context?.let { ctx ->
vibrateIfNeeded()
Intent(ctx, SettingsFragment::class.java).apply {
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
ctx.startActivity(this)
}
}
}
}
}

}
}


fun vibrateIfNeeded() {
if (context.config.vibrateOnKeypress) {
performHapticFeedback()
Expand Down
16 changes: 1 addition & 15 deletions app/src/main/res/layout-land/keyboard_view_keyboard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,12 @@
android:background="@drawable/cmd_bar_background_right_rounded"
android:contentDescription="@string/command_bar"
app:layout_constraintBottom_toBottomOf="@+id/command_field"
app:layout_constraintEnd_toStartOf="@+id/settings_cog"
app:layout_constraintEnd_toEndOf="@+id/command_field"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintHorizontal_weight="84"
app:layout_constraintStart_toEndOf="@+id/scribe_key"
app:layout_constraintTop_toTopOf="@+id/command_field" />

<ImageView
android:id="@+id/settings_cog"
android:layout_width="@dimen/toolbar_icon_height"
android:layout_height="@dimen/toolbar_icon_height"
android:layout_marginEnd="@dimen/small_margin"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/settings"
android:padding="@dimen/tiny_margin"
android:src="@drawable/ic_settings_cog_vector"
app:layout_constraintBottom_toBottomOf="@+id/command_field"
app:layout_constraintEnd_toEndOf="@+id/command_field"
app:layout_constraintStart_toEndOf="@+id/command_bar"
app:layout_constraintTop_toTopOf="@+id/command_field" />

<ImageView
android:id="@+id/top_keyboard_divider"
android:layout_width="match_parent"
Expand Down
16 changes: 2 additions & 14 deletions app/src/main/res/layout/keyboard_view_command_options.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,25 +92,13 @@
android:background="@drawable/cmd_key_background_rounded"
android:contentDescription="@string/command_bar"
app:layout_constraintBottom_toBottomOf="@+id/command_field"
app:layout_constraintEnd_toStartOf="@+id/settings_cog"
app:layout_constraintEnd_toEndOf="@+id/command_field"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintHorizontal_weight="27"
app:layout_constraintStart_toEndOf="@+id/separator_3"
app:layout_constraintTop_toTopOf="@+id/command_field" />

<ImageView
android:id="@+id/settings_cog"
android:layout_width="@dimen/toolbar_icon_height"
android:layout_height="@dimen/toolbar_icon_height"
android:layout_marginEnd="@dimen/small_margin"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/settings"
android:padding="@dimen/tiny_margin"
android:src="@drawable/ic_settings_cog_vector"
app:layout_constraintBottom_toBottomOf="@+id/command_field"
app:layout_constraintEnd_toEndOf="@+id/command_field"
app:layout_constraintStart_toEndOf="@+id/plural_btn"
app:layout_constraintTop_toTopOf="@+id/command_field" />


<ImageView
android:id="@+id/top_keyboard_divider"
Expand Down
16 changes: 1 addition & 15 deletions app/src/main/res/layout/keyboard_view_keyboard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,12 @@
android:background="@drawable/cmd_bar_background_right_rounded"
android:contentDescription="@string/command_bar"
app:layout_constraintBottom_toBottomOf="@+id/command_field"
app:layout_constraintEnd_toStartOf="@+id/settings_cog"
app:layout_constraintEnd_toEndOf="@+id/command_field"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintHorizontal_weight="84"
app:layout_constraintStart_toEndOf="@+id/scribe_key"
app:layout_constraintTop_toTopOf="@+id/command_field" />

<ImageView
android:id="@+id/settings_cog"
android:layout_width="@dimen/toolbar_icon_height"
android:layout_height="@dimen/toolbar_icon_height"
android:layout_marginEnd="@dimen/small_margin"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/settings"
android:padding="@dimen/tiny_margin"
android:src="@drawable/ic_settings_cog_vector"
app:layout_constraintBottom_toBottomOf="@+id/command_field"
app:layout_constraintEnd_toEndOf="@+id/command_field"
app:layout_constraintStart_toEndOf="@+id/command_bar"
app:layout_constraintTop_toTopOf="@+id/command_field" />

<ImageView
android:id="@+id/top_keyboard_divider"
android:layout_width="match_parent"
Expand Down

0 comments on commit 780041b

Please sign in to comment.