마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

안드로이드 스튜디오 import java.lang.reflect.Array; 질문이요

0 추천

<MainActivity.java>

package com.example.park.xy;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;

import com.androidplot.series.XYSeries;
import com.androidplot.xy.LineAndPointFormatter;
import com.androidplot.xy.SimpleXYSeries;
import com.androidplot.xy.XYPlot;
import java.lang.reflect.Array;
import java.util.Arrays;

public class MainActivity extends Activity {

    String [] months = new String[]{"A","B","C","D","E","F","G","H"};
    Number[] incomes={2000, 2500, 2700, 3000, 2800, 3500, 3700, 3800};
    Number[] expences={2200, 2700, 2900, 2800, 2600, 3000, 3300, 3400};

    XYPlot xyplot;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        xyplot=(XYPlot)findViewById(R.id.plotxy);

        XYSeries incomePlot=new SimpleXYSeries(Arrays.asList(incomes), SimpleXYSeries.ArrayFormat.Y_VALS_ONLY,"Income");

        XYSeries expence=new SimpleXYSeries(Arrays.asList(expences), SimpleXYSeries.ArrayFormat.Y_VALS_ONLY,"Expence");

        LineAndPointFormatter IncomeFormatter=new LineAndPointFormatter(
                Color.rgb(255,0,0),
                Color.rgb(0,255,0),
                null);


        LineAndPointFormatter ExpenceFormatter=new LineAndPointFormatter(
                Color.rgb(255,0,0),
                Color.rgb(0,255,0),
                null);
    }
/*
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
*/
}

안드로이드 스튜디오인데 저런식으로 흰색으로 변하면서 안먹히네요....

import java.lang.reflect.Array; 부분도 흰색이라 스샷에는 안찍혔어용

꺾은선 그래프 만들고 있는데 저부분 인식이 안되서 그래프가 안나타나요...

어떻게 변경해야 먹히나요? ㅠㅠ 도와주세요!

익명사용자 님이 2016년 5월 24일 질문

답변 달기

· 글에 소스 코드 보기 좋게 넣는 법
· 질문에 대해 추가적인 질문이나 의견이 있으면 답변이 아니라 댓글로 달아주시기 바랍니다.
표시할 이름 (옵션):
개인정보: 당신의 이메일은 이 알림을 보내는데만 사용됩니다.
스팸 차단 검사:
스팸 검사를 다시 받지 않으려면 로그인하거나 혹은 가입 하세요.
...