Can we use fragments to build a registration page
<p>I am working on a project in which i am navigating from activity to a fragment which contains my reservation page with EditText fields like Name, Email Id. What i want to know is whether it is possible to get the values of those fields and send them as an email in fragment. if yes please help.
MainActivity.java</p>

<pre><code>public class MainActivity extends AppCompatActivity {
    FloatingActionButton fab;
    RelativeLayout aboutUs;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        aboutUs = (RelativeLayout) findViewById(R.id.aboutUs);

        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

         fab = (FloatingActionButton) findViewById(R.id.fab);
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                        .setAction("Action", null).show();
            }
        });
    }


    //click methods goes here

    public void clickAboutUs(View view){

        /*android.support.v4.app.FragmentManager fragmentManager = getSupportFragmentManager();
        android.support.v4.app.FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
        FragmentAboutUs fragmentAboutUs = new FragmentAboutUs();
        fragmentTransaction.replace(R.id.fragment_container, fragmentAboutUs);
        fragmentTransaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
        fragmentTransaction.addToBackStack(null);

        fragmentTransaction.commit();*/

        FragmentAboutUs fragmentAboutUs = new FragmentAboutUs();
        replaceFragment(fragmentAboutUs , true);



    }



    public void clickEvents(View view){


        FragmentEvents fragmentEvents = new FragmentEvents();
        replaceFragment(fragmentEvents,true);



    }

    public void clickMedia(View view){


        FragmentMedia fragmentMedia = new FragmentMedia();
        replaceFragment(fragmentMedia,true);



    }

    public void clickContact(View view){


        FragmentContact fragmentContact = new FragmentContact();
        replaceFragment(fragmentContact,true);




    }

    public boolean popFragment() {
        boolean isPop = false;

        Fragment currentFragment = getSupportFragmentManager()
                .findFragmentById(R.id.fragment_container);

        if (getSupportFragmentManager().getBackStackEntryCount() &gt; 0) {
            isPop = true;
            getSupportFragmentManager().popBackStackImmediate();
        }

        return isPop;
    }

    @Override
    public void onBackPressed() {
        if (!popFragment()) {
            finish();
        }
    }

    public void replaceFragment(Fragment fragment, boolean addToBackStack) {

        android.support.v4.app.FragmentTransaction transaction = getSupportFragmentManager()
                .beginTransaction();

        if (addToBackStack) {
            transaction.addToBackStack(null);

        } else {
            getSupportFragmentManager().popBackStack(null,
                    FragmentManager.POP_BACK_STACK_INCLUSIVE);

        }
        transaction.replace(R.id.fragment_container, fragment);
        transaction.commit();
        getSupportFragmentManager().executePendingTransactions();

    }





    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }


}
</code></pre>

<p>Here is my fragment class</p>

<p>FragmentContact.java</p>

<pre><code>public class FragmentContact extends Fragment
{
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    View view = inflater.inflate(R.layout.contac_us, container,false);
    return view;
}
}
</code></pre>

<p>In fragment FragmentContact i am planning to include reseration form. I search for "Registration page using fragment in android" but didnt get any help.</p>