Android Studio ( Hesap Makinesi Uygulaması ) Java ...


package com.pointsoft.hesapmakinesi1; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.EditText; import android.widget.TextView; public class MainActivity extends AppCompatActivity { EditText editText1; EditText editText2; TextView sonucTextView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); editText1=(EditText) findViewById(R.id.editText1); editText2=(EditText) findViewById(R.id.editText2); sonucTextView=(TextView)findViewById(R.id.sonucId); } public void tpl(View view){ double a = Integer.parseInt(editText1.getText().toString()); double b= Integer.parseInt(editText2.getText().toString()); double snc=a+b; sonucTextView.setText(" SONUÇ = " + snc); } public void ckr(View view){ double a= Integer.parseInt(editText1.getText().toString()); double b=Integer.parseInt(editText2.getText().toString()); double snc=a-b; sonucTextView.setText(" SONUÇ = " + snc); } public void crp(View view){ double a= Integer.parseInt(editText1.getText().toString()); double b=Integer.parseInt(editText2.getText().toString()); double snc=a*b; sonucTextView.setText(" SONUÇ = " + snc); } public void böl(View view){ double a= Integer.parseInt(editText1.getText().toString()); double b=Integer.parseInt(editText2.getText().toString()); double snc= a / b; sonucTextView.setText(" SONUÇ = " + snc); } }
soru ve önerileriniz için geri dönüş yapabilirsiniz ....
YORUM EKLE