Move case sensitive filter

This commit is contained in:
J-Jamet
2022-02-03 20:02:19 +01:00
parent 00518b8231
commit 5d44ba658e
2 changed files with 10 additions and 9 deletions

View File

@@ -176,9 +176,10 @@ class SearchFiltersView @JvmOverloads constructor(context: Context,
}
fun setCurrentGroupText(text: String) {
val maxChars = 12
searchCurrentGroup.text = when {
text.isEmpty() -> context.getString(R.string.current_group)
text.length > 8 -> text.substring(0, 8) + ""
text.length > maxChars -> text.substring(0, maxChars) + ""
else -> text
}
}

View File

@@ -48,14 +48,6 @@
style="@style/KeepassDXStyle.Chip.Filter.Icon"
android:text="@string/current_group"
app:closeIcon="@drawable/ic_current_folder_white_24dp" />
<com.google.android.material.chip.Chip
android:id="@+id/search_chip_case_sensitive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
style="@style/KeepassDXStyle.Chip.Filter.Icon"
android:text="@string/case_sensitive"
app:closeIcon="@drawable/ic_case_sensitive_white_24dp" />
</com.google.android.material.chip.ChipGroup>
</HorizontalScrollView>
<ImageButton
@@ -180,6 +172,14 @@
android:checked="false"
android:enabled="false"
android:text="@string/template"/>
<com.google.android.material.chip.Chip
android:id="@+id/search_chip_case_sensitive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
style="@style/KeepassDXStyle.Chip.Filter.Icon"
android:text="@string/case_sensitive"
app:closeIcon="@drawable/ic_case_sensitive_white_24dp" />
</com.google.android.material.chip.ChipGroup>
</LinearLayout>
</LinearLayout>