以下の内容はhttps://anton0825.hatenablog.com/entry/2015/05/17/000000より取得しました。


ImageButtonにadjustViewBounds="true"を設定しても画像のサイズが変化しない

ImageButtonではなく、ImageViewを使わないといけない。これは罠だ。。 画像を縦横比を保ったまま、横幅を画面いっぱいまで拡大するには、以下の設定にしてandroid:srcかsetImageBitmapメソッドで画像を渡せばよい。

<ImageView
    android:id="@+id/banner_button"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_above="@+id/footer_view"
    android:adjustViewBounds="true"/>

参考:

http://wikiwiki.jp/android/?UI%A5%B3%A5%F3%A5%DD%A1%BC%A5%CD%A5%F3%A5%C8%2FImageView




以上の内容はhttps://anton0825.hatenablog.com/entry/2015/05/17/000000より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14