Skip to content

Instantly share code, notes, and snippets.

View vdubedout's full-sized avatar

Vincent Dubedout vdubedout

  • Freelance
  • Montreal
View GitHub Profile
@vdubedout
vdubedout / BasicDocument.java
Last active August 6, 2016 17:04
Data Structures Course, Week 1 Assignment. No matcher pattern. https://www.coursera.org/learn/data-structures-optimizing-performance/home/week/1 #Course
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
{
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
{
@vdubedout
vdubedout / ActivityAutoComplete.java
Last active April 2, 2019 14:17
AutoComplete for Android - Forces the selection of an Item- Accent stripped from matching process to handle french
[...]
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)));
}