public void setBounceParms(int type, JSONObject json, String guestId) { String imagePath = null; String textColor = null; String levelText = null; String pullToReloadText = null; String releaseToReloadText = null; String loadingText = null; String loadingImagePath = null; imagePath = json.optString("imagePath"); if (null != imagePath) { imagePath = BUtility.makeRealPath( imagePath, mBrwView.getCurrentWidget().m_widgetPath, mBrwView.getCurrentWidget().m_wgtType); } textColor = json.optString("textColor"); levelText = json.optString("levelText"); pullToReloadText = json.optString("pullToReloadText"); releaseToReloadText = json.optString("releaseToReloadText"); loadingText = json.optString("loadingText"); if (null != guestId && guestId.equals("donghang")) { loadingImagePath = json.optString("loadingImagePath"); if (null != loadingImagePath) { loadingImagePath = BUtility.makeRealPath( loadingImagePath, mBrwView.getCurrentWidget().m_widgetPath, mBrwView.getCurrentWidget().m_wgtType); } } switch (type) { case EViewEntry.F_BOUNCE_TYPE_TOP: if (null != imagePath && 0 != imagePath.trim().length()) { mHeaderView.setArrowhead(imagePath); } if (null != loadingImagePath && 0 != loadingImagePath.trim().length()) { mHeaderView.setLoadingPic(loadingImagePath); } if ((null == textColor || 0 == textColor.trim().length()) && (null == pullToReloadText || 0 == pullToReloadText.trim().length()) && (null == releaseToReloadText || 0 == releaseToReloadText.trim().length()) && (null == loadingText || 0 == loadingText.trim().length())) { mHeaderView.setContentEmpty(true); } else { if (null != textColor && 0 != textColor.trim().length()) { int color = mBrwView.parseColor(textColor); mHeaderView.setTextColor(color); } if (null != levelText && 0 != levelText.trim().length()) { mHeaderView.setLevelText(levelText); } if (null != releaseToReloadText && 0 != releaseToReloadText.trim().length()) { mHeaderView.setReleaseToReloadText(releaseToReloadText); } if (null != loadingText && 0 != loadingText.trim().length()) { mHeaderView.setLoadingText(loadingText); } if (null != pullToReloadText && 0 != pullToReloadText.trim().length()) { mHeaderView.setPullToReloadText(pullToReloadText); } } break; case EViewEntry.F_BOUNCE_TYPE_BOTTOM: if (null != imagePath && 0 != imagePath.trim().length()) { mTailView.setArrowhead(imagePath); } if (null != loadingImagePath && 0 != loadingImagePath.trim().length()) { mTailView.setLoadingPic(loadingImagePath); } if ((null == textColor || 0 == textColor.trim().length()) && (null == pullToReloadText || 0 == pullToReloadText.trim().length()) && (null == releaseToReloadText || 0 == releaseToReloadText.trim().length()) && (null == loadingText || 0 == loadingText.trim().length())) { mTailView.setContentEmpty(true); } else { if (null != textColor && 0 != textColor.trim().length()) { int color = mBrwView.parseColor(textColor); mTailView.setTextColor(color); } if (null != levelText && 0 != levelText.trim().length()) { mTailView.setLevelText(levelText); } if (null != releaseToReloadText && 0 != releaseToReloadText.trim().length()) { mTailView.setReleaseToReloadText(releaseToReloadText); } if (null != loadingText && 0 != loadingText.trim().length()) { mTailView.setLoadingText(loadingText); } if (null != pullToReloadText && 0 != pullToReloadText.trim().length()) { mTailView.setPullToReloadText(pullToReloadText); } } break; } }