scale bottom tab text size flexibly

This commit is contained in:
tibbi 2022-06-27 10:03:18 +02:00
parent 0f418c8c68
commit 749af30c7e
2 changed files with 5 additions and 2 deletions

View File

@ -64,11 +64,12 @@ android {
}
dependencies {
implementation 'com.github.SimpleMobileTools:Simple-Commons:4aa0b9aaad'
implementation 'com.github.SimpleMobileTools:Simple-Commons:e79c9bba93'
implementation 'com.github.tibbi:AndroidPdfViewer:da57ff410e'
implementation 'com.github.Stericson:RootTools:df729dcb13'
implementation 'com.github.Stericson:RootShell:1.6'
implementation 'com.alexvasilkov:gesture-views:2.5.2'
implementation 'androidx.documentfile:documentfile:1.0.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'me.grantland:autofittextview:0.2.1'
}

View File

@ -47,6 +47,7 @@ import kotlinx.android.synthetic.main.items_fragment.*
import kotlinx.android.synthetic.main.items_fragment.view.*
import kotlinx.android.synthetic.main.recents_fragment.*
import kotlinx.android.synthetic.main.storage_fragment.*
import me.grantland.widget.AutofitHelper
import java.io.File
class MainActivity : SimpleActivity() {
@ -410,6 +411,7 @@ class MainActivity : SimpleActivity() {
main_tabs_holder.newTab().setCustomView(R.layout.bottom_tablayout_item).apply {
customView?.findViewById<ImageView>(R.id.tab_item_icon)?.setImageDrawable(getTabIcon(index))
customView?.findViewById<TextView>(R.id.tab_item_label)?.text = getTabLabel(index)
AutofitHelper.create(customView?.findViewById(R.id.tab_item_label))
main_tabs_holder.addTab(this)
}
}
@ -596,7 +598,7 @@ class MainActivity : SimpleActivity() {
private fun launchAbout() {
closeSearch()
val licenses = LICENSE_GLIDE or LICENSE_PATTERN or LICENSE_REPRINT or LICENSE_GESTURE_VIEWS or LICENSE_PDF_VIEWER
val licenses = LICENSE_GLIDE or LICENSE_PATTERN or LICENSE_REPRINT or LICENSE_GESTURE_VIEWS or LICENSE_PDF_VIEWER or LICENSE_AUTOFITTEXTVIEW
val faqItems = arrayListOf(
FAQItem(R.string.faq_3_title_commons, R.string.faq_3_text_commons),