Android Open Source - minha-parte-na-conta Start New Bar Account Fragment






From Project

Back to project page minha-parte-na-conta.

License

The source code is released under:

Copyright (c) 2015, Daniel Monteiro All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:...

If you think the Android project minha-parte-na-conta 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 br.odb.myshare;
/*from ww  w .j  av a2s .c o  m*/
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;

import br.odb.myshare.datamodel.BarAccount;

public class StartNewBarAccountFragment extends Fragment implements OnClickListener {

    View rootView;


    public static Fragment newInstance() {
        return new StartNewBarAccountFragment();
    }


    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        rootView = inflater.inflate(R.layout.activity_start_new_bar_account, container, false);
        super.onCreate(savedInstanceState);

        Button btn;

        btn = (Button) rootView.findViewById(R.id.btnNewBarAccount);
        btn.setOnClickListener(this);

        return rootView;
    }


    public void onClick(View btn) {


        BarAccount.createNewBarAccount();

        switch (btn.getId()) {

            case R.id.btnNewBarAccount:
                BarAccount.getCurrentBarAccount().saveAccount(getActivity());
                break;
        }
    }
}




Java Source Code List

br.odb.myshare.ApplicationTest.java
br.odb.myshare.CalculateShareActivity.java
br.odb.myshare.CheckoutActivity.java
br.odb.myshare.CheckoutFragment.java
br.odb.myshare.NavigationDrawerFragment.java
br.odb.myshare.RegisterPeopleActivity.java
br.odb.myshare.RegisterPeopleFragment.java
br.odb.myshare.RegisterProductActivity.java
br.odb.myshare.RegisterProductFragment.java
br.odb.myshare.ShowCreditsActivity.java
br.odb.myshare.ShowCreditsFragment.java
br.odb.myshare.ShowFinalCheckoutActivity.java
br.odb.myshare.ShowFinalCheckoutActivity.java
br.odb.myshare.StartNewBarAccountFragment.java
br.odb.myshare.StartNewBarAccount.java
br.odb.myshare.datamodel.BarAccount.java
br.odb.myshare.datamodel.BarAccount.java
br.odb.myshare.datamodel.Item.java
br.odb.myshare.datamodel.Item.java
br.odb.myshare.datamodel.Person.java
br.odb.myshare.datamodel.Person.java