Skip to content

Commit 749af30

Browse files
committed
scale bottom tab text size flexibly
1 parent 0f418c8 commit 749af30

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,12 @@ android {
6464
}
6565

6666
dependencies {
67-
implementation 'com.github.SimpleMobileTools:Simple-Commons:4aa0b9aaad'
67+
implementation 'com.github.SimpleMobileTools:Simple-Commons:e79c9bba93'
6868
implementation 'com.github.tibbi:AndroidPdfViewer:da57ff410e'
6969
implementation 'com.github.Stericson:RootTools:df729dcb13'
7070
implementation 'com.github.Stericson:RootShell:1.6'
7171
implementation 'com.alexvasilkov:gesture-views:2.5.2'
7272
implementation 'androidx.documentfile:documentfile:1.0.1'
7373
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
74+
implementation 'me.grantland:autofittextview:0.2.1'
7475
}

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import kotlinx.android.synthetic.main.items_fragment.*
4747
import kotlinx.android.synthetic.main.items_fragment.view.*
4848
import kotlinx.android.synthetic.main.recents_fragment.*
4949
import kotlinx.android.synthetic.main.storage_fragment.*
50+
import me.grantland.widget.AutofitHelper
5051
import java.io.File
5152

5253
class MainActivity : SimpleActivity() {
@@ -410,6 +411,7 @@ class MainActivity : SimpleActivity() {
410411
main_tabs_holder.newTab().setCustomView(R.layout.bottom_tablayout_item).apply {
411412
customView?.findViewById<ImageView>(R.id.tab_item_icon)?.setImageDrawable(getTabIcon(index))
412413
customView?.findViewById<TextView>(R.id.tab_item_label)?.text = getTabLabel(index)
414+
AutofitHelper.create(customView?.findViewById(R.id.tab_item_label))
413415
main_tabs_holder.addTab(this)
414416
}
415417
}
@@ -596,7 +598,7 @@ class MainActivity : SimpleActivity() {
596598

597599
private fun launchAbout() {
598600
closeSearch()
599-
val licenses = LICENSE_GLIDE or LICENSE_PATTERN or LICENSE_REPRINT or LICENSE_GESTURE_VIEWS or LICENSE_PDF_VIEWER
601+
val licenses = LICENSE_GLIDE or LICENSE_PATTERN or LICENSE_REPRINT or LICENSE_GESTURE_VIEWS or LICENSE_PDF_VIEWER or LICENSE_AUTOFITTEXTVIEW
600602

601603
val faqItems = arrayListOf(
602604
FAQItem(R.string.faq_3_title_commons, R.string.faq_3_text_commons),

0 commit comments

Comments
 (0)