Using android studio
Using android studio
1. Assume we have an activity named musicVideo, write the code to launch/start this activity. Paste the code in the box below.
2. In your own words what does the following code do? What is the name of the activity that will be displayed to the user?
Button button = (Button) findViewById(R.id.btnLauncher);
button.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
startActivity(new intent(MainActivity.this, clothes.class));
}
}
3. What is wrong with the following? Show your fixes below
<string name=app_name">TestApp</string>
<string name="txtTitle">Testing App<string>
<string name="txtTimes">Times</string>
</string name="prompt">Select Group</string>
<string name="description">This app stores times</string>
<string name"btnTimes">Display Times</string>
1. Assume we have an activity named musicVideo, write the code to launch/start this activity. Paste the code in the box below.
2. In your own words what does the following code do? What is the name of the activity that will be displayed to the user?
Button button = (Button) findViewById(R.id.btnLauncher);
button.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
startActivity(new intent(MainActivity.this, clothes.class));
}
}
3. What is wrong with the following? Show your fixes below
<string name=app_name">TestApp</string>
<string name="txtTitle">Testing App<string>
<string name="txtTimes">Times</string>
</string name="prompt">Select Group</string>
<string name="description">This app stores times</string>
<string name"btnTimes">Display Times</string>
Step by step
Solved in 5 steps