Java 是否将android.graphics.path值转换为字符串?
我有一个路径值的数组列表。我需要将其转换为字符串值,并知道路径中包含的所有坐标。 以下是我编写的代码:Java 是否将android.graphics.path值转换为字符串?,java,android,string,Java,Android,String,我有一个路径值的数组列表。我需要将其转换为字符串值,并知道路径中包含的所有坐标。 以下是我编写的代码: private ArrayList<Path> pointsToDraw = new ArrayList<Path>(); private List<String> stringPoints ; synchronized(pointsToDraw){ for(Path path : pointsToDraw)
private ArrayList<Path> pointsToDraw = new ArrayList<Path>();
private List<String> stringPoints ;
synchronized(pointsToDraw){
for(Path path : pointsToDraw)
{
stringPoints.add(String.valueOf(path));
}
TextView b1Text = (TextView) findViewById(R.id.GText);
for(String s : stringPoints)
{
b1Text.setText(s);
}
}
我哪里做错了?请帮忙
stringPoints
尚未分配列表
更改:
private List<String> stringPoints ;
私有列表点;
致:
private List stringPoints=new ArrayList();
Done..And Works!!谢谢!:-)
private List<String> stringPoints ;
private List<String> stringPoints = new ArrayList<String>();