• R/O
  • SSH
  • HTTPS

observoice: Commit


Commit MetaInfo

Revision289 (tree)
Zeit2012-10-31 14:39:04
Autoruchan_nos

Log Message

理解度グラフの色設定を変更。drawable/thought(s)のスペルミスを修正

Ändern Zusammenfassung

Diff

--- trunk/ov-client/observoice/src/jp/sourceforge/observoice/fragment/UnderstandabilityChartFragment.java (revision 288)
+++ trunk/ov-client/observoice/src/jp/sourceforge/observoice/fragment/UnderstandabilityChartFragment.java (revision 289)
@@ -1,44 +1,33 @@
11 package jp.sourceforge.observoice.fragment;
22
33 import java.text.DateFormat;
4-
54 import java.util.Date;
65 import java.util.List;
7-//import java.util.Timer;
8-//import java.util.TimerTask;
96
107 import jp.sourceforge.observoice.R;
118 import jp.sourceforge.observoice.UnderstandabilityChartManager;
9+import jp.sourceforge.observoice.UnderstandabilityChartManager.Reaction;
1210 import jp.sourceforge.observoice.entity.Comment;
1311
14-import jp.sourceforge.observoice.UnderstandabilityChartManager.Reaction;
15-
16-import org.achartengine.chart.BarChart;
17-
1812 import org.achartengine.ChartFactory;
1913 import org.achartengine.GraphicalView;
20-
14+import org.achartengine.chart.BarChart;
2115 import org.achartengine.model.XYMultipleSeriesDataset;
2216 import org.achartengine.model.XYSeries;
23-
2417 import org.achartengine.renderer.SimpleSeriesRenderer;
2518 import org.achartengine.renderer.XYMultipleSeriesRenderer;
26-
2719 import org.achartengine.renderer.XYMultipleSeriesRenderer.Orientation;
2820
2921 import android.graphics.Color;
30-
3122 import android.os.Bundle;
32-
3323 import android.support.v4.app.Fragment;
34-
3524 import android.util.Log;
36-
3725 import android.view.LayoutInflater;
3826 import android.view.View;
3927 import android.view.ViewGroup;
40-
4128 import android.widget.LinearLayout;
29+//import java.util.Timer;
30+//import java.util.TimerTask;
4231
4332 public class UnderstandabilityChartFragment extends Fragment {
4433
@@ -87,7 +76,7 @@
8776
8877 private XYMultipleSeriesRenderer createChartRenderer() {
8978 // 表示したいデータの準備
90- final int[] colors = new int[] { Color.CYAN, Color.MAGENTA };
79+ final int[] colors = new int[] { Color.rgb(25, 25, 112), Color.rgb(255, 127, 80) };
9180
9281 // 表示器の生成
9382 XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
@@ -111,8 +100,16 @@
111100 renderer.setXAxisMax(mNumDivision + 0.5);
112101 renderer.setYAxisMin(-2);
113102 renderer.setYAxisMax(2);
103+
104+ // 色設定
105+ final int backgroundColor = Color.rgb(249, 249, 249);
106+ renderer.setApplyBackgroundColor(true);
114107 renderer.setAxesColor(Color.GRAY);
115- renderer.setLabelsColor(Color.LTGRAY);
108+ renderer.setMarginsColor(backgroundColor);
109+ renderer.setBackgroundColor(backgroundColor);
110+ renderer.setLabelsColor(Color.BLACK);
111+ renderer.setXLabelsColor(Color.BLACK);
112+ renderer.setYLabelsColor(0, Color.BLACK);
116113
117114 // 軸の設定
118115 renderer.setXLabels(0);
--- trunk/ov-client/observoice/res/values/style.xml (revision 288)
+++ trunk/ov-client/observoice/res/values/style.xml (revision 289)
@@ -8,7 +8,7 @@
88
99 <!-- Listのテーマ -->
1010 <style name="ObsvListView" parent="@android:Widget.ListView">
11- <item name="android:background">@drawable/thought</item>
11+ <item name="android:background">@drawable/thoughts</item>
1212 </style>
1313
1414 <!-- 鳥ちゃん -->
--- trunk/ov-client/observoice/res/layout/understandability_chart_fragment.xml (revision 288)
+++ trunk/ov-client/observoice/res/layout/understandability_chart_fragment.xml (revision 289)
@@ -4,11 +4,4 @@
44 android:layout_height="match_parent"
55 android:orientation="vertical" >
66
7- <TextView
8- android:id="@+id/textView1"
9- android:layout_width="wrap_content"
10- android:layout_height="wrap_content"
11- android:text="This is a test fragment for FragmentTestActivity"
12- android:textAppearance="?android:attr/textAppearanceLarge" />
13-
147 </LinearLayout>
\ No newline at end of file
Show on old repository browser