Back to project page NestedFragment.
The source code is released under:
GNU General Public License
If you think the Android project NestedFragment 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 com.sams.nestedfragment; /*from ww w. ja v a 2 s .co m*/ import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; public class FirstActivity extends Activity { private EditText mValueEditText; private Button mSubmitButton; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_first); mValueEditText = (EditText) findViewById(R.id.et_returnValue); mSubmitButton = (Button) findViewById(R.id.btn_submit); mSubmitButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent result = new Intent(); result.putExtra("firstReturnValue", mValueEditText.getText().toString()); setResult(Activity.RESULT_OK, result); finish(); } }); } }