I have a ListView in my layout. I have attached onItemClickListener for ListView to listen for item clicks. Whenever I will click on the item of it, a BottomSheetDialog will inflate. The problem is, that I want the content outside bottomsheetdialog to be clickable and scrollable. Whenever I inflate BottomSheetDialog, the content outside it becomes unresponsive. It doesn't respond to clicks, scroll etc. How can I make the content outside it to still be clickable and scrollable?
Related
I've a BottomSheetDialogFragment inside a RecyclerView, when is clicked a button BottomSheet is showing. BottomSheetDialog expanding when scrolling down and collapsing when scroll finished on top normally.
But when I place the RecyclerView inside a fragment and lay the fragment to BottomSheetDialog; BottomSheet behaviours not working on the fragment, only works RecyclerView scrolling. On the other hand the behaviours work other places on BottomSheet. How to enable the behaviours as in the first?
You should check that your container layout has app:layout_behavior="#string/bottom_sheet_behavior"> and check that any listener/event you define extra, otherwise BottomSheetDialog normally behaive as you expect.
I'm using itemdecorations to draw header in my recyclerview.
Is there a way to detect click event on itemdecorations in recyclerview.
P.S: I don't want to make a multiview type adapter.
I have a webview and want to listen its loading event and I have a refresh button on my actionbar.
How to change the button to a spinner programmatically?
You can't magically change a button into a spinner. What you can do is disable the button and enable the spinner.
myButton.setEnabled(false);
mySpinner.setEnabled(true);
If you want to make the spinner take the place of the button, then you're going to have to put all of your layout drawing routine into a buildLayout() (or whatever you want to call it) and redraw the entire layout with a button or with a spinner, depending on the state of your application.
I have Expandable listview Which contain button, When I click on button the click event is not triggering because button focus is set to false. First I have set button focus false in the xml layout and then based on the existing posts I have changed that and set focusable to false dynamically. But the in the two scenario's button is not clickable. I have tried setting focusable false after setting the onclickListener to the button in the getGroupView method method but the still the button is not click.. Any help Appriciated.
If the button is in the group row then
1. set Focusable true in your xml file for button
2.set focusable to false after setting the onClickListener for the button
3. and the important one is
in your grouprow.xml file try to set
android:descendantFocusability="blocksDescendants"
for the View group. This should work.
I have a TabHost with a ListView inside a tab. When the activity starts, I can't scroll the list view until I have clicked off the tab that the activity starts on, and then re-select the tab with the list view inside it.
Note, I can get the list view to focus by calling:
tabHost.getTabContentView().requestFocus(); but unfortunately, I still can't scroll until I have reselected the tab...
Have any remedies?
Thanks!
Fixed - I ditched the tabs in order to simplify the layout.