Skip to content

Commit

Permalink
* [android] format code
Browse files Browse the repository at this point in the history
  • Loading branch information
zshshr committed Mar 3, 2017
1 parent cfb1b56 commit 040f4b8
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,14 +307,11 @@ public void setHeaderView(WXComponent refresh) {
WXRefreshView refreshView = swipeLayout.getHeaderView();
if (refreshView != null) {
ImmutableDomObject immutableDomObject = refresh.getDomObject();
if (immutableDomObject == null) {
if (immutableDomObject != null) {
int refreshHeight = (int) immutableDomObject.getLayoutHeight();

swipeLayout.setRefreshHeight(refreshHeight);

String colorStr = (String) immutableDomObject.getStyles().get(Constants.Name.BACKGROUND_COLOR);
String bgColor = WXUtils.getString(colorStr, null);

if (bgColor != null) {
if (!TextUtils.isEmpty(bgColor)) {
int colorInt = WXResourceUtils.getColor(bgColor);
Expand All @@ -338,13 +335,12 @@ public void setFooterView(WXComponent loading) {
if (swipeLayout != null) {
WXRefreshView refreshView = swipeLayout.getFooterView();
if (refreshView != null) {
ImmutableDomObject object = loading.getDomObject();
if (object != null) {
int loadingHeight = (int) loading.getDomObject().getLayoutHeight();
ImmutableDomObject immutableDomObject = loading.getDomObject();
if (immutableDomObject != null) {
int loadingHeight = (int) immutableDomObject.getLayoutHeight();
swipeLayout.setLoadingHeight(loadingHeight);
String colorStr = (String) loading.getDomObject().getStyles().get(Constants.Name.BACKGROUND_COLOR);
String colorStr = (String) immutableDomObject.getStyles().get(Constants.Name.BACKGROUND_COLOR);
String bgColor = WXUtils.getString(colorStr, null);

if (bgColor != null) {
if (!TextUtils.isEmpty(bgColor)) {
int colorInt = WXResourceUtils.getColor(bgColor);
Expand Down

0 comments on commit 040f4b8

Please sign in to comment.