scale bottom tab text size automatically
This commit is contained in:
parent
ed15ec4288
commit
c68f85cbac
|
@ -63,7 +63,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:b45fde5669'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:e79c9bba93'
|
||||
implementation 'com.facebook.stetho:stetho:1.5.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'com.shawnlin:number-picker:2.4.6'
|
||||
|
@ -73,6 +73,7 @@ dependencies {
|
|||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.1'
|
||||
implementation 'org.greenrobot:eventbus:3.3.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'me.grantland:autofittextview:0.2.1'
|
||||
|
||||
implementation 'androidx.room:room-runtime:2.4.2'
|
||||
kapt 'androidx.room:room-compiler:2.4.2'
|
||||
|
|
|
@ -17,12 +17,10 @@ import com.simplemobiletools.clock.extensions.rescheduleEnabledAlarms
|
|||
import com.simplemobiletools.clock.extensions.updateWidgets
|
||||
import com.simplemobiletools.clock.helpers.*
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.LICENSE_NUMBER_PICKER
|
||||
import com.simplemobiletools.commons.helpers.LICENSE_RTL
|
||||
import com.simplemobiletools.commons.helpers.LICENSE_STETHO
|
||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||
import com.simplemobiletools.commons.helpers.*
|
||||
import com.simplemobiletools.commons.models.FAQItem
|
||||
import kotlinx.android.synthetic.main.activity_main.*
|
||||
import me.grantland.widget.AutofitHelper
|
||||
|
||||
class MainActivity : SimpleActivity() {
|
||||
private var storedTextColor = 0
|
||||
|
@ -169,6 +167,7 @@ class MainActivity : SimpleActivity() {
|
|||
main_tabs_holder.newTab().setCustomView(R.layout.bottom_tablayout_item).apply {
|
||||
customView?.findViewById<ImageView>(R.id.tab_item_icon)?.setImageDrawable(getDrawable(drawableId))
|
||||
customView?.findViewById<TextView>(R.id.tab_item_label)?.setText(tabLabels[i])
|
||||
AutofitHelper.create(customView?.findViewById(R.id.tab_item_label))
|
||||
main_tabs_holder.addTab(this)
|
||||
}
|
||||
}
|
||||
|
@ -206,7 +205,7 @@ class MainActivity : SimpleActivity() {
|
|||
}
|
||||
|
||||
private fun launchAbout() {
|
||||
val licenses = LICENSE_STETHO or LICENSE_NUMBER_PICKER or LICENSE_RTL
|
||||
val licenses = LICENSE_STETHO or LICENSE_NUMBER_PICKER or LICENSE_RTL or LICENSE_AUTOFITTEXTVIEW
|
||||
|
||||
val faqItems = arrayListOf(
|
||||
FAQItem(R.string.faq_1_title, R.string.faq_1_text),
|
||||
|
|
|
@ -10,7 +10,7 @@ import com.simplemobiletools.clock.R
|
|||
import com.simplemobiletools.clock.extensions.config
|
||||
import com.simplemobiletools.clock.helpers.MyAnalogueTimeWidgetProvider
|
||||
import com.simplemobiletools.commons.dialogs.ColorPickerDialog
|
||||
import com.simplemobiletools.commons.dialogs.WidgetLockedDialog
|
||||
import com.simplemobiletools.commons.dialogs.FeatureLockedDialog
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.IS_CUSTOMIZING_COLORS
|
||||
import kotlinx.android.synthetic.main.widget_config_analogue.*
|
||||
|
@ -20,7 +20,7 @@ class WidgetAnalogueConfigureActivity : SimpleActivity() {
|
|||
private var mWidgetId = 0
|
||||
private var mBgColor = 0
|
||||
private var mBgColorWithoutTransparency = 0
|
||||
private var mWidgetLockedDialog: WidgetLockedDialog? = null
|
||||
private var mWidgetLockedDialog: FeatureLockedDialog? = null
|
||||
|
||||
public override fun onCreate(savedInstanceState: Bundle?) {
|
||||
useDynamicTheme = false
|
||||
|
@ -43,7 +43,7 @@ class WidgetAnalogueConfigureActivity : SimpleActivity() {
|
|||
config_analogue_bg_seekbar.setColors(getProperTextColor(), primaryColor, primaryColor)
|
||||
|
||||
if (!isCustomizingColors && !isOrWasThankYouInstalled()) {
|
||||
mWidgetLockedDialog = WidgetLockedDialog(this) {
|
||||
mWidgetLockedDialog = FeatureLockedDialog(this) {
|
||||
if (!isOrWasThankYouInstalled()) {
|
||||
finish()
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import com.simplemobiletools.clock.R
|
|||
import com.simplemobiletools.clock.extensions.config
|
||||
import com.simplemobiletools.clock.helpers.MyDigitalTimeWidgetProvider
|
||||
import com.simplemobiletools.commons.dialogs.ColorPickerDialog
|
||||
import com.simplemobiletools.commons.dialogs.WidgetLockedDialog
|
||||
import com.simplemobiletools.commons.dialogs.FeatureLockedDialog
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.IS_CUSTOMIZING_COLORS
|
||||
import kotlinx.android.synthetic.main.widget_config_digital.*
|
||||
|
@ -21,7 +21,7 @@ class WidgetDigitalConfigureActivity : SimpleActivity() {
|
|||
private var mBgColor = 0
|
||||
private var mTextColor = 0
|
||||
private var mBgColorWithoutTransparency = 0
|
||||
private var mWidgetLockedDialog: WidgetLockedDialog? = null
|
||||
private var mWidgetLockedDialog: FeatureLockedDialog? = null
|
||||
|
||||
public override fun onCreate(savedInstanceState: Bundle?) {
|
||||
useDynamicTheme = false
|
||||
|
@ -45,7 +45,7 @@ class WidgetDigitalConfigureActivity : SimpleActivity() {
|
|||
config_digital_bg_seekbar.setColors(mTextColor, primaryColor, primaryColor)
|
||||
|
||||
if (!isCustomizingColors && !isOrWasThankYouInstalled()) {
|
||||
mWidgetLockedDialog = WidgetLockedDialog(this) {
|
||||
mWidgetLockedDialog = FeatureLockedDialog(this) {
|
||||
if (!isOrWasThankYouInstalled()) {
|
||||
finish()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue