diff --git a/app/build.gradle b/app/build.gradle index e2cfb20..5e9bd24 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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' } diff --git a/app/src/main/kotlin/com/simplemobiletools/voicerecorder/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/voicerecorder/activities/MainActivity.kt index 35de02a..b4f4e8c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/voicerecorder/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/voicerecorder/activities/MainActivity.kt @@ -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(R.id.tab_item_icon)?.setImageDrawable(getDrawable(drawableId)) customView?.findViewById(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), diff --git a/app/src/main/kotlin/com/simplemobiletools/voicerecorder/activities/WidgetRecordDisplayConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/voicerecorder/activities/WidgetRecordDisplayConfigureActivity.kt index aecbde9..ca0cd02 100644 --- a/app/src/main/kotlin/com/simplemobiletools/voicerecorder/activities/WidgetRecordDisplayConfigureActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/voicerecorder/activities/WidgetRecordDisplayConfigureActivity.kt @@ -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() } }