Changes

Jump to: navigation, search

Kotlin - A Guide to the Android Studio Layout Editor Tool

250 bytes removed, 16:14, 4 December 2017
Basic vs. Empty Activity Templates
    setContentView(R.layout.activity_state_change)
    setSupportActionBar(toolbar)
 
    fab.setOnClickListener { view ->
        Snackbar.make(view, "Replace with your own action", 
                  Snackbar.LENGTH_LONG)
                .setAction("Action", null).show()
    }
}
</pre>
If you need a floating action button but no menu, use the Basic Activity template and follow these steps:
1. Edit the activity class file and delete the onCreateOptionsMenu and onOptionsItemSelected methods.
2. Select the res -> menu item in the Project tool window and tap the keyboard Delete key to remove the folder and corresponding menu resource files from the project.
<htmlet>as30kotlin</htmlet>
 
== The Android Studio Layout Editor ==

Navigation menu