From 85ffbeb96b4c80e876aa60b63fc765cc5935be83 Mon Sep 17 00:00:00 2001 From: Thodoris1999 Date: Tue, 9 Oct 2018 14:45:02 +0300 Subject: [PATCH] poll fixes: labels --- .../java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java index 18cab71c..820c7770 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java @@ -43,13 +43,11 @@ import android.widget.RelativeLayout; import android.widget.TextView; import com.github.mikephil.charting.charts.HorizontalBarChart; -import com.github.mikephil.charting.components.AxisBase; import com.github.mikephil.charting.components.XAxis; import com.github.mikephil.charting.components.YAxis; import com.github.mikephil.charting.data.BarData; import com.github.mikephil.charting.data.BarDataSet; import com.github.mikephil.charting.data.BarEntry; -import com.github.mikephil.charting.formatter.IAxisValueFormatter; import com.squareup.picasso.Picasso; import java.util.ArrayList; @@ -177,6 +175,7 @@ class TopicAdapter extends RecyclerView.Adapter { container.setOrientation(LinearLayout.HORIZONTAL); CheckBox checkBox = new CheckBox(context); TextView label = new TextView(context); + label.setTextColor(context.getResources().getColor(R.color.primary_text)); label.setMovementMethod(LinkMovementMethod.getInstance()); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { label.setText(Html.fromHtml(entry.getEntryName(), Html.FROM_HTML_MODE_LEGACY)); @@ -230,7 +229,7 @@ class TopicAdapter extends RecyclerView.Adapter { xAxis.setValueFormatter((value, axis) -> Html.fromHtml(entries[(int) value].getEntryName()).toString()); xAxis.setTextColor(context.getResources().getColor(R.color.primary_text)); xAxis.setGranularity(1f); - xAxis.setLabelCount(entries.length, true); + xAxis.setLabelCount(entries.length); xAxis.setDrawGridLines(false); xAxis.setDrawAxisLine(false); xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);