View can't be touched when finish custom activity

You must Login before you can answer or comment on any questions.

Titanium SDK: 2.0 Platform & version: Android 2.3 I create a custom module and a new activity in the module. In my module i execute my custom activity and finish it back to titanium view. But the can't be touch anymore. My activity:

@Override    
    protected void onCreate(Bundle savedInstanceState) {     
        super.onCreate(savedInstanceState);     
 
        Intent intent = new Intent(Intent.ACTION_PICK);
        intent.setType("image/*");
        intent.putExtra("crop", "true");
        intent.putExtra("outputX", 225);
        intent.putExtra("outputY", 225);
        intent.putExtra("aspectX", 1);
        intent.putExtra("aspectY", 1);
        intent.putExtra("scale", true);  
        intent.putExtra("return-data", true);
 
        startActivityForResult(intent, 1);
    }
    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        Bundle extras = data.getExtras();
        Bitmap photo = extras.getParcelable("data");
        File file = new File(Environment.getExternalStorageDirectory(), "/test/test.png");
 
        OutputStream outputStream = null;
 
        // create folder
        File dir = file.getParentFile();
        if(!dir.exists()){
            dir.mkdir();
        }
        // delete older file
        if(file.exists()){
            file.delete();
        }
        try {
            // create new file
            file.createNewFile();
            outputStream = new FileOutputStream(file);
            // convert to png image
            photo.compress(Bitmap.CompressFormat.PNG, 100, outputStream);
        } catch (IOException e) {
            // throw IOException
            e.printStackTrace();
        } finally{
            // close outputStream
            if(outputStream != null){
                try {
                    outputStream.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
        this.finish();
    }

Your Answer

Think you can help? Login to answer this question!