Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 839 Bytes

TipsAndTricks.md

File metadata and controls

41 lines (29 loc) · 839 Bytes

CodeLab Kotlin - Infosoft 2017

Tips And Tricks

  • Crea una Activity

    • File / New / Activity / Empty Activity
public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
  }
  • Crea una Kotlin Activity

    • File / New / KotlinActivity
class KotlinActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_kotlin)
        app()
    }
  }
  • Convierte una clase Java a Kotlin

    • Code / Convert Java File to Kotlin File
  • Crea una Clase o Archivo en Kotlin

    • File / New / Java class
    • File / New / Kotlin File/Class