DirNameInputActivity.java :  » UnTagged » smartshop-project » org » anddev » android » filebrowser » Android Open Source

Android Open Source » UnTagged » smartshop project 
smartshop project » org » anddev » android » filebrowser » DirNameInputActivity.java
// Created by plusminus on 17:37:14 - 24.11.2007
package org.anddev.android.filebrowser;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

import com.appspot.smartshop.R;


public class DirNameInputActivity extends Activity{
  
  protected final int SUCCESS_RETURN_CODE = 1;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
     // Apply our subactivity.xml-Layout
        setContentView(R.layout.filenameinput);
        
        // Find the button defined in the subactivity.xml
        Button cmd_return = (Button)findViewById(R.id.subactivity_cmd_return);
        /* Add an OnClickListener to it, that will
         * read out the text in the EditBox set it 
         * as retrn-data and close this activity */
        cmd_return.setOnClickListener(new OnClickListener(){
      // @Override
      public void onClick(View arg0) {
        // Find the edittext defined in the subactivity.xml
        EditText edit_returvalue = (EditText)findViewById(
            R.id.subactivity_edit_returnvalue);
        DirNameInputActivity.this.setResult(Activity.RESULT_OK);
        // Close this Activity
        DirNameInputActivity.this.finish();
      }
        });       
    }
}

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.