Android changes the original color of the icon and the instance code of the search box

Icon change color: the color change of drawable allows Android to have as convenient image tone conversion as IOS, just like the same icon, but it can be used in multiple places with different colors.

Search box: it is generally implemented by EditText. This paper implements textview, centering pictures and text, and keyboard search.

Let's take a look at the renderings:

The icon changes color: the left (QR code) and the right (more) of the first interface are implemented. The picture I put in is black and displayed is white.

Search box: the picture and text in the first interface are centered, and the spacing can be set. In the second meeting search, set the keyboard search button, click the search monitoring event and clear the content icon.

Search box layout:

Keyboard monitoring:

Homepage layout:

Custom drawabletextview: (Text Icon centered)

Friends in need click to download the source code!

https://github.com/DickyQie/android-basic-control/tree/search-box

summary

The above is the example code of Android changing the original color of the icon and the search box introduced by Xiaobian. I hope it will help you. If you have any questions, please leave me a message, and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>