-1

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 ?

k.kbr
  • 45
  • 6

1 Answers1

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