Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class AnotherBarActivity : DemoBase(), OnSeekBarChangeListener {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_barchart)

title = "AnotherBarActivity"

tvX = findViewById(R.id.tvXMax)
tvY = findViewById(R.id.tvYMax)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ class BarChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartValueSelect
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_barchart)

title = "BarChartActivity"

tvX = findViewById(R.id.tvXMax)
tvY = findViewById(R.id.tvYMax)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ class BarChartActivityMultiDataset : DemoBase(), OnSeekBarChangeListener, OnChar
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_barchart)

title = "BarChartActivityMultiDataset"

tvX = findViewById(R.id.tvXMax)
tvX!!.textSize = 10f
tvY = findViewById(R.id.tvYMax)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class BarChartActivitySinus : DemoBase(), OnSeekBarChangeListener {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_barchart_sinus)

title = "BarChartActivitySinus"

data = FileUtils.loadBarEntriesFromAssets(assets, "othersine.txt")

tvX = findViewById(R.id.tvValueCount)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ class BarChartPositiveNegative : DemoBase() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_barchart_noseekbar)

title = "BarChartPositiveNegative"

chart = findViewById(R.id.chart1)
chart!!.setBackgroundColor(Color.WHITE)
chart!!.extraTopOffset = -30f
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ class BubbleChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartValueSel
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_bubblechart)

title = "BubbleChartActivity"

tvX = findViewById(R.id.tvXMax)
tvY = findViewById(R.id.tvYMax)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ class CandleStickChartActivity : DemoBase(), OnSeekBarChangeListener {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_candlechart)

title = "CandleStickChartActivity"

tvX = findViewById(R.id.tvXMax)
tvY = findViewById(R.id.tvYMax)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ class CombinedChartActivity : DemoBase() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_combined)

title = "CombinedChartActivity"

chart = findViewById(R.id.chart1)
chart!!.description.isEnabled = false
chart!!.setBackgroundColor(Color.WHITE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ class CubicLineChartActivity : DemoBase(), OnSeekBarChangeListener {
val view = binding.root
setContentView(view)

title = "CubicLineChartActivity"

tvX = findViewById(R.id.tvXMax)
tvY = findViewById(R.id.tvYMax)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class DrawChartActivity : DemoBase(), OnChartValueSelectedListener, OnDrawListen
val view = binding.root
setContentView(view)

title = "DrawChartActivity"

// listener for selecting and drawing
binding.chart1.setOnChartValueSelectedListener(this)
binding.chart1.setOnDrawListener(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ class DynamicalAddingActivity : DemoBase(), OnChartValueSelectedListener {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_linechart_noseekbar)

title = "DynamicalAddingActivity"

chart = findViewById(R.id.chart1)
chart!!.setOnChartValueSelectedListener(this)
chart!!.setDrawGridBackground(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class FilledLineActivity : DemoBase() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_linechart_noseekbar)

title = "FilledLineActivity"

chart = findViewById(R.id.chart1)
chart!!.setBackgroundColor(Color.WHITE)
chart!!.setGridBackgroundColor(fillColor)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ class HalfPieChartActivity : DemoBase() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_piechart_half)

title = "HalfPieChartActivity"

chart = findViewById<PieChart>(R.id.chart1)
chart!!.setBackgroundColor(Color.WHITE)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ class HorizontalBarChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartV
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_horizontalbarchart)

title = "HorizontalBarChartActivity"

tvX = findViewById(R.id.tvXMax)
tvY = findViewById(R.id.tvYMax)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ class HorizontalBarNegativeChartActivity : DemoBase(), OnSeekBarChangeListener,
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_horizontalbarchart)

title = "HorizontalBarChartActivity"

tvX = findViewById(R.id.tvXMax)
tvY = findViewById(R.id.tvYMax)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ class InvertedLineChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartVa
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_linechart)

title = "InvertedLineChartActivity"

tvX = findViewById(R.id.tvXMax)
tvY = findViewById(R.id.tvYMax)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class LineChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartValueSelec
super.onCreate(savedInstanceState)
binding = ActivityLinechartBinding.inflate(layoutInflater)
setContentView(binding.root)
title = "LineChartActivity1"
binding.seekBarX.setOnSeekBarChangeListener(this)
binding.seekBarY.max = 180
binding.seekBarY.setOnSeekBarChangeListener(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ class LineChartActivityColored : DemoBase() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_colored_lines)

title = "LineChartActivityColored"

charts[0] = findViewById<LineChart?>(R.id.chart1)
charts[1] = findViewById<LineChart?>(R.id.chart2)
charts[2] = findViewById<LineChart?>(R.id.chart3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ class LineChartDualAxisActivity : DemoBase(), OnSeekBarChangeListener, OnChartVa
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_linechart)

title = "LineChart DualAxis"

tvX = findViewById(R.id.tvXMax)
tvY = findViewById(R.id.tvYMax)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ class LineChartTimeActivity : DemoBase(), OnSeekBarChangeListener {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_linechart_time)

title = "LineChartTime"

tvX = findViewById(R.id.tvXMax)
seekBarX = findViewById(R.id.seekBarX)
seekBarX!!.setOnSeekBarChangeListener(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class ListViewBarChartActivity : DemoBase() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_listview_chart)

title = "ListViewBarChartActivity"

val lv = findViewById<ListView>(R.id.listViewMain)

