2

The text comes up on the photo.how to set element padding-right text from mic image

enter image description here

1 Answers1

0

Instead of relying on padding, I suggest you to learn ConstraintLayout. This layout is most widely used these days. It sets constraints (like rules) for parent layout and your components. It is much better than padding, which needs to be set differently for different screen sizes and densities.

To use ConstraintLayout, follow these steps:

  1. Put your TextView and ImageView under ConstraintLayout.
  2. Select both of them and Right Click.
  3. Select Chains -> Create Horizontal Chain.

This set constraints on both of the components and they will never overlap.

For in-depth understanding of ConstraintLayout, check:

gpl
  • 1,380
  • 2
  • 8
  • 24