Last active
September 28, 2015 07:24
-
-
Save simekadam/d4e2efa7296512f3b9e2 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 AddPersonActivity extends Activity implements IAddPersonView { | |
| private TextView vPersonsAdded; | |
| private EditText vPersonName; | |
| private Button vAddPerson; | |
| private IAddPersonPresenter mPresenter; | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.activity_main); | |
| vPersonsAdded = (TextView) findViewById(R.id.txt_added_persons); | |
| vPersonName = (EditText) findViewById(R.id.et_name_input); | |
| vAddPerson = (Button) findViewById(R.id.btn_save_person); | |
| mPresenter = new AddPersonPresenterImpl(this); | |
| vAddPerson.setOnClickListener(new View.OnClickListener() { | |
| @Override | |
| public void onClick(View v) { | |
| mPresenter.onAddPersonButtonClicked(vPersonName.getText().toString()); | |
| } | |
| }); | |
| } | |
| @Override | |
| public void showNumberOfPersons(int size) { | |
| vPersonsAdded.setText(getString(R.string.added_persons, size)); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment