Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I'm running the following code. It is XML for an App. For some reason the second button, INFO2, does not work. Help. package net.androidbootcamp.contactsaddressbookporterb; import
I'm running the following code. It is XML for an App. For some reason the second button, INFO2, does not work. Help.
package net.androidbootcamp.contactsaddressbookporterb; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button button =(Button) findViewById(R.id.INFO1); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity (new Intent (MainActivity.this, Anderson.class)); } }); Button info1Button = (Button) findViewById(R.id.INFO2); info1Button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { } }); } }CCPI UNIVERSITY MyNETLAB > 202301RC-IN-CIS332-NMW-JD-POD444 > Reservation 38564> CIS332 4: Run Q TODO 6: Logcat a Profiler Terminal
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started