Change icon for Private Space unlocked and setup success toast
Change is made to show customised icon in Toast message shown by using Toast.makeCustomToastWithIcon() Screenshots : go/ss/AcaRQUJQfh79wDw.png go/ss/5j4oD8xydwX7HTX.png Bug: 329391204 Bug: 309575523 Test: Manual Change-Id: I336d7d0419b1de60024e584e943a725662b446a9
This commit is contained in:
@@ -19,6 +19,7 @@ package com.android.settings.privatespace;
|
||||
import static com.android.settings.privatespace.PrivateSpaceAuthenticationActivity.EXTRA_SHOW_PRIVATE_SPACE_UNLOCKED;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
@@ -38,7 +39,14 @@ public class PrivateSpaceDashboardFragment extends DashboardFragment {
|
||||
if (icicle == null
|
||||
&& getIntent().getBooleanExtra(EXTRA_SHOW_PRIVATE_SPACE_UNLOCKED, false)) {
|
||||
Log.i(TAG, "Private space unlocked showing toast");
|
||||
Toast.makeText(getContext(), R.string.private_space_unlocked, Toast.LENGTH_SHORT)
|
||||
Drawable drawable =
|
||||
getContext().getDrawable(R.drawable.ic_private_space_unlock_icon);
|
||||
Toast.makeCustomToastWithIcon(
|
||||
getContext(),
|
||||
null /* looper */,
|
||||
getContext().getString(R.string.private_space_unlocked),
|
||||
Toast.LENGTH_SHORT,
|
||||
drawable)
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user