diff --git a/app/build.gradle b/app/build.gradle
index e6e2452..44bde44 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -122,8 +122,8 @@ dependencies {
kapt "android.arch.persistence.room:compiler:1.1.0"
// Glide dependencies
- implementation 'com.github.bumptech.glide:glide:4.7.1'
- annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
+ implementation 'com.github.bumptech.glide:glide:4.8.0'
+ annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
debugImplementation 'com.amitshekhar.android:debug-db:1.0.4'
}
diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/AccountSettingsActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/AccountSettingsActivity.java
index 33e547b..1848919 100644
--- a/app/src/main/java/cy/agorise/crystalwallet/activities/AccountSettingsActivity.java
+++ b/app/src/main/java/cy/agorise/crystalwallet/activities/AccountSettingsActivity.java
@@ -14,6 +14,9 @@ import android.view.SurfaceView;
import android.widget.ImageView;
import android.widget.TextView;
+import com.bumptech.glide.Glide;
+import com.bumptech.glide.request.RequestOptions;
+
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
@@ -37,18 +40,11 @@ public class AccountSettingsActivity extends AppCompatActivity{
public SettingsPagerAdapter settingsPagerAdapter;
- @BindView(R.id.surface_view)
- public SurfaceView mSurfaceView;
-
@BindView(R.id.tvBuildVersion)
public TextView tvBuildVersion;
- /*
- * For the window animation
- * */
- private MediaPlayer mediaPlayer;
-
-
+ @BindView(R.id.ivAppBarAnimation)
+ ImageView ivAppBarAnimation;
@Override
@@ -60,29 +56,11 @@ public class AccountSettingsActivity extends AppCompatActivity{
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
- // Appbar animation
- mSurfaceView.getHolder().addCallback(new SurfaceHolder.Callback() {
- @Override
- public void surfaceCreated(SurfaceHolder surfaceHolder) {
- //Log.d(TAG,"surfaceCreated");
- mediaPlayer = MediaPlayer.create(AccountSettingsActivity.this, R.raw.appbar_background);
- mediaPlayer.setDisplay(mSurfaceView.getHolder());
- mediaPlayer.setLooping(true);
- mediaPlayer.start();
- }
-
- @Override
- public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i1, int i2) {
- //Log.d(TAG,"surfaceChanged");
- }
-
- @Override
- public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
- //Log.d(TAG,"surfaceDestroyed");
- mediaPlayer.stop();
- mediaPlayer.release();
- }
- });
+ // Sets AppBar animation
+ Glide.with(this)
+ .load(R.drawable.appbar_background)
+ .apply(new RequestOptions().centerCrop())
+ .into(ivAppBarAnimation);
settingsPagerAdapter = new SettingsPagerAdapter(getSupportFragmentManager());
mPager.setAdapter(settingsPagerAdapter);
@@ -93,19 +71,6 @@ public class AccountSettingsActivity extends AppCompatActivity{
tabLayout.addOnTabSelectedListener(new TabLayout.ViewPagerOnTabSelectedListener(mPager));
}
-
- @Override
- protected void onDestroy() {
- super.onDestroy();
-
- //Release the media player
- if(mediaPlayer!=null){
- mediaPlayer.release();
- mediaPlayer = null;
- }
- }
-
-
private class SettingsPagerAdapter extends FragmentStatePagerAdapter {
SettingsPagerAdapter(FragmentManager fm) {
super(fm);
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 560b78f..08a81bb 100644
--- a/app/src/main/java/cy/agorise/crystalwallet/activities/BoardActivity.java
+++ b/app/src/main/java/cy/agorise/crystalwallet/activities/BoardActivity.java
@@ -8,9 +8,6 @@ import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
-import android.graphics.Color;
-import android.graphics.Typeface;
-import android.media.MediaPlayer;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.TabLayout;
@@ -20,18 +17,10 @@ import android.support.v4.app.FragmentStatePagerAdapter;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.view.ViewPager;
import android.support.v7.widget.Toolbar;
-import android.text.Spannable;
-import android.text.SpannableString;
-import android.text.style.ForegroundColorSpan;
import android.util.Pair;
-import android.view.SurfaceHolder;
-import android.view.SurfaceView;
import android.view.View;
-import android.view.ViewGroup;
import android.view.animation.LinearInterpolator;
import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
@@ -48,7 +37,6 @@ import cy.agorise.crystalwallet.fragments.MerchantsFragment;
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,8 +61,8 @@ public class BoardActivity extends CustomActivity {
@BindView(R.id.fabAddContact)
public FloatingActionButton fabAddContact;
- @BindView(R.id.imagevieGIF)
- public GIFView imagevieGIF;
+ @BindView(R.id.ivAppBarAnimation)
+ ImageView ivAppBarAnimation;
public BoardPagerAdapter boardAdapter;
@@ -84,9 +72,6 @@ public class BoardActivity extends CustomActivity {
*/
long cryptoNetAccountId;
- @BindView(R.id.surface_view)
- public SurfaceView mSurfaceView;
-
@BindView(R.id.toolbar_user_img)
public CircleImageView userImage;
@@ -98,14 +83,6 @@ public class BoardActivity extends CustomActivity {
File photoDirectory;
- /*
- * For the window animation
- * */
- private MediaPlayer mediaPlayer;
-
-
-
-
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -118,39 +95,11 @@ public class BoardActivity extends CustomActivity {
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
- /*
- * Set the bubbles animation
- * */
- //imagevieGIF.centerCrop();
- //imagevieGIF.load(R.raw.burbujas);
-
- /*
- * Listener tabLayout to resalt text when clicked
- * */
-
- // Appbar animation
- mSurfaceView.getHolder().addCallback(new SurfaceHolder.Callback() {
- @Override
- public void surfaceCreated(SurfaceHolder surfaceHolder) {
- //Log.d(TAG,"surfaceCreated");
- mediaPlayer = MediaPlayer.create(BoardActivity.this, R.raw.appbar_background);
- mediaPlayer.setDisplay(mSurfaceView.getHolder());
- mediaPlayer.setLooping(true);
- mediaPlayer.start();
- }
-
- @Override
- public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i1, int i2) {
- //Log.d(TAG,"surfaceChanged");
- }
-
- @Override
- public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
- //Log.d(TAG,"surfaceDestroyed");
- mediaPlayer.stop();
- mediaPlayer.release();
- }
- });
+ // Sets AppBar animation
+ Glide.with(this)
+ .load(R.drawable.appbar_background)
+ .apply(new RequestOptions().centerCrop())
+ .into(ivAppBarAnimation);
boardAdapter = new BoardPagerAdapter(getSupportFragmentManager());
mPager.setAdapter(boardAdapter);
@@ -236,17 +185,6 @@ public class BoardActivity extends CustomActivity {
loadUserImage();
}
- @Override
- protected void onDestroy() {
- super.onDestroy();
-
- //Release the media player
- if(mediaPlayer!=null){
- mediaPlayer.release();
- mediaPlayer = null;
- }
- }
-
public void loadUserImage(){
//Search for a existing photo
File photoFile = new File(photoDirectory + File.separator + "photo.png");
diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/CryptoNetAccountSettingsActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/CryptoNetAccountSettingsActivity.java
index 429f6f4..9406ff0 100644
--- a/app/src/main/java/cy/agorise/crystalwallet/activities/CryptoNetAccountSettingsActivity.java
+++ b/app/src/main/java/cy/agorise/crystalwallet/activities/CryptoNetAccountSettingsActivity.java
@@ -18,6 +18,9 @@ import android.view.SurfaceView;
import android.widget.ImageView;
import android.widget.TextView;
+import com.bumptech.glide.Glide;
+import com.bumptech.glide.request.RequestOptions;
+
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
@@ -45,8 +48,6 @@ public class CryptoNetAccountSettingsActivity extends AppCompatActivity{
public SettingsPagerAdapter settingsPagerAdapter;
- @BindView(R.id.surface_view)
- public SurfaceView mSurfaceView;
@BindView(R.id.tvBuildVersion)
public TextView tvBuildVersion;
@@ -56,13 +57,8 @@ public class CryptoNetAccountSettingsActivity extends AppCompatActivity{
private CryptoNetAccount cryptoNetAccount;
- /*
- * For the window animation
- * */
- private MediaPlayer mediaPlayer;
-
-
-
+ @BindView(R.id.ivAppBarAnimation)
+ ImageView ivAppBarAnimation;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -101,27 +97,11 @@ public class CryptoNetAccountSettingsActivity extends AppCompatActivity{
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
- // Appbar animation
- mSurfaceView.getHolder().addCallback(new SurfaceHolder.Callback() {
- @Override
- public void surfaceCreated(SurfaceHolder surfaceHolder) {
- //Log.d(TAG,"surfaceCreated");
- mediaPlayer = MediaPlayer.create(CryptoNetAccountSettingsActivity.this, R.raw.appbar_background);
- mediaPlayer.setDisplay(mSurfaceView.getHolder());
- mediaPlayer.setLooping(true);
- mediaPlayer.start();
- }
-
- @Override
- public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i1, int i2) {
- //Log.d(TAG,"surfaceChanged");
- }
-
- @Override
- public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
- //Log.d(TAG,"surfaceDestroyed");
- }
- });
+ // Sets AppBar animation
+ Glide.with(this)
+ .load(R.drawable.appbar_background)
+ .apply(new RequestOptions().centerCrop())
+ .into(ivAppBarAnimation);
} else {
@@ -129,19 +109,6 @@ public class CryptoNetAccountSettingsActivity extends AppCompatActivity{
}
}
-
- @Override
- protected void onDestroy() {
- super.onDestroy();
-
- //Release the media player
- if(mediaPlayer!=null){
- mediaPlayer.release();
- mediaPlayer = null;
- }
- }
-
-
private class SettingsPagerAdapter extends FragmentStatePagerAdapter {
SettingsPagerAdapter(FragmentManager fm) {
super(fm);
diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/SettingsActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/SettingsActivity.java
index 4280f64..1c0e253 100644
--- a/app/src/main/java/cy/agorise/crystalwallet/activities/SettingsActivity.java
+++ b/app/src/main/java/cy/agorise/crystalwallet/activities/SettingsActivity.java
@@ -14,6 +14,8 @@ import android.view.SurfaceView;
import android.widget.ImageView;
import android.widget.TextView;
+import com.bumptech.glide.Glide;
+import com.bumptech.glide.request.RequestOptions;
import com.sjaramillo10.animatedtablayout.AnimatedTabLayout;
import butterknife.BindView;
@@ -42,20 +44,13 @@ public class SettingsActivity extends AppCompatActivity{
public SettingsPagerAdapter settingsPagerAdapter;
- @BindView(R.id.surface_view)
- public SurfaceView mSurfaceView;
-
@BindView(R.id.tvBuildVersion)
public TextView tvBuildVersion;
private SecuritySettingsFragment securitySettingsFragment;
- /*
- * For the window animation
- * */
- private MediaPlayer mediaPlayer;
-
-
+ @BindView(R.id.ivAppBarAnimation)
+ ImageView ivAppBarAnimation;
@Override
@@ -67,29 +62,11 @@ public class SettingsActivity extends AppCompatActivity{
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
- // Appbar animation
- mSurfaceView.getHolder().addCallback(new SurfaceHolder.Callback() {
- @Override
- public void surfaceCreated(SurfaceHolder surfaceHolder) {
- //Log.d(TAG,"surfaceCreated");
- mediaPlayer = MediaPlayer.create(SettingsActivity.this, R.raw.appbar_background);
- mediaPlayer.setDisplay(mSurfaceView.getHolder());
- mediaPlayer.setLooping(true);
- mediaPlayer.start();
- }
-
- @Override
- public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i1, int i2) {
- //Log.d(TAG,"surfaceChanged");
- }
-
- @Override
- public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
- //Log.d(TAG,"surfaceDestroyed");
- mediaPlayer.stop();
- mediaPlayer.release();
- }
- });
+ // Sets AppBar animation
+ Glide.with(this)
+ .load(R.drawable.appbar_background)
+ .apply(new RequestOptions().centerCrop())
+ .into(ivAppBarAnimation);
settingsPagerAdapter = new SettingsPagerAdapter(getSupportFragmentManager());
mPager.setAdapter(settingsPagerAdapter);
@@ -133,17 +110,6 @@ public class SettingsActivity extends AppCompatActivity{
}
}
- @Override
- protected void onDestroy() {
- super.onDestroy();
-
- //Release the media player
- if(mediaPlayer != null){
- mediaPlayer.release();
- mediaPlayer = null;
- }
- }
-
@OnClick(R.id.ivGoBack)
public void goBack(){
onBackPressed();
diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/natives/VideoExView.kt b/app/src/main/java/cy/agorise/crystalwallet/views/natives/VideoExView.kt
deleted file mode 100644
index b8fb54a..0000000
--- a/app/src/main/java/cy/agorise/crystalwallet/views/natives/VideoExView.kt
+++ /dev/null
@@ -1,34 +0,0 @@
-package cy.agorise.crystalwallet.views.natives
-
-import android.content.Context
-import android.net.Uri
-import android.util.AttributeSet
-import android.widget.VideoView
-import cy.agorise.crystalwallet.R
-import kotlinx.android.synthetic.main.empty_activity.*
-
-/*
-* Extensión for videoview
-* */
-class VideoExView(context: Context?, attrs: AttributeSet?) : VideoView(context, attrs) {
-
- /*
- * Set the path based on raw, this should be called first to set the video path
- * */
- fun setVideoRaw(rawID:Int){
- val uriPath = "android.resource://" + context.packageName + "/" + R.raw.appbar_background
- val uri = Uri.parse(uriPath)
- this.setVideoURI(uri)
- }
-
- /*
- * With this method the video play continues
- * */
- fun playContinius(){
-
- start()
- this.setOnCompletionListener {
- start()
- }
- }
-}
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml
index e4161e6..2f064c9 100644
--- a/app/src/main/res/layout/activity_settings.xml
+++ b/app/src/main/res/layout/activity_settings.xml
@@ -19,10 +19,10 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
-
+ android:layout_height="match_parent" />
-
-
+ android:background="@color/colorPrimaryTransparent"/>
-
+ android:layout_height="match_parent" />
-
-
\ No newline at end of file
diff --git a/app/src/main/res/raw/appbar_background.mp4 b/app/src/main/res/raw/appbar_background.mp4
deleted file mode 100644
index db5535e..0000000
Binary files a/app/src/main/res/raw/appbar_background.mp4 and /dev/null differ