Question: 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) { } }); } }

I'm running the following code. It is XML for an App. For

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!