teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

4

ソースコードを変更しました。また実行時の状況を記載しました

2017/01/19 06:37

投稿

nissy113
nissy113

スコア12

title CHANGED
File without changes
body CHANGED
@@ -5,132 +5,134 @@
5
5
  http://qiita.com/InoueDaiki/items/568b3328557bc44fb5d6
6
6
 
7
7
  グラフを表示するためのbuild.gradleのコード追加はしています。
8
- エラーしてDeplicate class 'Sensor_Actovoty'とす。
8
+ コンパイルを行う、実行はできるのでが加速度の値が表示されませんまたグラフ表示もされていないので加速度の値が取れていなのでしょうか?
9
9
 
10
- コンパイルを行うと
11
- Error:(50, 12) エラー: クラス Sensor_Activityはすでにパッケージ com.example.yoshihiro.streetrhythmで定義されています
12
- と出ます。
13
10
 
14
- 下に現在のコードを載せます。どうにかならないでしょうか?
15
11
  ```ここに言語を入力
16
12
  コード
17
- main.java
18
13
 
14
+ package com.example.yoshihiro.streetrhythm;
15
+
19
- import java.util.List;
16
+ import java.util.List;
20
- import android.content.Intent;
17
+ import android.content.Intent;
21
- import android.app.Activity;
18
+ import android.app.Activity;
22
- import android.graphics.Color;
19
+ import android.graphics.Color;
23
- import android.hardware.Sensor;
20
+ import android.hardware.Sensor;
24
- import android.hardware.SensorEvent;
21
+ import android.hardware.SensorEvent;
25
- import android.hardware.SensorEventListener;
22
+ import android.hardware.SensorEventListener;
26
- import android.hardware.SensorManager;
23
+ import android.hardware.SensorManager;
27
- import android.net.Uri;
24
+ import android.net.Uri;
28
- import android.os.Bundle;
25
+ import android.os.Bundle;
29
- import android.view.View;
26
+ import android.view.View;
30
27
  import android.widget.TextView;
31
28
 
32
- import com.github.mikephil.charting.charts.LineChart;
29
+ import com.github.mikephil.charting.charts.LineChart;
33
- import com.github.mikephil.charting.data.Entry;
30
+ import com.github.mikephil.charting.data.Entry;
34
- import com.github.mikephil.charting.data.LineData;
31
+ import com.github.mikephil.charting.data.LineData;
35
- import com.github.mikephil.charting.data.LineDataSet;
32
+ import com.github.mikephil.charting.data.LineDataSet;
36
- import com.github.mikephil.charting.interfaces.datasets.ILineDataSet;
33
+ import com.github.mikephil.charting.interfaces.datasets.ILineDataSet;
37
- import com.google.android.gms.appindexing.Action;
34
+ import com.google.android.gms.appindexing.Action;
38
- import com.google.android.gms.appindexing.AppIndex;
35
+ import com.google.android.gms.appindexing.AppIndex;
39
- import com.google.android.gms.appindexing.Thing;
36
+ import com.google.android.gms.appindexing.Thing;
40
37
  import com.google.android.gms.common.api.GoogleApiClient;
41
38
 
39
+
42
40
  public class Sensor_Activity extends Activity {
43
41
 
44
- SensorManager manager;
45
- Sensor sensor;
46
- TextView xTextView;
47
- TextView yTextView;
48
- TextView zTextView;
49
42
 
50
- @Override
51
- public void onCreate(Bundle savedInstanceState) {
52
- super.onCreate(savedInstanceState);
43
+ SensorManager manager;
44
+ Sensor sensor;
45
+ TextView xTextView;
53
- setContentView(R.layout.activity_sensor_);
46
+ TextView yTextView;
47
+ TextView zTextView;
54
48
 
49
+ @Override
50
+ public void onCreate(Bundle savedInstanceState) {
51
+ super.onCreate(savedInstanceState);
55
- xTextView = (TextView) findViewById(R.id.xValue);
52
+ setContentView(R.layout.activity_sensor_);
56
- yTextView = (TextView) findViewById(R.id.yValue);
57
- zTextView = (TextView) findViewById(R.id.zValue);
58
53
 
59
- manager = (SensorManager) getSystemService(SENSOR_SERVICE);
54
+ xTextView = (TextView) findViewById(R.id.xValue);
60
- sensor = manager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
55
+ yTextView = (TextView) findViewById(R.id.yValue);
56
+ zTextView = (TextView) findViewById(R.id.zValue);
61
57
 
62
- }
58
+ manager = (SensorManager) getSystemService(SENSOR_SERVICE);
59
+ sensor = manager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
63
60
 
64
- public class Sensor_Activity extends Activity implements SensorEventListener {
61
+ }
65
62
 
66
- @Override
67
- public void onAccuracyChanged(Sensor sensor, int accuracy) {
68
63
 
69
- }
64
+ public class a extends Activity implements SensorEventListener {
70
65
 
71
- @Override
66
+ @Override
72
- protected void onResume() {
73
- super.onResume();
74
- manager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_UI);
67
+ public void onAccuracyChanged(Sensor sensor, int accuracy) {
75
- }
76
68
 
77
- @Override
78
- protected void onPause() {
79
- super.onPause();
80
- manager.unregisterListener(this);
81
- }
69
+ }
82
70
 
83
- @Override
71
+ @Override
84
- public void onSensorChanged(SensorEvent event) {
72
+ protected void onResume() {
73
+ super.onResume();
85
- xTextView.setText(String.valueOf(event.values[0]));
74
+ manager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_UI);
86
- yTextView.setText(String.valueOf(event.values[1]));
75
+ }
87
- zTextView.setText(String.valueOf(event.values[2]));
88
76
 
89
- LineData data = mChart.getLineData();
77
+ @Override
90
- if (data != null) {
78
+ protected void onPause() {
91
- for (int i = 0; i < 3; i++) { // 3軸なのでそれぞれ処理します
92
- ILineDataSet set = data.getDataSetByIndex(i);
93
- if (set == null) {
94
- set = createSet(names[i], colors[i]); // ILineDataSetの初期化は別メソッドにまとめました
95
- data.addDataSet(set);
79
+ super.onPause();
80
+ manager.unregisterListener(this);
96
- }
81
+ }
97
82
 
98
- data.addEntry(new Entry(set.getEntryCount(), event.values[i]), i); // 実際にデータを追加する
99
- data.notifyDataChanged();
100
- }
101
83
 
84
+ @Override
102
- mChart.notifyDataSetChanged(); // 表示の更新のために変更を通知する
85
+ public void onSensorChanged(SensorEvent event) {
86
+ xTextView.setText(String.valueOf(event.values[0]));
87
+ yTextView.setText(String.valueOf(event.values[1]));
103
- mChart.setVisibleXRangeMaximum(50); // 表示の幅を決定する
88
+ zTextView.setText(String.valueOf(event.values[2]));
104
- mChart.moveViewToX(data.getEntryCount()); // 最新のデータまで表示を移動させる
105
- }
106
- }
107
89
 
108
- private LineDataSet createSet(String label, int color) {
90
+ LineData data = mChart.getLineData();
91
+ if (data != null) {
92
+ for (int i = 0; i < 3; i++) { // 3軸なのでそれぞれ処理します
109
- LineDataSet set = new LineDataSet(null, label);
93
+ ILineDataSet set = data.getDataSetByIndex(i);
110
- set.setLineWidth(2.5f); // 線の幅を指定
111
- set.setColor(color); // 線の色を指定
94
+ if (set == null) {
112
- set.setDrawCircles(false); // ポイントごと円を表示ない
95
+ set = createSet(names[i], colors[i]); // ILineDataSet初期化は別メソッドにまとめま
113
- set.setDrawValues(false); // 値を表示しない
96
+ data.addDataSet(set);
97
+ }
114
98
 
99
+ data.addEntry(new Entry(set.getEntryCount(), event.values[i]), i); // 実際にデータを追加する
115
- return set;
100
+ data.notifyDataChanged();
116
- }
101
+ }
117
102
 
118
- LineChart mChart;
103
+ mChart.notifyDataSetChanged(); // 表示の更新のために変更を通知する
104
+ mChart.setVisibleXRangeMaximum(50); // 表示の幅を決定する
105
+ mChart.moveViewToX(data.getEntryCount()); // 最新のデータまで表示を移動させる
106
+ }
107
+ }
119
108
 
120
- String[] names = new String[]{"x-value", "y-value", "z-value"};
121
- int[] colors = new int[]{Color.RED, Color.GREEN, Color.BLUE};
109
+ LineChart mChart;
122
110
 
123
- @Override
111
+ String[] names = new String[]{"x-value", "y-value", "z-value"};
124
- protected void onCreate(Bundle savedInstanceState) {
112
+ int[] colors = new int[]{Color.RED, Color.GREEN, Color.BLUE};
125
113
 
114
+ @Override
126
- mChart = (LineChart) findViewById(R.id.lineChart);
115
+ protected void onCreate(Bundle savedInstanceState) {
127
116
 
117
+ mChart = (LineChart) findViewById(R.id.lineChart);
118
+
128
- mChart.setDescription(""); // 表のタイトルを空にする
119
+ mChart.setDescription(""); // 表のタイトルを空にする
129
- mChart.setData(new LineData()); // 空のLineData型インスタンスを追加
120
+ mChart.setData(new LineData()); // 空のLineData型インスタンスを追加
130
- }
121
+ }
122
+
123
+ private LineDataSet createSet(String label, int color) {
124
+ LineDataSet set = new LineDataSet(null, label);
125
+ set.setLineWidth(2.5f); // 線の幅を指定
126
+ set.setColor(color); // 線の色を指定
127
+ set.setDrawCircles(false); // ポイントごとの円を表示しない
128
+ set.setDrawValues(false); // 値を表示しない
129
+
130
+ return set;
131
- }
131
+ }
132
+ }
132
133
  }
133
134
 
135
+
134
136
  xml
135
137
 
136
138
  <?xml version="1.0" encoding="utf-8"?>

3

コンパイル結果を載せました

2017/01/19 06:37

投稿

nissy113
nissy113

スコア12

title CHANGED
File without changes
body CHANGED
@@ -7,6 +7,10 @@
7
7
  グラフを表示するためのbuild.gradleのコード追加はしています。
8
8
  エラーとしてはDeplicate class 'Sensor_Actovoty'とでます。
9
9
 
10
+ コンパイルを行うと
11
+ Error:(50, 12) エラー: クラス Sensor_Activityはすでにパッケージ com.example.yoshihiro.streetrhythmで定義されています
12
+ と出ます。
13
+
10
14
  下に現在のコードを載せます。どうにかならないでしょうか?
11
15
  ```ここに言語を入力
