diff --git a/res/layout/master_clear_account.xml b/res/layout/master_clear_account.xml
index 4459c4793de..4a0552de873 100644
--- a/res/layout/master_clear_account.xml
+++ b/res/layout/master_clear_account.xml
@@ -14,10 +14,23 @@
limitations under the License.
-->
-
+ android:gravity="center_vertical"
+ android:orientation="horizontal"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp">
+
+
+
diff --git a/src/com/android/settings/MasterClear.java b/src/com/android/settings/MasterClear.java
index 4f7c53a0aa8..8483114ebc9 100644
--- a/src/com/android/settings/MasterClear.java
+++ b/src/com/android/settings/MasterClear.java
@@ -37,6 +37,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.CheckBox;
+import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -265,10 +266,9 @@ public class MasterClear extends OptionsMenuFragment {
icon = context.getPackageManager().getDefaultActivityIcon();
}
- TextView child = (TextView)inflater.inflate(R.layout.master_clear_account,
- contents, false);
- child.setText(account.name);
- child.setCompoundDrawablesWithIntrinsicBounds(icon, null, null, null);
+ View child = inflater.inflate(R.layout.master_clear_account, contents, false);
+ ((ImageView) child.findViewById(android.R.id.icon)).setImageDrawable(icon);
+ ((TextView) child.findViewById(android.R.id.title)).setText(account.name);
contents.addView(child);
}
}