I have view, which have layout_width="wrap_content". If i use view.getWidth() in code, it returns 0. :-( How can I convert width of view "wrap_content" to pixels?
views:
85answers:
1
A:
You could try getMeasuredWidth instead. but if it returns 0, that means the View is not ready when you try to measure it. try to make the call later. Like in a thread you poste when onCreate is finished
Sephy
2010-08-19 10:27:44