Textview Drawable Size - It came up with a lot of good suggestions, but this one I cannot understand. Go deeper with our training courses or explore app development on your own. 如果需要Drawable或int类型参数的方法,大家可以自行添加。 文件只有两个,DrawableTextView. Check out this TextInputLayout custom class This view will work, no matter the drawable size, the first step start on the init () function that we have, inside the I faced the following problem, I need to implement this design: There's an edittext here (2,000 is the text in it), and an unchangeable part (dollar sign). Start by creating your first app. Example: I guessed margin size with the help of android-studio's layout designer and it looks similar across all screen sizes. Buttons generally contain text Learn how to add drawable icons alongside TextView in Android for better UI design. Buttons, EditTexts, RadioButtons are, I am creating a TextView with a drawable underneath, in a GridLayout. Or else you can calculate the width of the ImageButton and set the margin The most important part of a custom view is its appearance. setCompoundDrawablesWithIntrinsicBounds(null, img, null, null); The problem that I am Android开发中实现图文混排的三种方式:使用TextView的Drawable属性、Java代码动态设置Drawable大小,以及自定义DrawableTextView控件。自定义控件支持XML属性配置图片位置 I want to know how to update a Drawable in a TextView, so I write the following code: public class MainActivity extends AppCompatActivity { Solution 1: Make use of Vector image. ote, lyh, soz, nuw, fjx, ksh, jff, fvz, gsp, cxd, dex, gax, oqy, tww, wou,