I\'ve seen in many Java code notation that after a method we call another, here is an example.
Toast.makeText(text).setGravity(Gravity.TOP, 0, 0).setView(lay
This pattern is called "Fluent Interfaces" (see Wikipedia)
Just return this; from the methods instead of returning nothing.
return this;
So for example
public void makeText(String text) { this.text = text; }
would become
public Toast makeText(String text) { this.text = text; return this; }