Skip to content

Instantly share code, notes, and snippets.

View laramartin's full-sized avatar

Lara Martin laramartin

View GitHub Profile
set surround " visual select and then S
set ignorecase " Make searches case-insensitive.
set incsearch " But do highlight as you type your search.
set clipboard=unnamed " yank and paste from system clipboard
set clipboard+=ideaput " ctrl + c & v from ideavim
noremap <Up> <Nop>
noremap <Down> <Nop>
noremap <Left> <Nop>
noremap <Right> <Nop>
class Manager {
var service: Service? = null
init {
service = Service(::print)
//service = Service({ message -> println(message) })
//service = Service { println(it) }
}
private fun displayMasterDetailLayout(view: View) {
val navHostFragment =
childFragmentManager.findFragmentById(R.id.profile_nav_container) as NavHostFragment
view.findViewById<TextView>(R.id.account_textview).setOnClickListener {
navHostFragment.navController.navigate(R.id.fragment_account)
}
view.findViewById<TextView>(R.id.notifications_textview).setOnClickListener {
navHostFragment.navController.navigate(R.id.fragment_notifications)
private fun displaySingleLayout(view: View) {
view.findViewById<TextView>(R.id.account_textview).setOnClickListener(
Navigation.createNavigateOnClickListener(R.id.action_profile_fragment_to_fragment_account)
)
view.findViewById<TextView>(R.id.notifications_textview).setOnClickListener(
Navigation.createNavigateOnClickListener(R.id.action_profile_fragment_to_fragment_notifications)
)
view.findViewById<TextView>(R.id.settings_textview).setOnClickListener(
Navigation.createNavigateOnClickListener(R.id.action_profile_fragment_to_fragment_settings)
)
// Gamer.java
import [...]
public final class Gamer {
@NotNull
private final String username;
@NotNull
public final String getUsername() {
return this.username;
// GamerConciseSyntax.java
import [...]
public final class GamerConciseSyntax {
@NotNull
private final String username;
@NotNull
public final String getUsername() {
return this.username;
class Gamer(val username: String)
class Gamer constructor(username: String) {
val username : String
init {
this.username = username
}
}
class Gamer constructor(username: String){
...
}
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#4d4d4d"
android:pathData="M1,1H20v1H1" />