M
M
Maxim Siomin2021-04-14 11:15:45
Android
Maxim Siomin, 2021-04-14 11:15:45

Should @dimen/* always be used?

Let's say there is a TextView and I specify the layout_width:
android:layout_width="100dp"
Or
android:layout_width="@dimen/text_view_width"
Should I always use @dimen*?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2021-04-14
@MaxSiominDev

No, you can just specify dp. dimen is mandatory if there must be the same size somewhere in several places, for example.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question