I have a custom edittext and I want to increase height responsively.I tried to add cardview but it crushed edittext hint and click event.Do you know any options or have idea? How can I increase edittext height responsively for all phones sizes ?
Asked
Active
Viewed 38 times
-1
-
Do you have a code example of your layout file? – lucster Oct 04 '21 at 13:51
-
Yes, ı want but unfortunately I can't share. I can not give manuel dp. Do you have any idea ? – k.kbr Oct 04 '21 at 13:54
-
Have you tried setting the width and height using constraints? – lucster Oct 04 '21 at 14:02
-
No, no idea.Is it responsive ? – k.kbr Oct 04 '21 at 14:06
1 Answers
0
I suggest you take a look at Constraint layouts: https://developer.android.com/training/constraint-layout
Using these you can easily set your so called "Constraints", and set responsive margins to the top, left, right and bottom of other components.
For instance: you can place a button, with a bottom constraint of 8 dp to the parent in which it is placed (let's say the root element of your xml, the contraint layout), to place the button 8dp away from the bottom. When you do the same with the left and right (8dp start and end constraint), the button will be at the bottom of your Constraint layout, with 8dp away from the edge on the left, right and bottom.

lucster
- 168
- 8