diff --git a/core/java/com/android/internal/widget/ContactHeaderWidget.java b/core/java/com/android/internal/widget/ContactHeaderWidget.java index d7582917719b5..4f77aa2fc6a71 100644 --- a/core/java/com/android/internal/widget/ContactHeaderWidget.java +++ b/core/java/com/android/internal/widget/ContactHeaderWidget.java @@ -174,6 +174,7 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList mPresenceView = (ImageView) findViewById(R.id.presence); mStatusView = (TextView)findViewById(R.id.status); + setSocialSnippet(null); // Set the photo with a random "no contact" image long now = SystemClock.elapsedRealtime(); @@ -355,7 +356,12 @@ public class ContactHeaderWidget extends FrameLayout implements View.OnClickList * Manually set the social snippet text to display in the header. */ public void setSocialSnippet(CharSequence snippet) { - mStatusView.setText(snippet); + if (snippet == null) { + mStatusView.setVisibility(View.GONE); + } else { + mStatusView.setText(snippet); + mStatusView.setVisibility(View.VISIBLE); + } } /** diff --git a/core/res/res/layout-ja/contact_header_name.xml b/core/res/res/layout-ja/contact_header_name.xml index 9dceeb6e77801..faf1b877fcf90 100644 --- a/core/res/res/layout-ja/contact_header_name.xml +++ b/core/res/res/layout-ja/contact_header_name.xml @@ -4,9 +4,9 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,11 +20,11 @@ android:orientation="vertical" android:layout_width="0dip" android:layout_weight="1" - android:layout_height="wrap_content"> + android:layout_height="fill_parent"> - + android:paddingRight="5dip"> + /> - + + + android:orientation="vertical" + android:layout_gravity="center_vertical" > - + - + diff --git a/core/res/res/layout/contact_header_name.xml b/core/res/res/layout/contact_header_name.xml index 9a56fb49dbd90..a763c22c57de5 100644 --- a/core/res/res/layout/contact_header_name.xml +++ b/core/res/res/layout/contact_header_name.xml @@ -4,9 +4,9 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,4 +23,5 @@ android:textStyle="bold" android:singleLine="true" android:ellipsize="end" + android:layout_gravity="center_vertical" />