Last active
May 22, 2018 05:47
-
-
Save rajajawahar/4ed34ccd8fe1d9b76c067aec84833d37 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
class LoginActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
LoginActivityUI().setContentView(this) | |
} | |
} | |
class LoginActivityUI : AnkoComponent<LoginActivity> { | |
override fun createView(ui: AnkoContext<LoginActivity>) = with(ui) { | |
verticalLayout { | |
padding = dip(22) | |
var userName = editText() | |
userName.hint = "Enter UserName" | |
var passWord = editText() | |
passWord.hint = "Enter Password" | |
var button = button() { | |
text = "SignIn" | |
textColor = android.R.color.white | |
backgroundColor = R.color.colorPrimary | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment