forked from organicmaps/organicmaps
[android] Fixed touch on 'Leave review' button in PPP
Made it so that PP is not moved durtin 'Leave a review' touch
This commit is contained in:
parent
340ec57f8a
commit
fa55fcec30
3 changed files with 13 additions and 1 deletions
|
@ -6,6 +6,7 @@ import android.support.annotation.NonNull;
|
|||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
@ -160,6 +161,11 @@ public class UGCController implements View.OnClickListener, UGC.UGCListener
|
|||
UiUtils.hide(mUgcRootView, mLeaveReviewButton);
|
||||
}
|
||||
|
||||
public boolean isLeaveReviewButtonTouched(@NonNull MotionEvent event)
|
||||
{
|
||||
return UiUtils.isViewTouched(event, mLeaveReviewButton);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUGCReceived(@NonNull UGC ugc)
|
||||
{
|
||||
|
|
|
@ -111,7 +111,8 @@ class BottomPlacePageAnimationController extends BasePlacePageAnimationControlle
|
|||
case MotionEvent.ACTION_UP:
|
||||
final boolean isInside = UiUtils.isViewTouched(event, mDetailsScroll);
|
||||
final boolean isBannerTouch = mPlacePage.isBannerTouched(event);
|
||||
if (isInside && !isBannerTouch && mIsGestureStartedInsideView)
|
||||
boolean isLeaveReviewButtonTouched = mPlacePage.isLeaveReviewButtonTouched(event);
|
||||
if (isInside && !isBannerTouch && !isLeaveReviewButtonTouched && mIsGestureStartedInsideView)
|
||||
mGestureDetector.onTouchEvent(event);
|
||||
mIsDragging = false;
|
||||
break;
|
||||
|
|
|
@ -2203,6 +2203,11 @@ public class PlacePageView extends RelativeLayout
|
|||
return mBannerController != null && mBannerController.isActionButtonTouched(event);
|
||||
}
|
||||
|
||||
public boolean isLeaveReviewButtonTouched(@NonNull MotionEvent event)
|
||||
{
|
||||
return mUgcController != null && mUgcController.isLeaveReviewButtonTouched(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSizeChanged()
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue