AsyncTaskを使用して、別のスレッドで処理を行っているのですが、
その別スレッドで以下のようにImageViewからBitmap値を取得すると
警告がでます。
Andoroid
1ImageView imageView = (ImageView) findViewById(R.id.imageView1); 2Bitmap bmp = ((BitmapDrawable)imageView.getDrawable()).getBitmap();
Method getDrawable must be called from the UI thread, currently inferred thread is worker less... (Ctrl+F1)
ちなみにメインスレッドで記述する場合は警告はでません。
この警告を回避する記述方法はあるのでしょうか?
よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/04/20 07:13