Skip to content Skip to sidebar Skip to footer

Android Click Button Behind Another Button

I have 6 Buttons (green) that open apps. On top of this buttons there is another button which I use for swipe listener. If no swipe is detected (click) I want to click green button

Solution 1:

Try to use GridView with fixed 3x3 view. There you can set swipe gesture on your GridView like

grid.setOnTouchListener(new OnSwipeTouchListener(mContext)
        {

            publicvoidonSwipeRight()
            {

            }

            publicvoidonSwipeLeft()
            {

            }

        });

and also you can set

    grid.setOnItemClickListener(newAdapterView.OnItemClickListener()
            {
                @OverridepublicvoidonItemClick(AdapterView<?> view, View cell, int position, long id)
                {
                }

            });

For future you can add more Buttons with very less coding.

Post a Comment for "Android Click Button Behind Another Button"