How to show the custom dialog exactly down the clicked item item in a recycler view? - android-recyclerview

I've created a custom dialog & a recyclerview, and when i click an item in the recycler view my custom dialog appears but it just appears in the same place. How can i control it place exactly down the clicked item?

Related

how to keep scroll on modal popup called from an other modal window

here my problem:
I open a modal popup and I can scroll it properly, then when I open a new model popup from this one if I try to scroll down this popup the scroll is on the main webpage in background. How can I focus the scroll on the active modal popup?
thank you

Hide menu item in main menu?

How can I hide and show a menu item in the main menu of a form? The System.Windows.Forms.MenuItemclass doesn't have the Visible property.

Loading UserControl within a Child Window

I have a child window created in silverlight. I need to load a user control within the child window(for a content change in the same child window) on a button click.
How can i acheive this?
Say for Example: If i have a child window with a Header -> Content -> Button.
I just need to change the content part and the button part on click of the button.
I need to change the buttons also since navigation is not possible using the same button click events.
Is it possible to acheive this in Silverlight 4.0 or 5.0?
Here is one way to do it. Create a canvas to hold the content and on button click, add the user control and add it as a child to the canvas. If you want to change the button, rather than changing the button, in the same button click the button content to a different text.
private void Button_Click_1(object sender, RoutedEventArgs e)
{
SilverlightControl1 control1 = new SilverlightControl1();
top.Children.Add(control1);
}
Hope this helps.

How to show a Safari Extension popover programmatically

I'm trying to write a Safari extension that consists of a button on the main toolbar with a popover tied to it, and a contextual menu item. The basic feel is modeled after the feel of the 1Password extension.
One of the jobs of the popover is to allow a person to log in. I'm also conditionally changing the action of the contextual menu item, and if a who person isn't logged in clicks the menu item I would like to show the popover allowing them to log in, but I can't find a way to do this in the developer guides.
How do I "show" a popover?
If you only have one toolbar item and one popover (and never plan to add more), then it's just one line. Assuming you've already assigned the popover to the toolbar item in Extension Builder, you can just use:
safari.extension.toolbarItems[0].showPopover();
But if you have more than one popover and (potentially) more than one toolbar item, here's a generalized function to open a popover, specified by its identifier, under the specified toolbar item in the active browser window:
function showPopover(popoverId, toolbarItemId) {
var toolbarItem = safari.extension.toolbarItems.filter(function (tbi) {
return tbi.identifier == toolbarItemId && tbi.browserWindow == safari.application.activeBrowserWindow;
})[0];
var popover = safari.extension.popovers.filter(function (po) {
return po.identifier == popoverId;
})[0];
toolbarItem.popover = popover;
toolbarItem.showPopover();
}

Pushed icon in toolbar

I put on bevel button in toolbar, set image for this button and uncheck checkbox bordered. How make pushed icon in toolbar like this?
You need to mark your toolbar item as Selectable. Edit your nib file in Xcode, double click the toolbar, click the item in Allowed Toolbar items and, in the Utilities panel, show the Attributes inspector and mark the Selectable checkbox.
Return your item identifiers in the delegate of the toolbar:
- (NSArray*)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar
{
return _toolbarIdentifiers;
}
The toolbar will consider them selectable, so the selected item will be displayed the way you need.