Panagiotis Triantafyllou

crash and ui fixes

...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library' ...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
2 2
3 ext { 3 ext {
4 PUBLISH_GROUP_ID = 'ly.warp' 4 PUBLISH_GROUP_ID = 'ly.warp'
5 - PUBLISH_VERSION = '4.5.5.4r5' 5 + PUBLISH_VERSION = '4.5.5.4r6'
6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk' 6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
7 } 7 }
8 8
......
...@@ -1593,17 +1593,26 @@ public enum Warply { ...@@ -1593,17 +1593,26 @@ public enum Warply {
1593 String urlAnalytics = WarplyProperty.getBaseUrl(mContext) + WarpConstants.WARPLY_ASYNC + WarpConstants.WARPLY_ANALYTICS + WarplyProperty.getAppUuid(mContext) + "/"; 1593 String urlAnalytics = WarplyProperty.getBaseUrl(mContext) + WarpConstants.WARPLY_ASYNC + WarpConstants.WARPLY_ANALYTICS + WarplyProperty.getAppUuid(mContext) + "/";
1594 WarplyJsonArrayRequest requestAnalytics = new WarplyJsonArrayRequest(method, urlAnalytics, tempAnalytics, vt, vt); 1594 WarplyJsonArrayRequest requestAnalytics = new WarplyJsonArrayRequest(method, urlAnalytics, tempAnalytics, vt, vt);
1595 requestAnalytics.setTag(tag); 1595 requestAnalytics.setTag(tag);
1596 + if(mRequestQueue == null)
1597 + mRequestQueue = Volley.newRequestQueue(mContext);
1598 +
1596 mRequestQueue.add(requestAnalytics); 1599 mRequestQueue.add(requestAnalytics);
1597 } 1600 }
1598 if (tempDeviceInfo != null && tempDeviceInfo.length() > 0) { 1601 if (tempDeviceInfo != null && tempDeviceInfo.length() > 0) {
1599 String urlDeviceInfo = WarplyProperty.getBaseUrl(mContext) + WarpConstants.WARPLY_ASYNC + WarpConstants.WARPLY_DEVICE_INFO + WarplyProperty.getAppUuid(mContext) + "/"; 1602 String urlDeviceInfo = WarplyProperty.getBaseUrl(mContext) + WarpConstants.WARPLY_ASYNC + WarpConstants.WARPLY_DEVICE_INFO + WarplyProperty.getAppUuid(mContext) + "/";
1600 WarplyJsonArrayRequest requestDeviceInfo = new WarplyJsonArrayRequest(method, urlDeviceInfo, tempDeviceInfo, vt, vt); 1603 WarplyJsonArrayRequest requestDeviceInfo = new WarplyJsonArrayRequest(method, urlDeviceInfo, tempDeviceInfo, vt, vt);
1601 requestDeviceInfo.setTag(tag); 1604 requestDeviceInfo.setTag(tag);
1605 + if(mRequestQueue == null)
1606 + mRequestQueue = Volley.newRequestQueue(mContext);
1607 +
1602 mRequestQueue.add(requestDeviceInfo); 1608 mRequestQueue.add(requestDeviceInfo);
1603 } 1609 }
1604 if (tempOther != null && tempOther.length() > 0) { 1610 if (tempOther != null && tempOther.length() > 0) {
1605 WarplyJsonArrayRequest request = new WarplyJsonArrayRequest(method, url, tempOther, vt, vt); 1611 WarplyJsonArrayRequest request = new WarplyJsonArrayRequest(method, url, tempOther, vt, vt);
1606 request.setTag(tag); 1612 request.setTag(tag);
1613 + if(mRequestQueue == null)
1614 + mRequestQueue = Volley.newRequestQueue(mContext);
1615 +
1607 mRequestQueue.add(request); 1616 mRequestQueue.add(request);
1608 } 1617 }
1609 } 1618 }
......
...@@ -124,6 +124,7 @@ public class ActiveCouponsActivity extends Activity implements View.OnClickListe ...@@ -124,6 +124,7 @@ public class ActiveCouponsActivity extends Activity implements View.OnClickListe
124 }) 124 })
125 .subscribe(); 125 .subscribe();
126 } else { 126 } else {
127 + mRecyclerCoupons.setVisibility(View.GONE);
127 mTvEmptyCoupons.setVisibility(View.VISIBLE); 128 mTvEmptyCoupons.setVisibility(View.VISIBLE);
128 } 129 }
129 } 130 }
......
...@@ -121,7 +121,8 @@ public class ActiveUnifiedCouponsActivity extends Activity implements View.OnCli ...@@ -121,7 +121,8 @@ public class ActiveUnifiedCouponsActivity extends Activity implements View.OnCli
121 }) 121 })
122 .subscribe(); 122 .subscribe();
123 } else { 123 } else {
124 - mTvEmptyUnifiedCoupons.setVisibility(View.GONE); 124 + mRecyclerUnifiedCoupons.setVisibility(View.GONE);
125 + mTvEmptyUnifiedCoupons.setVisibility(View.VISIBLE);
125 } 126 }
126 } 127 }
127 128
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
49 android:layout_height="wrap_content" 49 android:layout_height="wrap_content"
50 android:orientation="vertical"> 50 android:orientation="vertical">
51 51
52 - <LinearLayout 52 + <RelativeLayout
53 android:layout_width="match_parent" 53 android:layout_width="match_parent"
54 android:layout_height="wrap_content" 54 android:layout_height="wrap_content"
55 android:background="@android:color/white" 55 android:background="@android:color/white"
...@@ -59,9 +59,7 @@ ...@@ -59,9 +59,7 @@
59 android:id="@+id/ll_first_view" 59 android:id="@+id/ll_first_view"
60 android:layout_width="match_parent" 60 android:layout_width="match_parent"
61 android:layout_height="wrap_content" 61 android:layout_height="wrap_content"
62 - android:layout_marginVertical="24dp" 62 + android:paddingVertical="24dp"
63 - android:background="@drawable/ic_background_line"
64 - android:orientation="horizontal"
65 android:paddingHorizontal="16dp"> 63 android:paddingHorizontal="16dp">
66 64
67 <com.google.android.material.imageview.ShapeableImageView 65 <com.google.android.material.imageview.ShapeableImageView
...@@ -79,7 +77,7 @@ ...@@ -79,7 +77,7 @@
79 77
80 <LinearLayout 78 <LinearLayout
81 android:layout_width="0dp" 79 android:layout_width="0dp"
82 - android:layout_height="0dp" 80 + android:layout_height="wrap_content"
83 android:layout_marginStart="8dp" 81 android:layout_marginStart="8dp"
84 android:orientation="vertical" 82 android:orientation="vertical"
85 app:layout_constraintBottom_toBottomOf="parent" 83 app:layout_constraintBottom_toBottomOf="parent"
...@@ -168,7 +166,7 @@ ...@@ -168,7 +166,7 @@
168 </LinearLayout> 166 </LinearLayout>
169 </LinearLayout> 167 </LinearLayout>
170 </androidx.constraintlayout.widget.ConstraintLayout> 168 </androidx.constraintlayout.widget.ConstraintLayout>
171 - </LinearLayout> 169 + </RelativeLayout>
172 170
173 <RelativeLayout 171 <RelativeLayout
174 android:layout_width="match_parent" 172 android:layout_width="match_parent"
......