YorkShen closed pull request #1641: [WEEX-646][Android] fix loading disappear 
when refresh more than one time
URL: https://github.com/apache/incubator-weex/pull/1641
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXLoading.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXLoading.java
index 8130ace9cd..9ddd15a75a 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXLoading.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXLoading.java
@@ -60,6 +60,16 @@ public void onLoading() {
     }
   }
 
+  @Override
+  protected void setHostLayoutParams(WXFrameLayout host, int width, int height,
+                                     int left, int right, int top, int bottom) 
{
+    // The view of WXLoading will always be wrapped by a WXRefreshView at some 
point
+    // which is unknowable for front-end so the margins should always be 0 in 
LayoutParams,
+    // otherwise it will bring visible layout errors. This means WXLoading do 
not
+    // support margin.
+    super.setHostLayoutParams(host, width, height, 0, 0, 0, 0);
+  }
+
   @Override
   public void onPullingUp(float dy, int pullOutDistance, float viewHeight) {
     if (getEvents().contains(Constants.Event.ONPULLING_UP)) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to