@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button button = (Button) findViewById(R.id.button);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
new AsyncTask<Integer, Integer, Integer>() {
@Override
protected Integer doInBackground(Integer... params) {
for(int i=1; i< 100;i++); {
Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.image);
}
return 0;
}
}.execute(1);
}
});
}