Merge "Show up button in select printer activity"
This commit is contained in:
committed by
Android (Google) Code Review
commit
d5dc2d720d
@@ -71,6 +71,7 @@
|
||||
android:name=".ui.SelectPrinterActivity"
|
||||
android:label="@string/all_printers_label"
|
||||
android:theme="@style/Theme.SelectPrinterActivity"
|
||||
android:parentActivityName=".ui.PrintActivity"
|
||||
android:exported="false">
|
||||
</activity>
|
||||
|
||||
@@ -78,6 +79,7 @@
|
||||
android:name=".ui.AddPrinterActivity"
|
||||
android:label="@string/print_add_printer"
|
||||
android:theme="@style/Theme.AddPrinterActivity"
|
||||
android:parentActivityName=".ui.SelectPrinterActivity"
|
||||
android:exported="false">
|
||||
</activity>
|
||||
|
||||
|
||||
@@ -126,6 +126,8 @@ public final class SelectPrinterActivity extends Activity implements
|
||||
|
||||
setContentView(R.layout.select_printer_activity);
|
||||
|
||||
getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
mEnabledPrintServices = new ArrayMap<>();
|
||||
|
||||
mPrinterRegistry = new PrinterRegistry(this, null, LOADER_ID_PRINT_REGISTRY,
|
||||
@@ -267,6 +269,16 @@ public final class SelectPrinterActivity extends Activity implements
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (item.getItemId() == android.R.id.home) {
|
||||
finish();
|
||||
return true;
|
||||
} else {
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) {
|
||||
if (view == mListView) {
|
||||
|
||||
Reference in New Issue
Block a user