OSDN Git Service

LayoutLib: put a default image on the quickcontactbadge.
authorXavier Ducrohet <xav@android.com>
Thu, 27 Jan 2011 01:30:59 +0000 (17:30 -0800)
committerXavier Ducrohet <xav@android.com>
Thu, 27 Jan 2011 01:30:59 +0000 (17:30 -0800)
Change-Id: I64b3f4004801ec03f374460384f9a492e66bfaf0

tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java

index 6224047..8b06452 100644 (file)
@@ -68,6 +68,7 @@ import android.view.View.MeasureSpec;
 import android.view.ViewGroup.LayoutParams;
 import android.widget.FrameLayout;
 import android.widget.LinearLayout;
+import android.widget.QuickContactBadge;
 import android.widget.TabHost;
 import android.widget.TabWidget;
 import android.widget.TabHost.TabSpec;
@@ -1016,6 +1017,9 @@ public class RenderSessionImpl extends FrameworkResourceIdProvider {
             throws PostInflateException {
         if (view instanceof TabHost) {
             setupTabHost((TabHost)view, projectCallback);
+        } else if (view instanceof QuickContactBadge) {
+            QuickContactBadge badge = (QuickContactBadge) view;
+            badge.setImageToDefault();
         } else if (view instanceof ViewGroup) {
             ViewGroup group = (ViewGroup)view;
             final int count = group.getChildCount();