Created
September 9, 2018 02:58
-
-
Save alejandro-rios/e95954c31888194d30ee09d71a0c3026 to your computer and use it in GitHub Desktop.
This file contains 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
import android.content.Intent; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import android.widget.Button; | |
import android.widget.EditText; | |
import butterknife.BindView; | |
import butterknife.ButterKnife; | |
import butterknife.OnClick; | |
public class MainActivity extends AppCompatActivity { | |
@BindView(R.id.edt_mobile) | |
EditText edtMobile; | |
@BindView(R.id.edt_name) | |
EditText edtName; | |
@BindView(R.id.edt_email) | |
EditText edtEmail; | |
@BindView(R.id.btn_login) | |
Button btnLogin; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
ButterKnife.bind(this); | |
} | |
@OnClick(R.id.btn_login) | |
public void onLoginClicked() { | |
User user = new User(); | |
user.setEmail(edtEmail.getText().toString()); | |
user.setMobile(edtMobile.getText().toString()); | |
user.setName(edtName.getText().toString()); | |
// Replace Henson.with to HensonNavigator.goto... | |
Intent intent = HensonNavigator.gotoDetailsActivity(this) | |
.isSuccess(true) | |
.user(user) | |
.build(); | |
startActivity(intent); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment