Skip to content

Instantly share code, notes, and snippets.

@IvBaranov
IvBaranov / DragAndDropExample.java
Last active October 20, 2017 08:09
Android drag and drop
View DragAndDropExample.java
dropView.setOnDragListener((view, event) -> {
int action = event.getAction();
switch (event.getAction()) {
case DragEvent.ACTION_DRAG_STARTED:
// nothing
break;
case DragEvent.ACTION_DRAG_ENTERED:
// on entered view
break;
case DragEvent.ACTION_DRAG_EXITED:
@IvBaranov
IvBaranov / AndroidImageAdapter.java
Last active June 11, 2019 19:44
Android quick image fullscreen slider
View AndroidImageAdapter.java
public class AndroidImageAdapter extends PagerAdapter {
Context mContext;
AndroidImageAdapter(Context context) {
this.mContext = context;
}
@Override
public int getCount() {
return sliderImagesId.length;
View docker-debug-container.md
RUN apt-get update && apt-get install -y --no-install-recommends \
      ssh \
      patch \
      vim