val list = ArrayList<BarData?>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ class ListViewMultiChartActivity : DemoBase() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_listview_chart)

title = "ListViewMultiChartActivity"

val lv = findViewById<ListView>(R.id.listViewMain)

val list = ArrayList<ChartItem?>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ class MultiLineChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartGestu
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_linechart)

title = "MultiLineChartActivity"

tvX = findViewById(R.id.tvXMax)
tvY = findViewById(R.id.tvYMax)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ class PerformanceLineChart : DemoBase(), OnSeekBarChangeListener {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_performance_linechart)

title = "PerformanceLineChart"

tvCount = findViewById(R.id.tvValueCount)
seekBarValues = findViewById(R.id.seekbarValues)
seekBarValues!!.setOnSeekBarChangeListener(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ class PieChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartValueSelect
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_piechart)

title = "PieChartActivity"

tvX = findViewById(R.id.tvXMax)
tvY = findViewById(R.id.tvYMax)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ class PieChartRoundedActivity : DemoBase(), OnSeekBarChangeListener, OnChartValu
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_piechart)

title = "PieChartActivity"

tvX = findViewById(R.id.tvXMax)
tvY = this.findViewById(R.id.tvYMax)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ class PiePolylineChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartVal
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_piechart)

title = "PiePolylineChartActivity"

tvX = findViewById(R.id.tvXMax)
tvY = findViewById(R.id.tvYMax)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ class RadarChartActivity : DemoBase() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_radarchart)

title = "RadarChartActivity"

chart = findViewById(R.id.chart1)
chart!!.setBackgroundColor(Color.rgb(60, 65, 82))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ class RealtimeLineChartActivity : DemoBase(), OnChartValueSelectedListener {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_realtime_linechart)

title = "RealtimeLineChartActivity"

chart = findViewById(R.id.chart1)
chart!!.setOnChartValueSelectedListener(this)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ class ScatterChartActivity : DemoBase(), OnSeekBarChangeListener, OnChartValueSe
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_scatterchart)

title = "ScatterChartActivity"

tvX = findViewById(R.id.tvXMax)
tvY = findViewById(R.id.tvYMax)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ class ScrollViewActivity : DemoBase() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_scrollview)

title = "ScrollViewActivity"

chart = findViewById(R.id.chart1)

chart!!.description.isEnabled = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ class StackedBarActivity : DemoBase(), OnSeekBarChangeListener, OnChartValueSele
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_barchart)

title = "StackedBarActivity"

tvX = findViewById(R.id.tvXMax)
tvY = findViewById(R.id.tvYMax)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ class StackedBarActivityNegative : DemoBase(), OnChartValueSelectedListener {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_age_distribution)

title = "StackedBarActivityNegative"

chart = findViewById(R.id.chart1)
chart!!.setOnChartValueSelectedListener(this)
chart!!.setDrawGridBackground(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import androidx.core.app.ActivityCompat
import androidx.core.view.WindowCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.WindowInsetsControllerCompat
import androidx.core.view.get
import androidx.core.view.size
import com.github.mikephil.charting.charts.Chart
import com.google.android.material.snackbar.Snackbar
import info.appdev.chartexample.R
import java.text.DateFormatSymbols
import androidx.core.view.size
import androidx.core.view.get

abstract class DemoBase : AppCompatActivity(), ActivityCompat.OnRequestPermissionsResultCallback {

Expand All @@ -42,6 +42,8 @@ abstract class DemoBase : AppCompatActivity(), ActivityCompat.OnRequestPermissio
tfRegular = Typeface.createFromAsset(assets, "OpenSans-Regular.ttf")
tfLight = Typeface.createFromAsset(assets, "OpenSans-Light.ttf")

title = this.javaClass.asSubclass(this.javaClass).simpleName.replace("Activity", "")

onBackPressedDispatcher.addCallback(this, backPressedCallback)
}

Expand Down Expand Up @@ -125,6 +127,7 @@ abstract class DemoBase : AppCompatActivity(), ActivityCompat.OnRequestPermissio

companion object {
private const val PERMISSION_STORAGE = 0

// Jan, Feb,... Dec
val months = DateFormatSymbols().months.toList().map { it.take(3) }
val optionMenus: MutableList<String> = mutableListOf()
Expand Down
Binary file modified screenshotsToCompare9/PieTest_piePolyline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshotsToCompare9/PieTest_piePolyline1-10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshotsToCompare9/PieTest_piePolyline1-20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshotsToCompare9/PieTest_piePolyline1-30.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshotsToCompare9/PieTest_piePolyline1-40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshotsToCompare9/PieTest_piePolyline1-50.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshotsToCompare9/PieTest_piePolyline2-100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshotsToCompare9/PieTest_piePolyline2-150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshotsToCompare9/PieTest_piePolyline2-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshotsToCompare9/PieTest_piePolyline2-50.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshotsToCompare9/ViewPagerTest_smokeTestViewPager-0.png
Binary file modified screenshotsToCompare9/ViewPagerTest_smokeTestViewPager-1.png
Binary file modified screenshotsToCompare9/ViewPagerTest_smokeTestViewPager-2.png
Binary file modified screenshotsToCompare9/ViewPagerTest_smokeTestViewPager-3.png
Binary file modified screenshotsToCompare9/ViewPagerTest_smokeTestViewPager.png
Loading