Github will be the main account and bitbucket the secondary.
ssh-keygen -t rsa -C "github email"
Enter passphrase when prompted. If you see an option to save the passphrase in your keychain, do it for an easier life.
### Keybase proof | |
I hereby claim: | |
* I am hkosacki on github. | |
* I am hubko (https://keybase.io/hubko) on keybase. | |
* I have a public key ASDY-5h3iTgEONoqsToXyQANx6SCg09VOyX02GDVPsEDmAo | |
To claim this, I am signing this object: |
import android.widget.ListView; | |
import android.widget.AbsListView; | |
import android.content.Context; | |
public class HalfCircleListView extends ListView implements AbsListView.OnScrollListener { | |
public HalfCircleListView(Context context) { | |
super(context); | |
setOnScrollListener(this); | |
} |
/* | |
* Used to register to each adapter item, to handle long click events | |
*/ | |
private OnItemLongClickListener longClickListener = new OnItemLongClickListener<File>() { | |
@Override | |
public void onItemLongClick(View view, File f) { | |
if (f.isDirectory()) { | |
Snackbar.make(view, "Sorry, no drag'n'drop support for directories", Snackbar.LENGTH_SHORT).show(); | |
return; | |
} |
ClipDescription description = new ClipDescription(f.getName(), new String[]{ClipDescription.MIMETYPE_TEXT_URILIST}); | |
ClipData.Item clipDataItem = new ClipData.Item(Uri.fromFile(f)); | |
ClipData draggedData = new ClipData(description, clipDataItem); | |
View.DragShadowBuilder dragShadowBuilder = new View.DragShadowBuilder(view); | |
// start drag'n'drop operation with Nougat flags | |
view.startDragAndDrop(draggedData, dragShadowBuilder, null, View.DRAG_FLAG_OPAQUE | View.DRAG_FLAG_GLOBAL); |
ClipDescription description = new ClipDescription(null, new String[]{ClipDescription.MIMETYPE_TEXT_PLAIN}); | |
ClipData.Item clipDataItem = new ClipData.Item("myItem"); | |
ClipData draggedData = new ClipData(description, clipDataItem); | |
View.DragShadowBuilder dragShadowBuilder = new View.DragShadowBuilder(view); | |
// start drag'n'drop operation with Nougat flags | |
view.startDragAndDrop(draggedData, dragShadowBuilder, null, View.DRAG_FLAG_OPAQUE | View.DRAG_FLAG_GLOBAL); |
ClipDescription description = new ClipDescription(null, new String[]{ClipDescription.MIMETYPE_TEXT_PLAIN}); | |
ClipData.Item clipDataItem = new ClipData.Item("myItem"); | |
ClipData draggedData = new ClipData(description, clipDataItem); | |
View.DragShadowBuilder dragShadowBuilder = new View.DragShadowBuilder(view); | |
// start drag'n'drop operation | |
view.startDragAndDrop(draggedData, dragShadowBuilder, null, 0); |
ClipDescription description = new ClipDescription(f.getName(), new String[]{ClipDescription.MIMETYPE_TEXT_URILIST}); | |
ClipData.Item clipDataItem = new ClipData.Item(Uri.fromFile(f)); | |
ClipData draggedData = new ClipData(description, clipDataItem); | |
View.DragShadowBuilder dragShadowBuilder = new View.DragShadowBuilder(view); | |
// start drag'n'drop operation | |
view.startDrag(draggedData, dragShadowBuilder, null, 0); |
imageTrash.setOnDragListener(new View.OnDragListener() { | |
@Override | |
public boolean onDrag(View view, DragEvent dragEvent) { | |
switch(dragEvent.getAction()){ | |
case DragEvent.ACTION_DRAG_STARTED: | |
case DragEvent.ACTION_DRAG_ENTERED: | |
case DragEvent.ACTION_DRAG_LOCATION: | |
case DragEvent.ACTION_DRAG_EXITED: | |
case DragEvent.ACTION_DRAG_ENDED: | |
return true; |