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
package document; | |
import java.util.List; | |
/** | |
* A naive implementation of the Document abstract class. | |
* @author UC San Diego Intermediate Programming MOOC team | |
*/ | |
public class BasicDocument extends Document | |
{ |
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
package document; | |
import java.util.List; | |
/** | |
* A naive implementation of the Document abstract class. | |
* @author UC San Diego Intermediate Programming MOOC team | |
*/ | |
public class BasicDocument extends Document | |
{ |
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 initializeAutocomplete() { | |
adCategoryAdapter = new AdCategoryAdapter(this, R.layout.item_ad_category_create); | |
adCategories.setAdapter(adCategoryAdapter); | |
adCategories.setThreshold(0); | |
adCategories.setOnFocusChangeListener((v, hasFocus) -> forceDisplayDropDownOnFocus(v, hasFocus)); | |
adCategories.setOnClickListener((view) -> forceDisplayDropDownOnFocus(view)); | |
adCategories.setOnItemClickListener((parent, view, position, id) -> presenter.onCategorySelected(adCategoryAdapter.getItem(position))); | |
} |