Android : using same Layout for EDIT and ADD NEW - Error in ADD?
<p>I am using the same Layout and Activity for EDIT and ADD functionality.
I have activity A - this has a table with values. If i click on a ROW, it fetches the values and goes to Activity B and displays it in the fields there.
In the same activity A, i also have a ADD NEW button, on click of this, i go to Activity B, where i disaply the same layout with blank values for the user to input.</p>

<p>The EDIT part is working properly, but the ADD new is not. It gives me NULL Pointer error.</p>

<p>Activity B code</p>

<pre><code>BankName = (EditText)findViewById(R.id.bankNameLabel);
BalanceAmount = (EditText)findViewById(R.id.balanceLabel);
currencySpin = (Spinner)findViewById(R.id.currencySpinner);

BankName.setText(getIntent().getExtras().getString("bank"));
BalanceAmount.setText(getIntent().getIntExtra("amount", 0)+"");
</code></pre>

<p>the setText is when i have values from the EDIT functionality.
Why is the BLANK screen during the ADD part not working?</p>
