@@ -0,0 +1,3375 @@
+package br.com.geconp.geconp;%0A%0Aimport android.app.Activity;%0Aimport android.app.AlertDialog;%0Aimport android.os.Bundle;%0Aimport android.util.Log;%0Aimport android.view.View;%0Aimport android.widget.AdapterView;%0Aimport android.widget.ArrayAdapter;%0Aimport android.widget.Button;%0Aimport android.widget.EditText;%0Aimport android.widget.Spinner;%0A%0Aimport java.util.List;%0A%0Aimport br.com.geconp.geconp.async.AsyncConta;%0Aimport br.com.geconp.geconp.dao.DatabaseManager;%0Aimport br.com.geconp.geconp.model.Conta;%0A%0A%0Apublic class ContaActivity extends Activity %7B%0A    Spinner spinner;%0A    String itemConta;%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(R.layout.activity_conta);%0A%0A        spinner= (Spinner) findViewById(R.id.spinnerTipoConta);%0A        loadDataConta();%0A%0A        itemSelecionado(spinner);%0A        itemConta= spinner.getSelectedItem().toString();%0A%0A        Button add= (Button) findViewById(R.id.buttonAddConta);%0A        add.setOnClickListener(new View.OnClickListener() %7B%0A            @Override%0A            public void onClick(View v) %7B%0A                gravar(itemConta);%0A            %7D%0A        %7D);%0A    %7D%0A%0A    private void itemSelecionado(final Spinner spinner)%7B%0A        Log.i(%22SPINNER%22, %22Chegou aqui%22);%0A        spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() %7B%0A            @Override%0A            public void onItemSelected(AdapterView%3C?%3E parent, View view, int position, long id) %7B%0A                itemConta= parent.getItemAtPosition(position).toString();%0A            %7D%0A%0A            @Override%0A            public void onNothingSelected(AdapterView%3C?%3E parent) %7B%0A                return;%0A            %7D%0A        %7D);%0A    %7D%0A%0A    private void gravar(String item)%7B%0A        Log.i(%22SELECIONADO%22, %22Item: %22 + item);%0A        EditText txtNomeConta= (EditText)findViewById(R.id.editTextNomeConta);%0A        EditText txtSaldoConta= (EditText)findViewById(R.id.editTextSaldoConta);%0A%0A        if(txtNomeConta.getText().toString().equals(%22%22) %7C%7C txtSaldoConta.getText().toString().equals(%22.00%22) %7C%7C txtSaldoConta.getText().toString().equals(%22%22))%7B%0A            AlertDialog.Builder dialog= new AlertDialog.Builder(this);%0A            dialog.setTitle(R.string.cuidado);%0A            dialog.setIcon(R.drawable.ic_action_warning);%0A            dialog.setMessage(R.string.campoVazio);%0A            dialog.setNeutralButton(%22Ok%22, null);%0A            dialog.show();%0A        %7Delse%7B%0A            String nome= txtNomeConta.getText().toString();%0A            String aux1= txtSaldoConta.getText().toString();%0A            String aux2= aux1.replace(%22,%22, %22.%22);%0A            float saldo= Float.parseFloat(aux2);%0A%0A            Log.i(%22CONTA%22, %22Item: %22 + item);%0A            Conta conta= new Conta(nome, item, saldo);%0A            AsyncConta async= new AsyncConta(conta, this);%0A            async.execute();%0A%0A            txtNomeConta.setText(%22%22);%0A            txtSaldoConta.setText(%22%22);%0A        %7D%0A    %7D%0A%0A    public void loadDataConta()%7B%0A        DatabaseManager manager= new DatabaseManager(getApplicationContext());%0A        List%3CString%3E labels= manager.listarCategoriaConta();%0A        ArrayAdapter%3CString%3E adapter= new ArrayAdapter%3CString%3E(this, android.R.layout.simple_spinner_item, labels);%0A        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);%0A        spinner.setAdapter(adapter);%0A    %7D%0A%7D%0A

Create ContaActivity.java