MpAndroidChart (2) 썸네일형 리스트형 [안드로이드][프로젝트1] 내가 MPAndroid X axis 값을 날짜와 시간으로 변환한 방법(firebase 연동) 1. DataPoint 클래스의 xValue를 long값으로 바꿔준다. public class DataPoint { long xValue; int yValue; public DataPoint(long xValue, int yValue) { this.xValue = xValue; this.yValue = yValue; } public DataPoint(){ } public long getxValue() { return xValue; } public int getyValue() { return yValue; } } 참고:https://youtu.be/WcwhZztfY2g 2. SimpleDateFormat 지정해주자. SimpleDateFormat sdf = new SimpleDateFormat("MM-dd.. [안드로이드][프로젝트1] MPAndroidChart를 활용한 LineChart 사용 1. settings.gradle에 다음 코드를 추가하고 싱크를 맞춰준다. maven { url 'https://jitpack.io' } 2. build.gradle(모듈)에 다음 코드를 추가하고 싱크를 맞춰준다. implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0' 3. layout의 xml 파일에 다음 코드를 추가한다. 4. activity에 다음 코드를 추가한다. import android.graphics.Color; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; import com.github.mikephil.charting.charts.LineChart; im.. 이전 1 다음