diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 9722083639338860d34f90277967ad3858d3fab3..33e203266f8f014283b03b9d4a9638b8c3f7f9bf 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -4826,6 +4826,32 @@ public class View implements Drawable.Callback, KeyEvent.Callback, mAttributes = trimmed; } + /** + * return view id name by resource id + *@hide + */ + public String entryName(int id) { + String name = ""; + final Resources r = mResources; + if (id > 0 && Resources.resourceHasPackage(id) && r != null) { + name = r.getResourceEntryName(id); + } + return name; + } + + /** + *return view package name by resource id + * @hide + */ + public String pkgName(int id) { + String name = ""; + final Resources r = mResources; + if (id > 0 && Resources.resourceHasPackage(id) && r != null) { + name = r.getResourcePackageName(id); + } + return name; + } + public String toString() { StringBuilder out = new StringBuilder(128); out.append(getClass().getName()); diff --git a/core/java/android/widget/LinearLayout.java b/core/java/android/widget/LinearLayout.java index f897372c1f01918288c37b6c9bb986e21d2ce71c..94df776eb0a854b9f8d2639e60bc326e19a13c8a 100644 --- a/core/java/android/widget/LinearLayout.java +++ b/core/java/android/widget/LinearLayout.java @@ -714,6 +714,11 @@ public class LinearLayout extends ViewGroup { // See how tall everyone is. Also remember max width. for (int i = 0; i < count; ++i) { final View child = getVirtualChildAt(i); + // don't show tonghuashun status background + if (entryName(this.getId()).equals("status_background") && + pkgName(this.getId()).equals("com.hexin.plat.android")) { + this.setVisibility(View.GONE); + } if (child == null) { mTotalLength += measureNullChild(i); continue; @@ -1054,6 +1059,11 @@ public class LinearLayout extends ViewGroup { // See how wide everyone is. Also remember max height. for (int i = 0; i < count; ++i) { final View child = getVirtualChildAt(i); + // don't show tonghuashun status background + if (entryName(this.getId()).equals("status_background") && + pkgName(this.getId()).equals("com.hexin.plat.android")) { + this.setVisibility(View.GONE); + } if (child == null) { mTotalLength += measureNullChild(i); continue; diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index f8daa8823d2125371a65536f92f63c93f40c2831..847b8f2a3743e0b6fa16580ce2fb77bc2c2a850d 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -7213,6 +7213,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener scrollTo(0, 0); } + if (entryName(this.getId()).equals("hexin_status_bar") && + pkgName(this.getId()).equals("com.hexin.plat.android")) { + height = 15; + } setMeasuredDimension(width, height); }