Thursday, June 13, 2013

[android help] Android layout - how to tell a view that it should try to fill it's parent, but at least wraps it's content


Android layout - how to tell a view that it should try to fill it's parent, but at least wraps it's content


Android layout - how to tell a view that it should try to fill it's parent, but at least wraps it's content - Stack Overflow







Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















Is it possible to tell a view, that it should at least wrap it's content but if the parent view leaves space to stretch, than it should fill it's parent?


























If what you mean is imageview, then you can set



android:layout_width="match_parent"
android:scaleType="centerInside"


For others I'd just set android:layout_width="match_parent" and won't worry too much about it.




















default






.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...