Skip to content

Instantly share code, notes, and snippets.

@jitinsharma
Last active March 18, 2018 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jitinsharma/1f19cbba407b99c67a3f4123ac44046e to your computer and use it in GitHub Desktop.
Save jitinsharma/1f19cbba407b99c67a3f4123ac44046e to your computer and use it in GitHub Desktop.
package io.github.jitinsharma.androidapp
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import io.github.jitinsharma.API_KEY
import io.github.jitinsharma.Helper
import io.github.jitinsharma.Model
import kotlinx.android.synthetic.main.activity_main.*
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val helper = Helper()
val sum = helper.getSum(2,3)
sumView.text = "Sum: " + sum
val modifiedList = helper.sliceFilterAndSort(
listOf("Adam","Aakash","John","Enrique","Abhishek"))
println(modifiedList)
val helperId = Helper.helperId
val helperType = Helper.getHelperType()
println("$helperId $helperType")
val model = Model()
println(model)
val model2 = model.copy(id = 3)
println(model2)
val key = API_KEY
println(key)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment