Created
April 4, 2016 04:04
-
-
Save rickyngk/d01be0e47c0d93cda765f914e993ad7b 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
public class SampleViewModel { | |
private String buttonTitle = "Click me!"; | |
private Context context; | |
public SampleViewModel(Context context) { | |
this.context = context; | |
} | |
public String getButtonTitle() { | |
return buttonTitle; | |
} | |
public void onClick(View v) { | |
Toast.makeText(this.context, "Hello", Toast.LENGTH_LONG).show(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment