Merge pull request #1137 from qwertyfinger/dynamic-biometric-tab-title
Add biometric tab dynamically
This commit is contained in:
commit
4db1cfe9d9
2 changed files with 3 additions and 8 deletions
|
@ -50,8 +50,9 @@ class SecurityDialog(
|
|||
if (showTabIndex == SHOW_ALL_TABS) {
|
||||
val textColor = context.baseConfig.textColor
|
||||
|
||||
if (!shouldShowBiometricIdTab()) {
|
||||
dialog_tab_layout.removeTabAt(PROTECTION_FINGERPRINT)
|
||||
if (shouldShowBiometricIdTab()) {
|
||||
val tabTitle = if (context.isTargetSdkVersion30Plus()) R.string.biometrics else R.string.fingerprint
|
||||
dialog_tab_layout.addTab(dialog_tab_layout.newTab().setText(tabTitle), PROTECTION_FINGERPRINT)
|
||||
}
|
||||
|
||||
dialog_tab_layout.setTabTextColors(textColor, textColor)
|
||||
|
|
|
@ -27,12 +27,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:text="@string/pin"/>
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:id="@+id/dialog_tab_fingerprint"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/biometrics"/>
|
||||
|
||||
</com.google.android.material.tabs.TabLayout>
|
||||
|
||||
<com.simplemobiletools.commons.views.MyDialogViewPager
|
||||
|
|
Loading…
Reference in a new issue