Android Open Source - NestedFragment First Activity






From Project

Back to project page NestedFragment.

License

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.

Java Source Code

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();
        
      }
    });
  }
}




Java Source Code List

com.sams.nestedfragment.FirstActivity.java
com.sams.nestedfragment.FirstTabFragment.java
com.sams.nestedfragment.MainActivity.java
com.sams.nestedfragment.PagesFragment.java
com.sams.nestedfragment.SecondActivity.java
com.sams.nestedfragment.SecondTabFragment.java