ayuda!! sobre una consulta
Publicado por duda sobre aplicacion (1 intervención) el 06/01/2014 04:08:25
hola mi problema es el siguiente
me sale erro en el emulador de android
pero cuando quieto o elimino las lines que tien e
el textview tv4 la apliacaion corre bien
que puedo hacer ?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
public class MainActivity extends Activity {
private EditText et1,et2;
private TextView tv4;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
et1=(EditText)findViewById(R.id.et1);
et2=(EditText)findViewById(R.id.et2);
tv4=(TextView)findViewById(R.id.tv4);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
public void sumar(View view) {
String valor1=et1.getText().toString();
String valor2=et2.getText().toString();
int nro1=Integer.parseInt(valor1);
int nro2=Integer.parseInt(valor2);
int suma=nro1+nro2;
String resu=String.valueOf(suma);
tv4.setText(resu);
}
}
me sale erro en el emulador de android
pero cuando quieto o elimino las lines que tien e
el textview tv4 la apliacaion corre bien
que puedo hacer ?
Valora esta pregunta


0