Fix color glich
This commit is contained in:
parent
5a512a304a
commit
91a1551fa7
4
.idea/gradle.xml
generated
4
.idea/gradle.xml
generated
@ -3,9 +3,9 @@
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="distributionType" value="LOCAL" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-4.7" />
|
||||
<option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-4.1" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
|
@ -42,6 +42,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import static com.herbron.moodl.MoodlBox.getColor;
|
||||
import static java.lang.Math.abs;
|
||||
|
||||
/**
|
||||
@ -282,7 +283,7 @@ public class MarketCapitalization extends Fragment {
|
||||
Palette.Builder builder = Palette.from(bitmapIcon);
|
||||
|
||||
marketCapManager.getTopCurrencies().get(index).setIcon(bitmapIcon);
|
||||
marketCapManager.getTopCurrencies().get(index).setChartColor(builder.generate().getDominantColor(0));
|
||||
marketCapManager.getTopCurrencies().get(index).setChartColor(builder.generate().getDominantColor(getColor(R.color.default_color, getContext())));
|
||||
|
||||
countIcons();
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ import com.herbron.moodl.R;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.herbron.moodl.MoodlBox.getColor;
|
||||
import static com.herbron.moodl.MoodlBox.numberConformer;
|
||||
import static java.lang.Math.abs;
|
||||
|
||||
@ -520,11 +521,11 @@ public class Summary extends Fragment implements BalanceSwitchManagerInterface {
|
||||
{
|
||||
Palette.Builder builder = Palette.from(currency.getIcon());
|
||||
|
||||
currency.setChartColor(builder.generate().getDominantColor(0));
|
||||
currency.setChartColor(builder.generate().getDominantColor(getColor(R.color.default_color, getContext())));
|
||||
}
|
||||
else
|
||||
{
|
||||
currency.setChartColor(12369084);
|
||||
currency.setChartColor(getColor(R.color.default_color, getContext()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,7 @@ import org.json.JSONObject;
|
||||
|
||||
import static com.herbron.moodl.MoodlBox.collapseW;
|
||||
import static com.herbron.moodl.MoodlBox.expandW;
|
||||
import static com.herbron.moodl.MoodlBox.getColor;
|
||||
import static java.lang.Math.abs;
|
||||
|
||||
/**
|
||||
@ -354,11 +355,11 @@ public class Watchlist extends Fragment {
|
||||
{
|
||||
Palette.Builder builder = Palette.from(currency.getIcon());
|
||||
|
||||
currency.setChartColor(builder.generate().getDominantColor(0));
|
||||
currency.setChartColor(builder.generate().getDominantColor(getColor(R.color.default_color, getContext())));
|
||||
}
|
||||
else
|
||||
{
|
||||
currency.setChartColor(12369084);
|
||||
currency.setChartColor(getColor(R.color.default_color, getContext()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.util.Log;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
@ -12,6 +12,7 @@ import android.os.Build;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.widget.CardView;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -35,6 +36,7 @@ import java.util.List;
|
||||
|
||||
import static com.herbron.moodl.MoodlBox.collapseH;
|
||||
import static com.herbron.moodl.MoodlBox.expandH;
|
||||
import static com.herbron.moodl.MoodlBox.getColor;
|
||||
import static com.herbron.moodl.MoodlBox.numberConformer;
|
||||
|
||||
/**
|
||||
@ -341,9 +343,9 @@ public class CurrencyCardview extends CardView {
|
||||
dataSet = new LineDataSet(values, "");
|
||||
dataSet.setDrawIcons(false);
|
||||
dataSet.setColor(currency.getChartColor());
|
||||
dataSet.setFillColor(getColorWithAplha(currency.getChartColor(), 0.5f));
|
||||
dataSet.setLineWidth(1);
|
||||
dataSet.setDrawFilled(true);
|
||||
dataSet.setFillColor(getColorWithAplha(currency.getChartColor(), 0.5f));
|
||||
dataSet.setFormLineWidth(1);
|
||||
dataSet.setFormSize(15);
|
||||
dataSet.setDrawCircles(false);
|
||||
|
@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.support.v7.widget.CardView;
|
||||
|
@ -40,4 +40,5 @@
|
||||
<color name="transparent_green">#225DBF61</color>
|
||||
<color name="blue">#FF689afe</color>
|
||||
<color name="transparent_blue">#22689afe</color>
|
||||
<color name="default_color">#FFAAAAAA</color>
|
||||
</resources>
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,4 +1,4 @@
|
||||
#Sun May 13 20:31:16 CEST 2018
|
||||
#Sun Jun 17 03:10:32 CEST 2018
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
Loading…
Reference in New Issue
Block a user