— a/packages/apps/Launcher3/src/com/android/launcher3/Launcher.java
+++ b/packages/apps/Launcher3/src/com/android/launcher3/Launcher.java
@@ -60,9 +60,12 @@ import android.os.Trace;
import android.os.UserHandle;
import android.support.annotation.Nullable;
import android.text.Selection;
+import android.text.SpannableString;
import android.text.SpannableStringBuilder;
+import android.text.Spanned;
import android.text.TextUtils;
import android.text.method.TextKeyListener;
+import android.text.style.ForegroundColorSpan;
import android.util.Log;
import android.view.Display;
import android.view.HapticFeedbackConstants;
@@ -168,7 +171,6 @@ import android.widget.Toast;
//add by ycj
import android.widget.EditText;
//end
/**
- Default launcher application.
*/
@@ -542,8 +544,12 @@ public class Launcher extends BaseActivity
//add by lhs
final EditText editText = new EditText(mContext);
AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
-
String password = getString(R.string.password);
-
SpannableString title = new SpannableString(password/* R.string.password */);
-
title.setSpan(new ForegroundColorSpan(Color.BLACK), 0, title.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE); editText.setBackgroundDrawable(new ColorDrawable(Color.LTGRAY));
-
builder.setTitle(R.string.password)
-
editText.setTextColor(Color.BLACK);
-
builder.setTitle(title) .setView(editText) .setPositiveButton("Ok", new DialogInterface.OnClickListener() { @Override