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:
@@ -21,6 +21,7 @@ import android.app.settings.SettingsEnums;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -100,6 +101,7 @@ public class SetupSuccessFragment extends InstrumentedFragment {
|
||||
allAppsIntent.setPackage(resolveInfo.activityInfo.packageName);
|
||||
allAppsIntent.setComponent(resolveInfo.activityInfo.getComponentName());
|
||||
}
|
||||
activity.setTheme(R.style.Theme_SubSettings);
|
||||
accessPrivateSpaceToast();
|
||||
startActivity(allAppsIntent);
|
||||
Log.i(TAG, "Private space setup complete");
|
||||
@@ -109,7 +111,13 @@ public class SetupSuccessFragment extends InstrumentedFragment {
|
||||
}
|
||||
|
||||
private void accessPrivateSpaceToast() {
|
||||
Toast.makeText(getContext(), R.string.private_space_scrolldown_to_access,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
Drawable drawable = getContext().getDrawable(R.drawable.ic_private_space_icon);
|
||||
Toast.makeCustomToastWithIcon(
|
||||
getContext(),
|
||||
null /* looper */ ,
|
||||
getContext().getString(R.string.private_space_scrolldown_to_access),
|
||||
Toast.LENGTH_SHORT,
|
||||
drawable)
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user