こんにちは皆さん、私はカメラから画像を取得し、ImageView
次のButton
コードを使用して画像を 9 つの等しい部分に分割しています。
ArrayList<Bitmap>cut=new ArrayList<Bitmap>(split);
BitmapDrawable bd=(BitmapDrawable)pic.getDrawable();
Bitmap b=bd.getBitmap();
Bitmap cutimage=Bitmap.createScaledBitmap(b, b.getWidth(), b.getHeight(), true);
rows=cols= (int) Math.sqrt(split);
hgt=b.getHeight()/rows;
wdt=b.getWidth()/cols;
ArrayList<Bitmap> breakedimages== getIntent().getParcelableArrayListExtra("breaked image");
そして、分割されたすべての画像を Arraylist に配置してから、これらの分割された画像を移動する方法を次に示しますGridView
。分割された画像をごちゃまぜにし、GridView
すべての画像をグリッド ビューで正しい順序 (実際の画像) に配置した後、トーストを表示する必要があります。
画像を正常に分割し、グリッド ビューで表示しました。次に、画像をごちゃまぜにすることはできません。誰か助けてください。