MainActivity.java package com.example.myapplication; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button Addbutton = (Button) findViewById(R.id.Addbutton); Addbutton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { EditText FirstNum= (EditText) findViewById(R.id.FirstNum); EditText SecondNum= (EditText) findViewById(R.id.SecondNum); TextView Result= (TextView) findViewById (R.id.resultTextView); int num1 = Integer.parseInt(FirstNum.getText().toString()); int num2 = Integer.parseInt(SecondNum.getText().toString()); int result = num1 + num2; Result.setText(result + " "); } }); } } Provide a step-by-step procedure on how you will be able to change the name (from MyApplication to MyFirstAppication and image of icon of your apk file.
MainActivity.java
package com.example.myapplication;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button Addbutton = (Button) findViewById(R.id.Addbutton);
Addbutton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
EditText FirstNum= (EditText) findViewById(R.id.FirstNum);
EditText SecondNum= (EditText) findViewById(R.id.SecondNum);
TextView Result= (TextView) findViewById (R.id.resultTextView);
int num1 = Integer.parseInt(FirstNum.getText().toString());
int num2 = Integer.parseInt(SecondNum.getText().toString());
int result = num1 + num2;
Result.setText(result + " ");
}
});
}
}
Provide a step-by-step procedure on how you will be able to change the name (from
MyApplication to MyFirstAppication and image of icon of your apk file.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images