現在の私の活動では、ユーザが指で画面上に描画することによって作成したPathオブジェクトを持っています。おそらくIntentを介して、このPathオブジェクトを次のアクティビティに渡したいと思います。 「「おおよそ(ダブル)メソッドを解決することはできません。そうPathオブジェクトを新しいアクティビティに渡す方法(Android)
float[] pArray = path.approximate(0.5);
myIntent.putExtra("arr",pArray);
のような点の配列が、しかし、Androidは私にエラーを与えるとして、私はパスを近似する近似値()メソッドを使用してみましたが
Intent myIntent = new Intent(activity, TrainingActivity.class);
myIntent.putExtra("image",byteArray);
/* Pass the Path to the Intent here*/
// Start new activity with this new intent
activity.startActivity(myIntent);
''、そして何らかの理由で私はそれが動作するようにすることはできませんので、この方法はないと思われる。
はい、 'android.graphics.Path'にはこのようなpublic/visibleメソッドはありません。' @ hide'アノテーションによって隠されています – pskink
docs(https://developer.android.com/reference/android/graphics/)によると、 Path.html#approximate(float))、このメソッドはAndroid Oプレビューでのみ使用できます。 – MatusMak