Last active
December 17, 2015 00:29
-
-
Save bbody/5521760 to your computer and use it in GitHub Desktop.
A bad example of a need for refactoring and UI decoupling
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
private void setupDirectionSpinner(){ | |
busStop = inputTextEdit.getText().toString(); | |
boundSpinner = (Spinner) this.findViewById(R.id.boundSpinner); | |
// Set up bound list | |
boundList = new ArrayList<String>(); | |
boundList.add("Direction"); | |
boundList.addAll(dbhelper.getDirections(busStop)); | |
// Set up adapter | |
boundAdapter = new ArrayAdapter<String>(getBaseContext(), | |
android.R.layout.simple_dropdown_item_1line, boundList); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment