Skip to content

Instantly share code, notes, and snippets.

View muzafferyilmaz's full-sized avatar

Muzaffer Yılmaz muzafferyilmaz

View GitHub Profile
@gturedi
gturedi / TouchUtil.java
Last active August 29, 2015 14:15
simple util class to attach double tap event handler to a view
import android.util.Log;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
public class TouchUtil {
public static void addDoubleTapListenerToView(final View target, final Runnable action){
final GestureDetector gestureDetector = new GestureDetector(target.getContext(), new GestureDetector.SimpleOnGestureListener() {
@joshdholtz
joshdholtz / SomeFragment.java
Last active December 22, 2022 09:41
Android Google Maps V2 - MapView in XML
public class SomeFragment extends Fragment {
MapView mapView;
GoogleMap map;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.some_layout, container, false);