Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ImageViewのサイズを手動で設定したい。ImageViewには、すべてのビューに関して、関数setMinimumHeightがあります。ImageViewに配置するように指示しているユニットは何ですか?
サイズをピクセル単位で取得および設定しています。属性がXMLから拡張されると、minWidthその寸法からピクセル測定値に変換されます。
minWidth
View.javaから:
case R.styleable.View_minWidth: mMinWidth = a.getDimensionPixelSize(attr, 0);