Add to Chrome
✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Вкажіть вірний фрагмент коду для кнопки обробки події натиснення onClick
super.onCreate(state); setContentView(R.layout.main); final Button b1 = (Button) findViewById(R.id.b1); final Button b2 = (Button) findViewById(R.id.b2); super.onCreate(savedInstanceState); setContentView(R.layout.main); }
import android.app.Activity; import android.os.Bundle; super.onCreate(state); setContentView(R.layout.main); final Button b1 = (Button) findViewById(R.id.b1); final Button b2 = (Button) findViewById(R.id.b2);
import android.widget.*; import android.view.View; public class Project extends Activity{ public void onCreate(Bundle state){ super.onCreate(state); setContentView(R.layout.main); final Button b1 = (Button) findViewById(R.id.b1); final Button b2 = (Button) findViewById(R.id.b2); b1.setOnClickListener(new View.OnClickListener(){public void onClick(View v){ ...
<?xml version="10" encoding="utf-12"?> <resources>import android.widget.*; import android.view.View; public class Project extends Activity{ public void onCreate(Bundle state){ super.onCreate(state);
super.onCreate(state); setContentView(R.layout.main); final Button b1 = (Button) findViewById(R.id.b1); final Button b2 = (Button) findViewById(R.id.b2); <resources><string name="hello">Hello, Android World!</string>;
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!