質問編集履歴
4
ソースコードを変更しました。また実行時の状況を記載しました
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
|
-
|
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
|
-
|
43
|
+
SensorManager manager;
|
44
|
+
Sensor sensor;
|
45
|
+
TextView xTextView;
|
53
|
-
|
46
|
+
TextView yTextView;
|
47
|
+
TextView zTextView;
|
54
48
|
|
49
|
+
@Override
|
50
|
+
public void onCreate(Bundle savedInstanceState) {
|
51
|
+
super.onCreate(savedInstanceState);
|
55
|
-
|
52
|
+
setContentView(R.layout.activity_sensor_);
|
56
|
-
yTextView = (TextView) findViewById(R.id.yValue);
|
57
|
-
zTextView = (TextView) findViewById(R.id.zValue);
|
58
53
|
|
59
|
-
|
54
|
+
xTextView = (TextView) findViewById(R.id.xValue);
|
60
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
72
|
+
protected void onResume() {
|
73
|
+
super.onResume();
|
85
|
-
|
74
|
+
manager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_UI);
|
86
|
-
|
75
|
+
}
|
87
|
-
zTextView.setText(String.valueOf(event.values[2]));
|
88
76
|
|
89
|
-
|
77
|
+
@Override
|
90
|
-
|
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
|
-
|
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
|
-
|
85
|
+
public void onSensorChanged(SensorEvent event) {
|
86
|
+
xTextView.setText(String.valueOf(event.values[0]));
|
87
|
+
yTextView.setText(String.valueOf(event.values[1]));
|
103
|
-
|
88
|
+
zTextView.setText(String.valueOf(event.values[2]));
|
104
|
-
mChart.moveViewToX(data.getEntryCount()); // 最新のデータまで表示を移動させる
|
105
|
-
}
|
106
|
-
}
|
107
89
|
|
108
|
-
|
90
|
+
LineData data = mChart.getLineData();
|
91
|
+
if (data != null) {
|
92
|
+
for (int i = 0; i < 3; i++) { // 3軸なのでそれぞれ処理します
|
109
|
-
|
93
|
+
ILineDataSet set = data.getDataSetByIndex(i);
|
110
|
-
set.setLineWidth(2.5f); // 線の幅を指定
|
111
|
-
|
94
|
+
if (set == null) {
|
112
|
-
set
|
95
|
+
set = createSet(names[i], colors[i]); // ILineDataSetの初期化は別メソッドにまとめました
|
113
|
-
|
96
|
+
data.addDataSet(set);
|
97
|
+
}
|
114
98
|
|
99
|
+
data.addEntry(new Entry(set.getEntryCount(), event.values[i]), i); // 実際にデータを追加する
|
115
|
-
|
100
|
+
data.notifyDataChanged();
|
116
|
-
}
|
101
|
+
}
|
117
102
|
|
118
|
-
|
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
|
-
|
109
|
+
LineChart mChart;
|
122
110
|
|
123
|
-
|
111
|
+
String[] names = new String[]{"x-value", "y-value", "z-value"};
|
124
|
-
|
112
|
+
int[] colors = new int[]{Color.RED, Color.GREEN, Color.BLUE};
|
125
113
|
|
114
|
+
@Override
|
126
|
-
|
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
コンパイル結果を載せました
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
若干のコードを修正しました
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
|
-
|
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
コードの記入方法を変更しました
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
|
-
|
48
|
+
super.onCreate(savedInstanceState);
|
42
|
-
Sensor sensor;
|
43
|
-
TextView xTextView;
|
44
|
-
|
49
|
+
setContentView(R.layout.activity_sensor_);
|
45
|
-
TextView zTextView;
|
46
50
|
|
47
|
-
@Override
|
48
|
-
public void onCreate(Bundle savedInstanceState) {
|
49
|
-
super.onCreate(savedInstanceState);
|
50
|
-
|
51
|
+
xTextView = (TextView) findViewById(R.id.xValue);
|
52
|
+
yTextView = (TextView) findViewById(R.id.yValue);
|
53
|
+
zTextView = (TextView) findViewById(R.id.zValue);
|
51
54
|
|
52
|
-
|
55
|
+
manager = (SensorManager) getSystemService(SENSOR_SERVICE);
|
53
|
-
|
56
|
+
sensor = manager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
|
54
|
-
zTextView = (TextView) findViewById(R.id.zValue);
|
55
57
|
|
56
|
-
|
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
|
-
|
63
|
+
public void onAccuracyChanged(Sensor sensor, int accuracy) {
|
62
64
|
|
63
|
-
|
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
|
-
|
73
|
+
@Override
|
69
|
-
|
74
|
+
protected void onPause() {
|
70
|
-
|
75
|
+
super.onPause();
|
71
|
-
|
76
|
+
manager.unregisterListener(this);
|
72
|
-
|
77
|
+
}
|
73
78
|
|
74
|
-
|
79
|
+
@Override
|
75
|
-
|
80
|
+
public void onSensorChanged(SensorEvent event) {
|
76
|
-
super.onPause();
|
77
|
-
|
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
|
-
|
85
|
+
ineData data = mChart.getLineData();
|
86
|
+
if (data != null) {
|
87
|
+
for (int i = 0; i < 3; i++) { // 3軸なのでそれぞれ処理します
|
82
|
-
|
88
|
+
ILineDataSet set = data.getDataSetByIndex(i);
|
89
|
+
if (set == null) {
|
83
|
-
|
90
|
+
set = createSet(names[i], colors[i]); // ILineDataSetの初期化は別メソッドにまとめました
|
84
|
-
|
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
|
-
|
94
|
+
data.addEntry(new Entry(set.getEntryCount(), event.values[i]), i); // 実際にデータを追加する
|
92
|
-
|
95
|
+
data.notifyDataChanged();
|
93
|
-
|
96
|
+
}
|
94
97
|
|
98
|
+
mChart.notifyDataSetChanged(); // 表示の更新のために変更を通知する
|
99
|
+
mChart.setVisibleXRangeMaximum(50); // 表示の幅を決定する
|
95
|
-
|
100
|
+
mChart.moveViewToX(data.getEntryCount()); // 最新のデータまで表示を移動させる
|
96
|
-
data.notifyDataChanged();
|
97
|
-
|
101
|
+
}
|
102
|
+
}
|
98
103
|
|
99
|
-
|
104
|
+
private LineDataSet createSet(String label, int color) {
|
105
|
+
LineDataSet set = new LineDataSet(null, label);
|
100
|
-
|
106
|
+
set.setLineWidth(2.5f); // 線の幅を指定
|
107
|
+
set.setColor(color); // 線の色を指定
|
101
|
-
|
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
|
-
|
111
|
+
return set;
|
109
|
-
set.setDrawCircles(false); // ポイントごとの円を表示しない
|
110
|
-
|
112
|
+
}
|
111
113
|
|
112
|
-
|
114
|
+
LineChart mChart;
|
113
|
-
}
|
114
115
|
|
116
|
+
String[] names = new String[]{"x-value", "y-value", "z-value"};
|
115
|
-
|
117
|
+
int[] colors = new int[]{Color.RED, Color.GREEN, Color.BLUE};
|
116
118
|
|
117
|
-
|
119
|
+
@Override
|
118
|
-
|
120
|
+
protected void onCreate(Bundle savedInstanceState) {
|
119
121
|
|
120
|
-
@Override
|
121
|
-
|
122
|
+
mChart = (LineChart) findViewById(R.id.lineChart);
|
122
123
|
|
123
|
-
mChart = (LineChart) findViewById(R.id.lineChart);
|
124
|
-
|
125
|
-
|
124
|
+
mChart.setDescription(""); // 表のタイトルを空にする
|
126
|
-
|
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
|
-
|
134
|
+
xmlns:tools="http://schemas.android.com/tools"
|
136
|
-
|
135
|
+
android:id="@+id/activity_sensor"
|
137
|
-
|
136
|
+
android:layout_width="match_parent"
|
138
|
-
|
137
|
+
android:layout_height="match_parent"
|
139
|
-
|
138
|
+
android:paddingBottom="@dimen/activity_vertical_margin"
|
140
|
-
|
139
|
+
android:paddingLeft="@dimen/activity_horizontal_margin"
|
141
|
-
|
140
|
+
android:paddingRight="@dimen/activity_horizontal_margin"
|
142
|
-
|
141
|
+
android:paddingTop="@dimen/activity_vertical_margin"
|
143
|
-
|
142
|
+
tools:context="com.example.yoshihiro.streetrhythm.Sensor_Activity">
|
144
143
|
|
145
|
-
|
144
|
+
<TextView
|
146
|
-
|
145
|
+
android:layout_width="wrap_content"
|
147
|
-
|
146
|
+
android:layout_height="wrap_content"
|
148
|
-
|
147
|
+
android:layout_below="@+id/xValue"
|
149
|
-
|
148
|
+
android:layout_alignLeft="@+id/xValue"
|
150
|
-
|
149
|
+
android:layout_alignStart="@+id/xValue"
|
151
|
-
|
150
|
+
android:layout_marginTop="11dp"
|
152
|
-
|
151
|
+
android:id="@+id/yValue" />
|
153
152
|
|
154
|
-
|
153
|
+
<TextView
|
155
|
-
|
154
|
+
android:layout_width="wrap_content"
|
156
|
-
|
155
|
+
android:layout_height="wrap_content"
|
157
|
-
|
156
|
+
android:layout_marginTop="14dp"
|
158
|
-
|
157
|
+
android:id="@+id/zValue"
|
159
|
-
|
158
|
+
android:layout_below="@+id/yValue"
|
160
|
-
|
159
|
+
android:layout_alignLeft="@+id/yValue"
|
161
|
-
|
160
|
+
android:layout_alignStart="@+id/yValue"
|
162
|
-
|
161
|
+
android:layout_alignRight="@+id/yValue"
|
163
|
-
|
162
|
+
android:layout_alignEnd="@+id/yValue" />
|
164
163
|
|
165
|
-
|
164
|
+
<TextView
|
166
|
-
|
165
|
+
android:layout_width="wrap_content"
|
167
|
-
|
166
|
+
android:layout_height="wrap_content"
|
168
|
-
|
167
|
+
android:layout_marginLeft="12dp"
|
169
|
-
|
168
|
+
android:layout_marginStart="12dp"
|
170
|
-
|
169
|
+
android:layout_marginTop="14dp"
|
171
|
-
|
170
|
+
android:id="@+id/xValue"
|
172
|
-
|
171
|
+
android:layout_alignParentTop="true"
|
173
|
-
|
172
|
+
android:layout_alignParentLeft="true"
|
174
|
-
|
173
|
+
android:layout_alignParentStart="true" />
|
175
174
|
|
176
|
-
|
175
|
+
<com.github.mikephil.charting.charts.LineChart
|
177
|
-
|
176
|
+
android:layout_width="match_parent"
|
178
|
-
|
177
|
+
android:layout_height="match_parent"
|
179
|
-
|
178
|
+
android:id="@+id/lineChart"/>
|
180
179
|
|
181
|
-
</RelativeLayout>
|
180
|
+
</RelativeLayout>
|
181
|
+
```
|