From 1fce05145d9f3969c01adbbaeacf99a8a8eef7eb Mon Sep 17 00:00:00 2001 From: dtvv Date: Thu, 23 Aug 2018 23:45:15 -0500 Subject: [PATCH] New unit test implementation github style for some UI implementations --- app/src/main/AndroidManifest.xml | 14 +++++++++++--- .../activities/BoardActivity.java | 8 ++++---- .../network/WebSocketThread.java | 19 ------------------- app/src/main/res/layout/board.xml | 2 +- 4 files changed, 16 insertions(+), 27 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index e2d944b..a81d557 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -17,7 +17,7 @@ android:supportsRtl="true" android:configChanges="locale" android:theme="@style/AppTheme"> - + @@ -92,8 +92,16 @@ - + + + + + + + + + + diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/BoardActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/BoardActivity.java index 8f811cd..90be602 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/BoardActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/BoardActivity.java @@ -47,6 +47,7 @@ import cy.agorise.crystalwallet.fragments.ContactsFragment; import cy.agorise.crystalwallet.fragments.ReceiveTransactionFragment; import cy.agorise.crystalwallet.fragments.SendTransactionFragment; import cy.agorise.crystalwallet.fragments.TransactionsFragment; +import cy.agorise.crystalwallet.views.natives.GIFView; import de.hdodenhof.circleimageview.CircleImageView; import cy.agorise.crystalwallet.viewmodels.CryptoNetBalanceListViewModel; @@ -73,7 +74,7 @@ public class BoardActivity extends CustomActivity { public FloatingActionButton fabAddContact; @BindView(R.id.imagevieGIF) - public ImageView imagevieGIF; + public GIFView imagevieGIF; public BoardPagerAdapter boardAdapter; @@ -112,9 +113,8 @@ public class BoardActivity extends CustomActivity { /* * Set the bubbles animation * */ - final RequestOptions options = new RequestOptions(); - options.centerCrop(); - Glide.with(this).asGif().load(R.raw.burbujas).apply(options).into(imagevieGIF); + imagevieGIF.centerCrop(); + imagevieGIF.load(R.raw.burbujas); /* * Listener tabLayout to resalt text when clicked diff --git a/app/src/main/java/cy/agorise/crystalwallet/network/WebSocketThread.java b/app/src/main/java/cy/agorise/crystalwallet/network/WebSocketThread.java index 3c5c433..3009f2e 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/network/WebSocketThread.java +++ b/app/src/main/java/cy/agorise/crystalwallet/network/WebSocketThread.java @@ -156,13 +156,6 @@ public class WebSocketThread extends Thread { canChange = false; - /* - * Show the loading activity so user can see the progress - * */ - if(activity!=null){ - LoadingActivity.show(activity); - } - // Moves the current Thread into the background android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_BACKGROUND); @@ -180,13 +173,6 @@ public class WebSocketThread extends Thread { WebSocketThread.currentThreads.put(this.getId(),this); mWebSocket.connect(); - /* - * Hide the loading activity, now it is not more necesary - * */ - if(activity!=null){ - LoadingActivity.dismiss(); - } - /* * * Websocket success response @@ -198,11 +184,6 @@ public class WebSocketThread extends Thread { } catch (final Exception e) { Log.e(TAG, "WebSocketException. Msg: "+e.getMessage()); - /* - * Hide the loading activity, now it is not more necesary - * */ - LoadingActivity.dismiss(); - //Deliver error to user if(activity!=null){ diff --git a/app/src/main/res/layout/board.xml b/app/src/main/res/layout/board.xml index 79a1004..2cfab65 100644 --- a/app/src/main/res/layout/board.xml +++ b/app/src/main/res/layout/board.xml @@ -31,7 +31,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" /> -