scale bottom tab text size flexibly
This commit is contained in:
parent
8fd408d196
commit
86a4d7a113
|
@ -62,11 +62,12 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:f7c3e0ed7c'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:e79c9bba93'
|
||||
implementation 'org.greenrobot:eventbus:3.3.1'
|
||||
implementation 'com.github.Armen101:AudioRecordView:1.0.4'
|
||||
implementation 'androidx.documentfile:documentfile:1.0.1'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'com.github.naman14:TAndroidLame:1.1'
|
||||
implementation 'me.grantland:autofittextview:0.2.1'
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import com.simplemobiletools.voicerecorder.extensions.config
|
|||
import com.simplemobiletools.voicerecorder.helpers.STOP_AMPLITUDE_UPDATE
|
||||
import com.simplemobiletools.voicerecorder.services.RecorderService
|
||||
import kotlinx.android.synthetic.main.activity_main.*
|
||||
import me.grantland.widget.AutofitHelper
|
||||
|
||||
class MainActivity : SimpleActivity() {
|
||||
|
||||
|
@ -109,6 +110,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)
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +157,7 @@ class MainActivity : SimpleActivity() {
|
|||
}
|
||||
|
||||
private fun launchAbout() {
|
||||
val licenses = LICENSE_EVENT_BUS or LICENSE_AUDIO_RECORD_VIEW or LICENSE_ANDROID_LAME
|
||||
val licenses = LICENSE_EVENT_BUS or LICENSE_AUDIO_RECORD_VIEW or LICENSE_ANDROID_LAME or LICENSE_AUTOFITTEXTVIEW
|
||||
|
||||
val faqItems = arrayListOf(
|
||||
FAQItem(R.string.faq_1_title, R.string.faq_1_text),
|
||||
|
|
|
@ -7,7 +7,7 @@ import android.graphics.Color
|
|||
import android.os.Bundle
|
||||
import android.widget.SeekBar
|
||||
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 com.simplemobiletools.voicerecorder.R
|
||||
|
@ -20,7 +20,7 @@ class WidgetRecordDisplayConfigureActivity : SimpleActivity() {
|
|||
private var mWidgetId = 0
|
||||
private var mWidgetColor = 0
|
||||
private var mWidgetColorWithoutTransparency = 0
|
||||
private var mWidgetLockedDialog: WidgetLockedDialog? = null
|
||||
private var mFeatureLockedDialog: FeatureLockedDialog? = null
|
||||
|
||||
public override fun onCreate(savedInstanceState: Bundle?) {
|
||||
useDynamicTheme = false
|
||||
|
@ -43,7 +43,7 @@ class WidgetRecordDisplayConfigureActivity : SimpleActivity() {
|
|||
config_widget_seekbar.setColors(getProperTextColor(), primaryColor, primaryColor)
|
||||
|
||||
if (!isCustomizingColors && !isOrWasThankYouInstalled()) {
|
||||
mWidgetLockedDialog = WidgetLockedDialog(this) {
|
||||
mFeatureLockedDialog = FeatureLockedDialog(this) {
|
||||
if (!isOrWasThankYouInstalled()) {
|
||||
finish()
|
||||
}
|
||||
|
@ -55,8 +55,8 @@ class WidgetRecordDisplayConfigureActivity : SimpleActivity() {
|
|||
super.onResume()
|
||||
window.decorView.setBackgroundColor(0)
|
||||
|
||||
if (mWidgetLockedDialog != null && isOrWasThankYouInstalled()) {
|
||||
mWidgetLockedDialog?.dismissDialog()
|
||||
if (mFeatureLockedDialog != null && isOrWasThankYouInstalled()) {
|
||||
mFeatureLockedDialog?.dismissDialog()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue