这是编码
package com.st.accounts;
import android.app.Activity;
import android.content.ContentValues;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;
public class AddAccount extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.addaccount);// error occurs here r is not resolved
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
return Utils.inflateMenu(this,menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
return Utils.handleMenuOption(this,item);
}
public void addAccount(View v) {
// get access to views
EditText editAcno = (EditText) this.findViewById(R.id.editAcno);
EditText editCno = (EditText) this.findViewById(R.id.editCno);
EditText editHolders = (EditText) this.findViewById(R.id.editHolders);
EditText editBankName = (EditText) this.findViewById(R.id.editBankName);
EditText editBranchName = (EditText) this.findViewById(R.id.editBranchName);
EditText editAddress = (EditText) this.findViewById(R.id.editAddress);
EditText editIFSC = (EditText) this.findViewById(R.id.editIFSC);
EditText editMICR = (EditText) this.findViewById(R.id.editMICR);
EditText editBalance = (EditText) this.findViewById(R.id.editBalance);
EditText editRemarks = (EditText) this.findViewById(R.id.editRemarks);
}
}
}
我已经看过一些关于此的先前帖子,但它没有帮助我,我尝试了其中一些但setContentView(R.layout.addaccount)
仍然有主要错误。