Skip to content
This repository was archived by the owner on Apr 19, 2022. It is now read-only.

Commit 89fc02e

Browse files
committed
Add comments
1 parent 0bdc518 commit 89fc02e

File tree

1 file changed

+20
-1
lines changed
  • CodeView/src/main/java/me/jackdevey/libraries/codeview

1 file changed

+20
-1
lines changed

CodeView/src/main/java/me/jackdevey/libraries/codeview/CodeView.kt

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,37 @@ package me.jackdevey.libraries.codeview
22

33
import android.content.Context
44
import android.graphics.Canvas
5-
import android.graphics.Color
65
import android.util.AttributeSet
76
import androidx.recyclerview.widget.LinearLayoutManager
87
import androidx.recyclerview.widget.RecyclerView
98

9+
/**
10+
* The main CodeView element
11+
*/
1012
class CodeView : RecyclerView {
1113

1214
constructor(context: Context) : super(context)
1315
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
1416
constructor(context: Context, attrs: AttributeSet?, defStyle: Int) : super(context, attrs, defStyle)
1517

18+
/**
19+
* The font size of the text
20+
*/
1621
var fontSize: Float = 14f
22+
23+
/**
24+
* The code to display on the view
25+
*/
1726
var code: String = "No code provided"
27+
28+
/**
29+
* Number each line
30+
*/
1831
var numberLines: Boolean = true
1932

33+
/**
34+
* Show all the changes made
35+
*/
2036
fun show() {
2137
val data : MutableList<Line> = mutableListOf()
2238
for ((i, line) in code.lines().withIndex()) {
@@ -26,6 +42,9 @@ class CodeView : RecyclerView {
2642
this.layoutManager = LinearLayoutManager(context)
2743
}
2844

45+
/**
46+
* Draw the element
47+
*/
2948
override fun onDraw(canvas: Canvas) {
3049
super.onDraw(canvas)
3150
}

0 commit comments

Comments
 (0)