0

I created custom dialog and i have textview in it. Text is pretty close to edge of my dialog box, so i wonder if I can set some space between my text and left and right edge of dialog box and how ??

Goran
  • 1,239
  • 4
  • 23
  • 36

2 Answers2

1

In your custom dialog's xml layout add the following to the root:

android:padding="10dp"

Or whichever value you see fit.

Benito Bertoli
  • 25,285
  • 12
  • 54
  • 61
0

You need to create your TextView with some marginLeft and marginRight attributes. These will put some space between your TextView and the left, right edges of the screen.

Also consider using paddingLeft, paddingRight attributes to ensure that there is some space between the border of your TextView and the actual text itself.

Look here for more information about how you can set these parameters in a TextView.

zeiger
  • 700
  • 5
  • 16