scale bottom tab text size flexibly
This commit is contained in:
parent
0f418c8c68
commit
749af30c7e
|
@ -64,11 +64,12 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:4aa0b9aaad'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:e79c9bba93'
|
||||||
implementation 'com.github.tibbi:AndroidPdfViewer:da57ff410e'
|
implementation 'com.github.tibbi:AndroidPdfViewer:da57ff410e'
|
||||||
implementation 'com.github.Stericson:RootTools:df729dcb13'
|
implementation 'com.github.Stericson:RootTools:df729dcb13'
|
||||||
implementation 'com.github.Stericson:RootShell:1.6'
|
implementation 'com.github.Stericson:RootShell:1.6'
|
||||||
implementation 'com.alexvasilkov:gesture-views:2.5.2'
|
implementation 'com.alexvasilkov:gesture-views:2.5.2'
|
||||||
implementation 'androidx.documentfile:documentfile:1.0.1'
|
implementation 'androidx.documentfile:documentfile:1.0.1'
|
||||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||||
|
implementation 'me.grantland:autofittextview:0.2.1'
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,7 @@ import kotlinx.android.synthetic.main.items_fragment.*
|
||||||
import kotlinx.android.synthetic.main.items_fragment.view.*
|
import kotlinx.android.synthetic.main.items_fragment.view.*
|
||||||
import kotlinx.android.synthetic.main.recents_fragment.*
|
import kotlinx.android.synthetic.main.recents_fragment.*
|
||||||
import kotlinx.android.synthetic.main.storage_fragment.*
|
import kotlinx.android.synthetic.main.storage_fragment.*
|
||||||
|
import me.grantland.widget.AutofitHelper
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
class MainActivity : SimpleActivity() {
|
class MainActivity : SimpleActivity() {
|
||||||
|
@ -410,6 +411,7 @@ class MainActivity : SimpleActivity() {
|
||||||
main_tabs_holder.newTab().setCustomView(R.layout.bottom_tablayout_item).apply {
|
main_tabs_holder.newTab().setCustomView(R.layout.bottom_tablayout_item).apply {
|
||||||
customView?.findViewById<ImageView>(R.id.tab_item_icon)?.setImageDrawable(getTabIcon(index))
|
customView?.findViewById<ImageView>(R.id.tab_item_icon)?.setImageDrawable(getTabIcon(index))
|
||||||
customView?.findViewById<TextView>(R.id.tab_item_label)?.text = getTabLabel(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)
|
main_tabs_holder.addTab(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -596,7 +598,7 @@ class MainActivity : SimpleActivity() {
|
||||||
|
|
||||||
private fun launchAbout() {
|
private fun launchAbout() {
|
||||||
closeSearch()
|
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(
|
val faqItems = arrayListOf(
|
||||||
FAQItem(R.string.faq_3_title_commons, R.string.faq_3_text_commons),
|
FAQItem(R.string.faq_3_title_commons, R.string.faq_3_text_commons),
|
||||||
|
|
Loading…
Reference in New Issue