![](/rp/kFAqShRrnkQMbH6NYLBYoJ3lq9s.png)
Android: how to add Icon at the left side of the TextView
Aug 13, 2014 · @AlexeyShevelyov To center the text, you can use android:gravity="center_vertical" in the layout file or textView.setGravity(Gravity.CENTER_VERTICAL); in the Java file. – weeix Commented Nov 7, …
Android button with icon and text - Stack Overflow
I'm trying to create a same button with text and a icon. android:drawableLeft doesn't work for me (Maybe it would, but i don't know how to set a max height to the icon). So i created a LinearLayout with a ImageView and a TextView and made it act like a button:
How to add icon inside EditText view in Android - Stack Overflow
Nov 8, 2013 · Use a relative layout and set the button the be align left of the edit text view, and set the left padding of your text view to the size of your button. I can't think of a good way to do it without hard coding the padding :/
How to create EditText with cross(x) button at end of it?
Jun 15, 2011 · This is an edit text where I put a cross icon as a right drawable and than UPON it I put a transparent ...
How to center icon and text in a android button with width set to …
Sep 3, 2010 · I want to have an Android Button with icon+text centered inside it. I'm using the drawableLeft attribute to set the image, this works well if the button has a width of "wrap_content" but I need to stretch to max width so I use width "fill_parent". This moves my icon straight to the left of the button and I want both icon and text centered ...
android - How to display menu item with icon and text in ...
Oct 6, 2015 · Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers; Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand
Android Text Below Icon (button) - Stack Overflow
Apr 19, 2014 · I will create a six buttons, and each button will open another activity. For each button, I want it have an big icon with text below the button. Currently, I can have image on the button, but I do not know how to make the text to display below the button. I tried to place the text directly on the image, but it doesn't look good.
android - FloatingActionButton with text instead of image - Stack …
Nov 12, 2015 · Thanks to all. Here is easy workaround which I found for this question. Works correctly for Android 4+, for Android 5+ is added specific parameter android:elevation to draw TextView over FloatingActionButton.
android - Aligning drawableLeft with text of button - Stack Overflow
Feb 3, 2013 · In our case, we wanted to use the default Button class (to inherit its various styles and behaviors) and we needed to be able to create the button in code. Also, in our case we could have text, an icon (left drawable), or both. The goal was to center the icon and/or text as a group when the button width was wider than wrap_content.
How to switch between hide and view password - Stack Overflow
Aug 18, 2016 · import android.text.InputType.TYPE_CLASS_TEXT import android.text.InputType.TYPE_TEXT_VARIATION_PASSWORD import com.google.android.material.textfield.TextInputLayout.END_ICON_PASSWORD_TOGGLE My may customize the icon with provided methods as these: input_layout.endIconDrawable = ...