Last active
March 18, 2018 08:44
-
-
Save jitinsharma/1f19cbba407b99c67a3f4123ac44046e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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