If you could help me in terms java what listeners can i use to call and how can i display the added value
note i cannot use any button. The sum has to added as you go on inputting by it self.
package com.dgms.android;
import android.accounts.Account;
import android.accounts.OnAccountsUpdateListener;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.View.onclickListener;
import android.widget.EditText;
import android.widget.TextView;
public class SubmitCourse extends Activity {
private EditText p1r1, p1r2, sum1;
//private int[] p1Scores = new int[18];
//private int[] p2Scores = new int[18];
//private int[] p3Scores = new int[18];
//private int[] p4Scores = new int[18];
//private int[] p5Scores = new int[18];
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.submitcourse);
p1r1 = (EditText) findViewById(R.id.p1e1);
p1r2 = (EditText) findViewById(R.id.p1e2);
sum1 = (EditText) findViewById(R.id.p1esum);
// listners to call the text box
//
//and sum1 has to add p1r1 and p1r2 and display on p1esum;
TextView t=new TextView(this);
t.setText(p1r1.getText());
setContentView(t);
}
}

New Topic/Question
Reply



MultiQuote




|