Posts

Showing posts with the label android

Clear Icon not visible in TextInputLayout issue with custom TextWatcher

If you are using custom TextWatcher with with your TextInputEditText then you may notice <item name="endIconMode">clear_text</item> set to TextInputLayout is not visible after some finding working on that found out its issue with material design library version 1.1.0 if you upgrade to latest material design library 1.2.1 stable version this issue doesn't happen. another noticeable issue was when you set error the red line and text below also overlap in 1.1.0 library version which seems to be working fine now in 1.2.1 version. one thing which is still issue is if you have something like this custom text-watcher  textInputEditText.addTextChangedListener(UsPhoneNumberFormatter(textInputEditText ))) error text jumps up and down bit while user is typing in the field. https://github.com/material-components/material-components-android/releases 

Styling TextInput Layout with material design library

Image
Google release material design library which provides with material design styles for different components which can be customized. To get started you need to include material design library into your gradle file provided on this link : https://material.io/develop/android/docs/getting-started TextInputLayout provides different material styles Widget.MaterialComponents.TextInputLayout.FilledBox Widget.MaterialComponents.TextInputLayout.OutlinedBox for using above material themes you are required to use parent theme as parent="Theme.MaterialComponents.Bridge" this can become issue if you are using some old parent theme for your application changing the parent theme may change some UI are looking before changing to Theme.MaterialComponents.Bridge in place of changing the parent theme for your application you can assign new material components theme at your activity level your layout xml file root layout android:theme = "material theme" to keep your current dialogs and