Question : Which UI does the following code builds? android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" >
1. An edit text to the left of a text view and a button beneath it
2. An edit text to the right of a text view and a button to the right of the text view
Question : Consider the following code: Intent i = new Intent(this, MainActivity.class); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(i);
What best explains the code above?
1. The activity being launched is already running in the current task, then instead of launching a new instanceof that activity, all of the other activities on top of it will be closed and this Intent will be delivered to the (nowon top) old activity as a new Intent.
2. Any existing task that would be associated with the activity to be cleared before the activity is started.