我正在使用MPAndroidChart
我在服务中使用BarEntry,我需要通过意图将yvalue推送到片段。由于BarEntry不实现Parcelable,所以我不知道该如何处理。
非常感谢 !
最佳答案
您可以使用其他功能来发送必要的信息...如果您需要多个BarEntry,这会变得很混乱。
这是发送方:
Intent inten = new Intent(context, Main.class);
intent.putExtra("value", 23);
intent.putExtra("index", 1);
接收方:
Bundle bundle = intent.getExtras();
Float value = bundle.getFloat("value");
int index = bundle.getInt("index");
BarEntry barEntry = new BarEntry(value, index);