12
16
  コード

2

若干のコードを修正しました

2017/01/18 17:33

投稿

nissy113
nissy113

スコア12

title CHANGED
File without changes
body CHANGED
@@ -82,7 +82,7 @@
82
82
  yTextView.setText(String.valueOf(event.values[1]));
83
83
  zTextView.setText(String.valueOf(event.values[2]));
84
84
 
85
- ineData data = mChart.getLineData();
85
+ LineData data = mChart.getLineData();
86
86
  if (data != null) {
87
87
  for (int i = 0; i < 3; i++) { // 3軸なのでそれぞれ処理します
88
88
  ILineDataSet set = data.getDataSetByIndex(i);

1

コードの記入方法を変更しました

2017/01/18 17:25

投稿

nissy113
nissy113

スコア12

title CHANGED
File without changes
body CHANGED
@@ -8,174 +8,174 @@
8
8
  エラーとしてはDeplicate class 'Sensor_Actovoty'とでます。
9
9
 
10
10
  下に現在のコードを載せます。どうにかならないでしょうか?
11
-
11
+ ```ここに言語を入力
12
+ コード
12
13
  main.java
13
14
 
14
- import java.util.List;
15
+ import java.util.List;
15
- import android.content.Intent;
16
+ import android.content.Intent;
16
- import android.app.Activity;
17
+ import android.app.Activity;
17
- import android.graphics.Color;
18
+ import android.graphics.Color;
18
- import android.hardware.Sensor;
19
+ import android.hardware.Sensor;
19
- import android.hardware.SensorEvent;
20
+ import android.hardware.SensorEvent;
20
- import android.hardware.SensorEventListener;
21
+ import android.hardware.SensorEventListener;
21
- import android.hardware.SensorManager;
22
+ import android.hardware.SensorManager;
22
- import android.net.Uri;
23
+ import android.net.Uri;
23
- import android.os.Bundle;
24
+ import android.os.Bundle;
24
- import android.view.View;
25
+ import android.view.View;
25
26
  import android.widget.TextView;
26
27
 
27
- import com.github.mikephil.charting.charts.LineChart;
28
+ import com.github.mikephil.charting.charts.LineChart;
28
- import com.github.mikephil.charting.data.Entry;
29
+ import com.github.mikephil.charting.data.Entry;
29
- import com.github.mikephil.charting.data.LineData;
30
+ import com.github.mikephil.charting.data.LineData;
30
- import com.github.mikephil.charting.data.LineDataSet;
31
+ import com.github.mikephil.charting.data.LineDataSet;
31
- import com.github.mikephil.charting.interfaces.datasets.ILineDataSet;
32
+ import com.github.mikephil.charting.interfaces.datasets.ILineDataSet;
32
- import com.google.android.gms.appindexing.Action;
33
+ import com.google.android.gms.appindexing.Action;
33
- import com.google.android.gms.appindexing.AppIndex;
34
+ import com.google.android.gms.appindexing.AppIndex;
34
- import com.google.android.gms.appindexing.Thing;
35
+ import com.google.android.gms.appindexing.Thing;
35
36
  import com.google.android.gms.common.api.GoogleApiClient;
36
37
 
37
-
38
38
  public class Sensor_Activity extends Activity {
39
39
 
40
+ SensorManager manager;
41
+ Sensor sensor;
42
+ TextView xTextView;
43
+ TextView yTextView;
44
+ TextView zTextView;
40
45
 
46
+ @Override
47
+ public void onCreate(Bundle savedInstanceState) {
41
- SensorManager manager;
48
+ super.onCreate(savedInstanceState);
42
- Sensor sensor;
43
- TextView xTextView;
44
- TextView yTextView;
49
+ setContentView(R.layout.activity_sensor_);
45
- TextView zTextView;
46
50
 
47
- @Override
48
- public void onCreate(Bundle savedInstanceState) {
49
- super.onCreate(savedInstanceState);
50
- setContentView(R.layout.activity_sensor_);
51
+ xTextView = (TextView) findViewById(R.id.xValue);
52
+ yTextView = (TextView) findViewById(R.id.yValue);
53
+ zTextView = (TextView) findViewById(R.id.zValue);
51
54
 
52
- xTextView = (TextView) findViewById(R.id.xValue);
55
+ manager = (SensorManager) getSystemService(SENSOR_SERVICE);
53
- yTextView = (TextView) findViewById(R.id.yValue);
56
+ sensor = manager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
54
- zTextView = (TextView) findViewById(R.id.zValue);
55
57
 
56
- manager = (SensorManager) getSystemService(SENSOR_SERVICE);
58
+ }
57
- sensor = manager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
58
59
 
59
- }
60
+ public class Sensor_Activity extends Activity implements SensorEventListener {
60
61
 
62
+ @Override
61
- public class Sensor_Activity extends Activity implements SensorEventListener {
63
+ public void onAccuracyChanged(Sensor sensor, int accuracy) {
62
64
 
63
- @Override
65
+ }
64
- public void onAccuracyChanged(Sensor sensor, int accuracy) {
65
66
 
67
+ @Override
68
+ protected void onResume() {
69
+ super.onResume();
70
+ manager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_UI);
66
- }
71
+ }
67
72
 
68
- @Override
73
+ @Override
69
- protected void onResume() {
74
+ protected void onPause() {
70
- super.onResume();
75
+ super.onPause();
71
- manager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_UI);
76
+ manager.unregisterListener(this);
72
- }
77
+ }
73
78
 
74
- @Override
79
+ @Override
75
- protected void onPause() {
80
+ public void onSensorChanged(SensorEvent event) {
76
- super.onPause();
77
- manager.unregisterListener(this);
81
+ xTextView.setText(String.valueOf(event.values[0]));
78
- }
82
+ yTextView.setText(String.valueOf(event.values[1]));
83
+ zTextView.setText(String.valueOf(event.values[2]));
79
84
 
80
- @Override
81
- public void onSensorChanged(SensorEvent event) {
85
+ ineData data = mChart.getLineData();
86
+ if (data != null) {
87
+ for (int i = 0; i < 3; i++) { // 3軸なのでそれぞれ処理します
82
- xTextView.setText(String.valueOf(event.values[0]));
88
+ ILineDataSet set = data.getDataSetByIndex(i);
89
+ if (set == null) {
83
- yTextView.setText(String.valueOf(event.values[1]));
90
+ set = createSet(names[i], colors[i]); // ILineDataSetの初期化は別メソッドにまとめました
84
- zTextView.setText(String.valueOf(event.values[2]));
91
+ data.addDataSet(set);
92
+ }
85
93
 
86
- ineData data = mChart.getLineData();
87
- if (data != null) {
88
- for (int i = 0; i < 3; i++) { // 3軸なのでそれぞれ処理します
89
- ILineDataSet set = data.getDataSetByIndex(i);
90
- if (set == null) {
91
- set = createSet(names[i], colors[i]); // ILineDataSetの初期化は別メソッドまとめました
94
+ data.addEntry(new Entry(set.getEntryCount(), event.values[i]), i); // 実際データを追加する
92
- data.addDataSet(set);
95
+ data.notifyDataChanged();
93
- }
96
+ }
94
97
 
98
+ mChart.notifyDataSetChanged(); // 表示の更新のために変更を通知する
99
+ mChart.setVisibleXRangeMaximum(50); // 表示の幅を決定する
95
- data.addEntry(new Entry(set.getEntryCount(), event.values[i]), i); // 実際にデータを追加す
100
+ mChart.moveViewToX(data.getEntryCount()); // 最新のデータまで表示移動させ
96
- data.notifyDataChanged();
97
- }
101
+ }
102
+ }
98
103
 
99
- mChart.notifyDataSetChanged(); // 表示の更新のために変更を通知する
104
+ private LineDataSet createSet(String label, int color) {
105
+ LineDataSet set = new LineDataSet(null, label);
100
- mChart.setVisibleXRangeMaximum(50); // 表示の幅をする
106
+ set.setLineWidth(2.5f); // の幅を
107
+ set.setColor(color); // 線の色を指定
101
- mChart.moveViewToX(data.getEntryCount()); // 最新データまで表示を移動させる
108
+ set.setDrawCircles(false); // ポイントごと円を表示しない
102
- }
109
+ set.setDrawValues(false); // 値を表示しない
103
- }
104
110
 
105
- private LineDataSet createSet(String label, int color) {
106
- LineDataSet set = new LineDataSet(null, label);
107
- set.setLineWidth(2.5f); // 線の幅を指定
108
- set.setColor(color); // 線の色を指定
111
+ return set;
109
- set.setDrawCircles(false); // ポイントごとの円を表示しない
110
- set.setDrawValues(false); // 値を表示しない
112
+ }
111
113
 
112
- return set;
114
+ LineChart mChart;
113
- }
114
115
 
116
+ String[] names = new String[]{"x-value", "y-value", "z-value"};
115
- LineChart mChart;
117
+ int[] colors = new int[]{Color.RED, Color.GREEN, Color.BLUE};
116
118
 
117
- String[] names = new String[]{"x-value", "y-value", "z-value"};
119
+ @Override
118
- int[] colors = new int[]{Color.RED, Color.GREEN, Color.BLUE};
120
+ protected void onCreate(Bundle savedInstanceState) {
119
121
 
120
- @Override
121
- protected void onCreate(Bundle savedInstanceState) {
122
+ mChart = (LineChart) findViewById(R.id.lineChart);
122
123
 
123
- mChart = (LineChart) findViewById(R.id.lineChart);
124
-
125
- mChart.setDescription(""); // 表のタイトルを空にする
124
+ mChart.setDescription(""); // 表のタイトルを空にする
126
- mChart.setData(new LineData()); // 空のLineData型インスタンスを追加
125
+ mChart.setData(new LineData()); // 空のLineData型インスタンスを追加
127
- }
126
+ }
128
- }
127
+ }
129
128
  }
130
129
 
131
130
  xml
132
131
 
133
- <?xml version="1.0" encoding="utf-8"?>
132
+ <?xml version="1.0" encoding="utf-8"?>
134
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
133
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
135
- xmlns:tools="http://schemas.android.com/tools"
134
+ xmlns:tools="http://schemas.android.com/tools"
136
- android:id="@+id/activity_sensor"
135
+ android:id="@+id/activity_sensor"
137
- android:layout_width="match_parent"
136
+ android:layout_width="match_parent"
138
- android:layout_height="match_parent"
137
+ android:layout_height="match_parent"
139
- android:paddingBottom="@dimen/activity_vertical_margin"
138
+ android:paddingBottom="@dimen/activity_vertical_margin"
140
- android:paddingLeft="@dimen/activity_horizontal_margin"
139
+ android:paddingLeft="@dimen/activity_horizontal_margin"
141
- android:paddingRight="@dimen/activity_horizontal_margin"
140
+ android:paddingRight="@dimen/activity_horizontal_margin"
142
- android:paddingTop="@dimen/activity_vertical_margin"
141
+ android:paddingTop="@dimen/activity_vertical_margin"
143
- tools:context="com.example.yoshihiro.streetrhythm.Sensor_Activity">
142
+ tools:context="com.example.yoshihiro.streetrhythm.Sensor_Activity">
144
143
 
145
- <TextView
144
+ <TextView
146
- android:layout_width="wrap_content"
145
+ android:layout_width="wrap_content"
147
- android:layout_height="wrap_content"
146
+ android:layout_height="wrap_content"
148
- android:layout_below="@+id/xValue"
147
+ android:layout_below="@+id/xValue"
149
- android:layout_alignLeft="@+id/xValue"
148
+ android:layout_alignLeft="@+id/xValue"
150
- android:layout_alignStart="@+id/xValue"
149
+ android:layout_alignStart="@+id/xValue"
151
- android:layout_marginTop="11dp"
150
+ android:layout_marginTop="11dp"
152
- android:id="@+id/yValue" />
151
+ android:id="@+id/yValue" />
153
152
 
154
- <TextView
153
+ <TextView
155
- android:layout_width="wrap_content"
154
+ android:layout_width="wrap_content"
156
- android:layout_height="wrap_content"
155
+ android:layout_height="wrap_content"
157
- android:layout_marginTop="14dp"
156
+ android:layout_marginTop="14dp"
158
- android:id="@+id/zValue"
157
+ android:id="@+id/zValue"
159
- android:layout_below="@+id/yValue"
158
+ android:layout_below="@+id/yValue"
160
- android:layout_alignLeft="@+id/yValue"
159
+ android:layout_alignLeft="@+id/yValue"
161
- android:layout_alignStart="@+id/yValue"
160
+ android:layout_alignStart="@+id/yValue"
162
- android:layout_alignRight="@+id/yValue"
161
+ android:layout_alignRight="@+id/yValue"
163
- android:layout_alignEnd="@+id/yValue" />
162
+ android:layout_alignEnd="@+id/yValue" />
164
163
 
165
- <TextView
164
+ <TextView
166
- android:layout_width="wrap_content"
165
+ android:layout_width="wrap_content"
167
- android:layout_height="wrap_content"
166
+ android:layout_height="wrap_content"
168
- android:layout_marginLeft="12dp"
167
+ android:layout_marginLeft="12dp"
169
- android:layout_marginStart="12dp"
168
+ android:layout_marginStart="12dp"
170
- android:layout_marginTop="14dp"
169
+ android:layout_marginTop="14dp"
171
- android:id="@+id/xValue"
170
+ android:id="@+id/xValue"
172
- android:layout_alignParentTop="true"
171
+ android:layout_alignParentTop="true"
173
- android:layout_alignParentLeft="true"
172
+ android:layout_alignParentLeft="true"
174
- android:layout_alignParentStart="true" />
173
+ android:layout_alignParentStart="true" />
175
174
 
176
- <com.github.mikephil.charting.charts.LineChart
175
+ <com.github.mikephil.charting.charts.LineChart
177
- android:layout_width="match_parent"
176
+ android:layout_width="match_parent"
178
- android:layout_height="match_parent"
177
+ android:layout_height="match_parent"
179
- android:id="@+id/lineChart"/>
178
+ android:id="@+id/lineChart"/>
180
179
 
181
- </RelativeLayout>
180
+ </RelativeLayout>
181
+ ```