Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

package com.example.calculator; import androidx.appcompat.app.AppCompatActivity; import android.os . Bundle; public class MainActivity extends AppCompatActivity { public static int result; public static int number 0 1 ;

package com.example.calculator;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
public static int result;
public static int number01;
public static int number02;
@Override
protected void onCreate(Bundle savedinstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
findViewByld(R.id.Add).setOnClickListener(new android.view.View.OnClickListener(){
@Override public void onClick(android.view.View view){ android.widget.EditText InputWidget = findViewByld(R.id.Number01);
number01= Integer.parseInt(InputWidget.getText().toString());
InputWidget = findViewByld(
R.id. NumberO2);
number02= Integer.parseInt(InputWidget.getText().toString());
result = numberO1+number02;
android. widget.EditText OutputWidget = findViewByld(
R.id. Result);
OutputWidget.setText(Integer.toString(result));
}}); }}
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

How should team effectiveness be measured?

Answered: 1 week ago