Posts

Showing posts with the label AutoFIt

Exploring Android O: Autosizing TextViews

Image
With the release of first developer preview of Android O, Google come with a solution to auto-size text in a TextView similar to the way the iOS SDK allows to select “ fit text to box ”. Let’s take a look at this exciting new feature and how we can implement it into our Android applications! Autosizing TextViews Android O allows to instruct a TextView to let the size of the text expand or contract automatically to fill its layout based on the TextView's characteristics and boundaries. This setting makes it easier to optimize the text size on different screens with dynamic content. Creating New Project We’ll start by creating new project in Android Studio and do the basic setup required.Create a new project in Android Studio from File > New Project and fill the project details. While creating the project, select the API O: Android 7+(O preview) as Minimum SDK. Update Build Configuration Open build.gradle located under app module and Update compileSdk...