Back to project page 2014-Droid-code.
The source code is released under:
GNU General Public License
If you think the Android project 2014-Droid-code listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package cs518.sample.multiactivity; // w w w .j a v a2s.c o m import android.app.Activity; import android.os.Bundle; import android.view.View; /* * This class receives no data but it returns a result, depending on which button is clicked */ public class Activity3 extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity3); } public void thisResult(View v) { setResult(RESULT_OK); finish(); } //thisResult() public void thatResult(View v) { setResult(RESULT_CANCELED); finish(); } //thisResult() }