Skip to content

Commit ea894c0

Browse files
authored
Merge pull request #620 from AppDevNext/RenameContext
Rename Context
2 parents 0548522 + 3cb0ef9 commit ea894c0

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

app/src/main/kotlin/info/appdev/chartexample/listviewitems/BarChartItem.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ class BarChartItem(chartData: ChartData<*>, context: Context) : ChartItem(chartD
1818
get() = TYPE_BARCHART
1919

2020
@SuppressLint("InflateParams")
21-
override fun getView(position: Int, convertView: View?, c: Context?): View? {
21+
override fun getView(position: Int, convertView: View?, context: Context?): View? {
2222
var convertView = convertView
2323
val holder: ViewHolder
2424

2525
if (convertView == null) {
2626
holder = ViewHolder()
2727

28-
convertView = LayoutInflater.from(c).inflate(
28+
convertView = LayoutInflater.from(context).inflate(
2929
R.layout.list_item_barchart, null
3030
)
3131
holder.chart = convertView.findViewById(R.id.chart)

app/src/main/kotlin/info/appdev/chartexample/listviewitems/ChartItem.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import info.appdev.charting.data.ChartData
1111
abstract class ChartItem internal constructor(var chartData: ChartData<*>) {
1212
abstract val itemType: Int
1313

14-
abstract fun getView(position: Int, convertView: View?, c: Context?): View?
14+
abstract fun getView(position: Int, convertView: View?, context: Context?): View?
1515

1616
companion object {
1717
const val TYPE_BARCHART: Int = 0

app/src/main/kotlin/info/appdev/chartexample/listviewitems/LineChartItem.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ class LineChartItem(chartData: ChartData<*>, context: Context) : ChartItem(chart
1818
get() = TYPE_LINECHART
1919

2020
@SuppressLint("InflateParams")
21-
override fun getView(position: Int, convertView: View?, c: Context?): View {
21+
override fun getView(position: Int, convertView: View?, context: Context?): View {
2222
var convertView = convertView
2323
val holder: ViewHolder
2424

2525
if (convertView == null) {
2626
holder = ViewHolder()
2727

28-
convertView = LayoutInflater.from(c).inflate(
28+
convertView = LayoutInflater.from(context).inflate(
2929
R.layout.list_item_linechart, null
3030
)
3131
holder.chart = convertView.findViewById(R.id.chart)

app/src/main/kotlin/info/appdev/chartexample/listviewitems/PieChartItem.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ class PieChartItem(chartData: ChartData<*>, context: Context) : ChartItem(chartD
3030
get() = TYPE_PIECHART
3131

3232
@SuppressLint("InflateParams")
33-
override fun getView(position: Int, convertView: View?, c: Context?): View {
33+
override fun getView(position: Int, convertView: View?, context: Context?): View {
3434
var convertView = convertView
3535
val holder: ViewHolder
3636

3737
if (convertView == null) {
3838
holder = ViewHolder()
3939

40-
convertView = LayoutInflater.from(c).inflate(
40+
convertView = LayoutInflater.from(context).inflate(
4141
R.layout.list_item_piechart, null
4242
)
4343
holder.chart = convertView.findViewById(R.id.chart)

0 commit comments

Comments
 (0)