diff --git a/app/src/main/java/com/nauk/coinfolio/Activities/HomeActivity.java b/app/src/main/java/com/nauk/coinfolio/Activities/HomeActivity.java index 50efe0c..2365778 100644 --- a/app/src/main/java/com/nauk/coinfolio/Activities/HomeActivity.java +++ b/app/src/main/java/com/nauk/coinfolio/Activities/HomeActivity.java @@ -569,10 +569,13 @@ public class HomeActivity extends AppCompatActivity { { marketCapCounter = 0; + Log.d("coinfolio", "Start update market cap"); + marketCapManager.updateTopCurrencies(new MarketCapManager.VolleyCallBack() { @Override public void onSuccess() { + Log.d("coinfolio", "Top updated"); countCompletedMarketCapRequest(); } }); @@ -580,6 +583,7 @@ public class HomeActivity extends AppCompatActivity { marketCapManager.updateMarketCap(new MarketCapManager.VolleyCallBack() { @Override public void onSuccess() { + Log.d("coinfolio", "Marketcap updated"); countCompletedMarketCapRequest(); } }); @@ -601,7 +605,7 @@ public class HomeActivity extends AppCompatActivity { ArrayList colors = new ArrayList<>(); - final PieChart pieChart = findViewById(R.id.marketCapPieChart); + PieChart pieChart = findViewById(R.id.marketCapPieChart); float otherCurrenciesDominance = 0; @@ -624,7 +628,6 @@ public class HomeActivity extends AppCompatActivity { data.setValueTextSize(10); data.setValueFormatter(new PercentFormatter()); pieChart.setData(data); - pieChart.setDrawSlicesUnderHole(false); pieChart.setUsePercentValues(true); pieChart.setTouchEnabled(true); diff --git a/app/src/main/java/com/nauk/coinfolio/DataManagers/MarketCapManager.java b/app/src/main/java/com/nauk/coinfolio/DataManagers/MarketCapManager.java index 9cf3b5e..d3b0a6f 100644 --- a/app/src/main/java/com/nauk/coinfolio/DataManagers/MarketCapManager.java +++ b/app/src/main/java/com/nauk/coinfolio/DataManagers/MarketCapManager.java @@ -127,8 +127,8 @@ public class MarketCapManager { for(int i = 0; i < topRequestResult.length; i++) { - try { - topRequestResult[i] += "}"; + topRequestResult[i] += "}"; + /*try { JSONObject jsonObject = new JSONObject(topRequestResult[i]); @@ -136,7 +136,7 @@ public class MarketCapManager { } catch (JSONException e) { e.printStackTrace(); - } + }*/ } }