Android Q new features and everything

Page 1

Understanding The New Text Format In Android Q

Are you someone who loves to follow all the latest things happening in the field of Android OS? OR Are you someone who is working as an Android app developer for a long time? Then, you must be knowing about Android Q. It is the upcoming and 10th major release of the Android OS. The people who are following the evolution of Android OS from the beginning must be excited about this brand new version. Android Q will be the 17th version of the Android operating system. Now, from the developer perspective, you need to know the technicalities of this version. The reason behind that is in the near future; the developers have to make the app for Android Q. So, if they don’t have an idea about its behavior, it can be a real bottleneck in the development. Taking this


scenario into consideration, we have decided to write this blog post on Android Q. In this blog, we’re going to provide you with an in-depth guide on how the text format is going to work out in Android Q. So, why wait for anything special to happen? Let’s get straight into the thick of things, right here, right now.!

A Little Background Before going into the details of the new text format in Android Q, it’s essential to remind yourself that displaying text is such an integral part of the app development process. Taking this requirement into consideration, Android Q is coming with new improvement for the text. So, let’s analyze all the changes one-by-one in detail.

Hyphenation is Off by Default in Android Q The Android developers carried out a test on Hyphenation, and the test showed that Hyphenation was taking 70% of the time measuring that the text is on Hyphenation. It means that productivity was getting reduced by a fair margin. So, there was a need to change this scenario. That’s where the developers came with a new concept. They have turned off the Hyphenation by default in Android Q. Hyphenation is often not required in the TextViews of an app. Now, if you want to turn on the Hyphenation, you need to perform it manually. There are multiple ways to accomplish this task.

1. As a TextAppearance attribute in styles.xml <style name=”MyTextAppearance” parent=”TextAppearance.AppCompat”>


<item name=”android:hyphenationFrequency”>normal</item> </style>

2. As a TextView attribute <TextView android:hyphenationFrequency=”normal” />

3. Directly In Code textView.hyphenationFrequency = Layout.HYPHENATION_FREQUENCY_NORMAL

Multiple Custom Fonts in the Same TextView For understanding this concept, let’s take an example. Suppose you’re using a button which is utilizing custom fonts as shown below.

Here, the Button class will accept only a single instance of the typeface. Before Android Q burst onto the scene, developers were able to create a Typeface using a single font family. However, with Android Q, you can create Typeface using multiple font families.


For this purpose, a new API Typeface.CustomFallbackBuilder comes into the picture. It allows up to 64 font families at one go. So, by using this API, we can implement the icon font.

Click here to read more


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.