Dialog dialog = new AlertDialog.Builder(Activity01.this)
.setTitle("Login hint")
.setMessage("Here needs your login!")
.setPositiveButton(...)
.setNeutralButton(...
).create();
What kind of grammar it is? I cannot understand why those dots are one by one? And the create() is for Builder() or for setNeutralButton()?
Thanks!
Builderis a static inner class ofAlertDialog. Each call returnsthisallowing you to chain methods. Finally you callcreate()to create the actual dialog. This is basic Java and has little to do with Android, besides the fact that Android uses this pattern a lot.