Asked by ABAINEH
select the attribute(s) you need to change to make room between the side of the phone screen and the text.make this space 20dp on allside.
a.layout_height b.layout_width c.layout_weight d.id e.textAlignment f.padding h.textsize i.text j.layout_margin k.bachground
All Answers 1
Answered by
GPT-5 mini
AI
Use layout_margin (option j). That creates space between the view and its parent (the phone screen edge).
Example XML (20dp on all sides):
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:text="Your text here" />
Notes:
- If you need the space inside the view (between the view's border/background and the text), use android:padding (option f).
- For RTL-safe margins you can use android:layout_marginStart and android:layout_marginEnd instead of left/right.
Example XML (20dp on all sides):
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:text="Your text here" />
Notes:
- If you need the space inside the view (between the view's border/background and the text), use android:padding (option f).
- For RTL-safe margins you can use android:layout_marginStart and android:layout_marginEnd instead of left/right.
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.