とにかくそこにあるので、ビットマップを に揃えることができますImageView
。画像ビューに問題があります。Javaコードを介してソースを設定しています。ビットマップのサイズが変更された後、中央に配置さImageView
れますが、ビットマップを揃えることが必要です。
imageView の宣言:
<RelativeLayout
android:id="@+id/collection_background"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/actionbar" >
<ImageView
android:id="@+id/collection_image_background"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="#ffffff"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:contentDescription="@string/stampii" />
// countinue ........
ビットマップの設定方法は次のとおりです。
BitmapFactory.Options o2 = new BitmapFactory.Options();
o2.inTempStorage = new byte[8*1024];
ops = BitmapFactory.decodeStream(cis,null,o2);
ImageView view = (ImageView) findViewById (R.id.collection_image_background);
view.setImageBitmap(ops);
それを行う方法はありますか?