N
N
nikita_chiru2016-06-02 20:56:11
Android
nikita_chiru, 2016-06-02 20:56:11

How to set size via setWidth in dp?

help kind people
asked through dimen , the button goes beyond
item3.setWidth(100);
how can i set via dp

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
MikkiMouse, 2016-06-03
@MikkiMouse

item3.setWidth(TypedValue.COMPLEX_UNIT_DIP, 100);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question