From 2654b044b25bee031b55fa4279083b6e408933fd Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Fri, 24 Aug 2018 04:05:05 +0200 Subject: [PATCH] Minor fixs - Icon size fix - Fix details activity crash --- .../DetailsActivityFragments/InformationFragment.java | 6 ++++-- .../moodl/Activities/HomeActivityFragments/Summary.java | 2 +- app/src/main/res/layout-v21/cardview_currency.xml | 4 ++-- app/src/main/res/layout-v21/cardview_watchlist.xml | 4 ++-- app/src/main/res/layout/cardview_currency.xml | 4 ++-- app/src/main/res/layout/cardview_watchlist.xml | 4 ++-- app/src/main/res/layout/detailsactivity_fragment_charts.xml | 3 ++- app/src/main/res/values/dimens.xml | 2 ++ 8 files changed, 17 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/com/herbron/moodl/Activities/DetailsActivityFragments/InformationFragment.java b/app/src/main/java/com/herbron/moodl/Activities/DetailsActivityFragments/InformationFragment.java index f29c6f1..595c241 100644 --- a/app/src/main/java/com/herbron/moodl/Activities/DetailsActivityFragments/InformationFragment.java +++ b/app/src/main/java/com/herbron/moodl/Activities/DetailsActivityFragments/InformationFragment.java @@ -9,6 +9,7 @@ import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.text.Html; import android.text.method.LinkMovementMethod; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -74,14 +75,15 @@ public class InformationFragment extends Fragment { { if(isTickerUpdated && isSnapshotUpdated) { - if(getActivity() != null) - { + try { getActivity().runOnUiThread(new Runnable() { @Override public void run() { refreshInfoTab(); } }); + } catch (NullPointerException e) { + Log.d("moodl", "Information tab do not needs to be updated anymore"); } } } diff --git a/app/src/main/java/com/herbron/moodl/Activities/HomeActivityFragments/Summary.java b/app/src/main/java/com/herbron/moodl/Activities/HomeActivityFragments/Summary.java index 22806f2..487f503 100644 --- a/app/src/main/java/com/herbron/moodl/Activities/HomeActivityFragments/Summary.java +++ b/app/src/main/java/com/herbron/moodl/Activities/HomeActivityFragments/Summary.java @@ -553,7 +553,7 @@ public class Summary extends Fragment implements BalanceSwitchManagerInterface, public void onBalanceDataUpdated() { final List balance = balanceManager.getTotalBalance(); - if(balance.size() > 0) + if(balance != null && balance.size() > 0) { for(int i = 0; i < balance.size(); i++) { diff --git a/app/src/main/res/layout-v21/cardview_currency.xml b/app/src/main/res/layout-v21/cardview_currency.xml index eba4726..f7ccc19 100644 --- a/app/src/main/res/layout-v21/cardview_currency.xml +++ b/app/src/main/res/layout-v21/cardview_currency.xml @@ -29,8 +29,8 @@ @@ -128,7 +129,7 @@ android:paddingEnd="4dp" android:baselineAligned="false" android:gravity="bottom" - android:layout_alignParentBottom="true"> + android:layout_below="@id/mainMenuLayout"> 180dp 50dp + + 17dp