achartengine - can't figure how to use dates as x axis - the file I save is empty

前端 未结 2 1641
抹茶落季
抹茶落季 2020-11-29 14:11

I have an activity where I take the input from edit text and store it in an list.

I also store in list the current date.

Then , I press the save button which

2条回答
  •  旧时难觅i
    2020-11-29 14:30

    The code that deal with your file must be something like this (not compiled):

    public void savefunc(){
        List myDate = new ArrayList(); //To store the formatted dates
        SimpleDateFormat thedate = new SimpleDateFormat("dd/MM/yyyy"); 
        Date d=new Date(); //the current date
        String sd = thedate.format(d); // sd contains "16/04/2013", the formatted date
        myDate.add(sd);
    
        double thedata=Double.parseDouble(value.getText().toString().trim());
        mydata.add(thedata);
        ...
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(fos));
        for (int i=0;i

    Hope it helps.

提交回复
热议问题