Skip to content

Commit

Permalink
Merge pull request #233 from Linfye/language-settings-ui
Browse files Browse the repository at this point in the history
Fix language settings UI issues
  • Loading branch information
andrewtavis authored Oct 30, 2024
2 parents e627562 + b3bdb24 commit bf7d0b4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 58 deletions.
27 changes: 1 addition & 26 deletions app/src/main/java/be/scri/fragments/LanguageSettingsFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -234,32 +234,7 @@ class LanguageSettingsFragment : Fragment() {
)
}
}
list.add(
SwitchItem(
isChecked = sharedPref.getBoolean("period_on_double_tap_$language", false),
title = getString(R.string.app_settings_keyboard_functionality_double_space_period),
description = getString(R.string.app_settings_keyboard_functionality_double_space_period_description),
action = {
PreferencesHelper.setPeriodOnSpaceBarDoubleTapPreference(requireContext(), language, true)
},
action2 = {
PreferencesHelper.setPeriodOnSpaceBarDoubleTapPreference(requireContext(), language, false)
},
),
)
list.add(
SwitchItem(
isChecked = sharedPref.getBoolean("emoji_suggestions_$language", true),
title = getString(R.string.app_settings_keyboard_functionality_auto_suggest_emoji),
description = getString(R.string.app_settings_keyboard_functionality_auto_suggest_emoji_description),
action = {
PreferencesHelper.setEmojiAutoSuggestionsPreference(requireContext(), language, true)
},
action2 = {
PreferencesHelper.setEmojiAutoSuggestionsPreference(requireContext(), language, false)
},
),
)

list.add(
SwitchItem(
isChecked = sharedPref.getBoolean("period_and_comma_$language", false),
Expand Down
11 changes: 0 additions & 11 deletions app/src/main/res/drawable/vector.xml

This file was deleted.

30 changes: 13 additions & 17 deletions app/src/main/res/layout/fragment_language_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@
android:textColor="@color/app_text_color"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/layoutRecyclerView"
app:layout_constraintBottom_toTopOf="@id/functionalityRecyclerView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.054"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.022" />

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/functionalityRecyclerView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:layout_marginTop="20dp"
android:padding="12dp"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/layoutRecyclerView" />

<TextView
android:id="@+id/layoutSettingsTitle"
Expand All @@ -45,28 +45,24 @@
android:textColor="@color/app_text_color"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@id/functionalityRecyclerView"
app:layout_constraintBottom_toTopOf="@id/layoutRecyclerView"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.054"
app:layout_constraintStart_toStartOf="parent"

app:layout_constraintVertical_bias="0.022" />




<androidx.recyclerview.widget.RecyclerView
android:id="@+id/layoutRecyclerView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginTop="40dp"
android:padding="12dp"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/functionalityRecyclerView" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintHorizontal_bias="0.0" />

</androidx.constraintlayout.widget.ConstraintLayout>
8 changes: 4 additions & 4 deletions app/src/main/res/layout/fragment_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@
android:textStyle="bold"
android:textSize="18sp" />
<ImageView
android:layout_marginStart="190dp"
android:layout_width="12dp"
android:layout_height="20dp"
android:layout_marginStart="180dp"
android:layout_width="24dp"
android:layout_height="24dp"
android:alpha="0.9"
android:src="@drawable/vector" />
android:src="@drawable/right_arrow" />
</LinearLayout>
<TextView
android:layout_marginEnd="4dp"
Expand Down

0 comments on commit bf7d0b4

Please sign in to comment.