This commit is contained in:
Tanguy Herbron 2018-03-28 00:34:12 +02:00
parent defd3db2f0
commit 40dc5139a0
2 changed files with 8 additions and 5 deletions

View File

@ -569,10 +569,13 @@ public class HomeActivity extends AppCompatActivity {
{ {
marketCapCounter = 0; marketCapCounter = 0;
Log.d("coinfolio", "Start update market cap");
marketCapManager.updateTopCurrencies(new MarketCapManager.VolleyCallBack() { marketCapManager.updateTopCurrencies(new MarketCapManager.VolleyCallBack() {
@Override @Override
public void onSuccess() public void onSuccess()
{ {
Log.d("coinfolio", "Top updated");
countCompletedMarketCapRequest(); countCompletedMarketCapRequest();
} }
}); });
@ -580,6 +583,7 @@ public class HomeActivity extends AppCompatActivity {
marketCapManager.updateMarketCap(new MarketCapManager.VolleyCallBack() { marketCapManager.updateMarketCap(new MarketCapManager.VolleyCallBack() {
@Override @Override
public void onSuccess() { public void onSuccess() {
Log.d("coinfolio", "Marketcap updated");
countCompletedMarketCapRequest(); countCompletedMarketCapRequest();
} }
}); });
@ -601,7 +605,7 @@ public class HomeActivity extends AppCompatActivity {
ArrayList<Integer> colors = new ArrayList<>(); ArrayList<Integer> colors = new ArrayList<>();
final PieChart pieChart = findViewById(R.id.marketCapPieChart); PieChart pieChart = findViewById(R.id.marketCapPieChart);
float otherCurrenciesDominance = 0; float otherCurrenciesDominance = 0;
@ -624,7 +628,6 @@ public class HomeActivity extends AppCompatActivity {
data.setValueTextSize(10); data.setValueTextSize(10);
data.setValueFormatter(new PercentFormatter()); data.setValueFormatter(new PercentFormatter());
pieChart.setData(data); pieChart.setData(data);
pieChart.setDrawSlicesUnderHole(false); pieChart.setDrawSlicesUnderHole(false);
pieChart.setUsePercentValues(true); pieChart.setUsePercentValues(true);
pieChart.setTouchEnabled(true); pieChart.setTouchEnabled(true);

View File

@ -127,8 +127,8 @@ public class MarketCapManager {
for(int i = 0; i < topRequestResult.length; i++) for(int i = 0; i < topRequestResult.length; i++)
{ {
try { topRequestResult[i] += "}";
topRequestResult[i] += "}"; /*try {
JSONObject jsonObject = new JSONObject(topRequestResult[i]); JSONObject jsonObject = new JSONObject(topRequestResult[i]);
@ -136,7 +136,7 @@ public class MarketCapManager {
} catch (JSONException e) { } catch (JSONException e) {
e.printStackTrace(); e.printStackTrace();
} }*/
} }
} }