mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-06-05 22:19:17 +02:00
scale bottom tab text size automatically
This commit is contained in:
@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user