How to disable behind view click event Framelayout
imageView.setSingleTapListener(new OnImageViewTouchSingleTapListener() {
@Override
public void onSingleTapConfirmed() {
Log.d("TAG", "setSingleTapListener");
sCounter++;
if (sCounter % 2 == 0) {
mRlTopOverlayBar.setVisibility(View.GONE);
mRlBottomOverlayBar.setVisibility(View.GONE);
pager.requestFocus();
} else {
mRlTopOverlayBar.setVisibility(View.VISIBLE);
mRlBottomOverlayBar.setVisibility(View.VISIBLE);
mRlTopOverlayBar.requestFocus();
mRlBottomOverlayBar.requestFocus();
mRlBottomOverlayBar.setClickable(true);
mRlTopOverlayBar.setClickable(true);
}
}
});
How to disable background touch in FrameLayout?
Enabling click listener or clickable on any view prevents the touch from passing to its parent views/Underlying Views
In XML add below code to your textview
android:clickable=true
this should prevent all the touches from passing to underlying videoview.
Prevent Click-through of Android ImageVIew?
Simply call rlTest.setClickable(false)
. This will prevent the click to be propagate to the children
How to disable all click events of a layout?
I would create a ViewGroup
with all the views that you want to enable/disable at the same time and call setClickable(true/false)
to enable/disable clicking.
disable all clicks in layout
in your onClickListener
, check if the slidingPanelLayout is opened or not,
if (opened){
return ;
}
you may assume it is opened/ closed , when the offset of the slidingPanelLayout is 0 or equal to the screen width.
Related Topics
How to Display a Pdf Via Android Web Browser Without "Downloading" First
How to Display an Image in Full Screen on Click in the Imageview
How to Capitalize the First Letter of Text in a Textview in an Android Application
Sending Files Using Post With Httpurlconnection
Android Push Notifications Not Being Received When App Closed
How to Fix Attempt to Invoke Interface Method on a Null Object Reference
How to Clear Navigation Stack After Navigating to Another Fragment in Android
Passing an Arraylist of Objects to the New Activity
Adb Error (Error: Protocol Fault (Couldn't Read Status): Invalid Argument)
Chrome on Android Resizes Font
How to Get Imsi Number in Android Using Command Line
How to Close the Current Fragment by Using Button Like the Back Button
Refresh/Reload/Re Instantiate a Fragment in an Android Tab System
Android Adb Doesn't See Device
Pdf Not Open in Webview from Url