-1
我有圖像視圖裏面的框架佈局,我把運動時在圖像視圖上的隨機貼紙,但是當我保存圖像位圖使用框架佈局圖 - 抓住然後圖像保存但有不必要的黑色部分進來保存的圖像。 Imageview圖像捕捉不按需要來
我想點陣圖沒有這個黑part.Please help.Here是我的佈局和代碼。
<FrameLayout
android:id="@+id/fl_effect_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/rl_title"
android:layout_marginBottom="83dp" >
<ImageView
android:id="@+id/im_gselected_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
>
</ImageView>
</FrameLayout>
這是我用來創建位圖的代碼。
FrameLayout fl=(FrameLayout) findViewById(R.id.fl_effect_view);
f1.setDrawingCacheEnabled(true);
Bitmap b=Bitmap.createBitmap(f1.getDrawingCache());
f1.setDrawingCacheEnabled(false);