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 @@ -18,14 +18,14 @@ class BarChartItem(chartData: ChartData<*>, context: Context) : ChartItem(chartD
get() = TYPE_BARCHART

@SuppressLint("InflateParams")
override fun getView(position: Int, convertView: View?, c: Context?): View? {
override fun getView(position: Int, convertView: View?, context: Context?): View? {
var convertView = convertView
val holder: ViewHolder

if (convertView == null) {
holder = ViewHolder()

convertView = LayoutInflater.from(c).inflate(
convertView = LayoutInflater.from(context).inflate(
R.layout.list_item_barchart, null
)
holder.chart = convertView.findViewById(R.id.chart)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import info.appdev.charting.data.ChartData
abstract class ChartItem internal constructor(var chartData: ChartData<*>) {
abstract val itemType: Int

abstract fun getView(position: Int, convertView: View?, c: Context?): View?
abstract fun getView(position: Int, convertView: View?, context: Context?): View?

companion object {
const val TYPE_BARCHART: Int = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ class LineChartItem(chartData: ChartData<*>, context: Context) : ChartItem(chart
get() = TYPE_LINECHART

@SuppressLint("InflateParams")
override fun getView(position: Int, convertView: View?, c: Context?): View {
override fun getView(position: Int, convertView: View?, context: Context?): View {
var convertView = convertView
val holder: ViewHolder

if (convertView == null) {
holder = ViewHolder()

convertView = LayoutInflater.from(c).inflate(
convertView = LayoutInflater.from(context).inflate(
R.layout.list_item_linechart, null
)
holder.chart = convertView.findViewById(R.id.chart)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ class PieChartItem(chartData: ChartData<*>, context: Context) : ChartItem(chartD
get() = TYPE_PIECHART

@SuppressLint("InflateParams")
override fun getView(position: Int, convertView: View?, c: Context?): View {
override fun getView(position: Int, convertView: View?, context: Context?): View {
var convertView = convertView
val holder: ViewHolder

if (convertView == null) {
holder = ViewHolder()

convertView = LayoutInflater.from(c).inflate(
convertView = LayoutInflater.from(context).inflate(
R.layout.list_item_piechart, null
)
holder.chart = convertView.findViewById(R.id.chart)
Expand Down
Loading