I'm making a Jetpack extension in which a widget opens a panel. Clicking the widget opens the panel as expected (anchored in the lower-right corner to the widget). But if I call widget.panel.show() from my code, the panel opens detached from the widget, centered in the screen, floating in space.
In short, how can I fix this?
Can I simulate a click event on the widget (somehow) instead of calling widget.panel.show()?
Can I force the panel to anchor to the widget?
This question has a solution that worked in the previous Jetpack API, but I can't translate to the new interface:
Using positioning 'Panel' in new Jetpack API
panel.show(require("tab-browser").activeTab.ownerDocument.getElementById('widget:yourAddonId#package.json-yourWidgetId'));
Works for me with Addon SDK 1.8.1
Where:
yourAddonId#package.json - your addon id from package.json
yourWidgetId - your widget id
panel.show(widget)
isn't working?
Related
I'm trying to add buttons to a widget having family type ".systemLarge". I want to execute some code without opening the app.
Anyone knows how to do that?
For example the Shortcuts App Widget includes buttons you can tap to execute a shortcut without opening the app.
Widgets are read only. The Shortcuts app is an exception.
https://developer.apple.com/documentation/widgetkit/creating-a-widget-extension
Widgets present read-only information and don’t support interactive elements such as scrolling elements or switches. WidgetKit omits interactive elements when rendering a widget’s content.
You can add Link controls on medium and large size widgets to get a button like behavior.
This won't allow you to create interactive widgets, which change their content by clicking elements inside the widgets.
But you will be able to tell which "link" was clicked based on the widgetUrl provided when your app gets activated through the widget.
See the chapter Respond to User Interactions here:
https://developer.apple.com/documentation/widgetkit/creating-a-widget-extension
I've got a Plugin which uses a UIKitView which contains a WKWebView on iOS and a AndroidView with WebView on Android. The Android solution is working as expected, but I've got two problems on iOS. First, some contents of the web-view, e.g. HTML content, is overlaying the AppBar and second, i can click right through a Drawer element which triggers some click events of my HTML page. I've been able to "solve" the first problem by putting the plugin view into a ClipRect.
Any ideas what causes this behaviour and how to solve it, especially the second one?
I'm using Appium and I don't face this issue on Android. Only on iOS.
The app is made on React Native. Some sections of the app use a dropdown that when you tap on them, show some options but hide the rest of the app behind a shadow. Something similar to this:
When this happens, the focus of the AppiumDriver remains on the background, so I can't tap/click on the options or any of the elements that appear on the front. Similar in some way to what happens when you're using Selenium WebDriver and a new popup appears and you have to change the focus of the driver in order to interact with its elements.
I've tried with "getWindowsHandles()" or "getContextHandles()" but it doesn't work for this scenario.
The only thing that worked to click these options was using X,Y coordinates which is not very optimal, so I'm aiming to find a better solution in which I can interact with these elements setting the AppiumDriver focus on the options.
You can try locating it using the Accessibility Id in your code (not in Appium Inspector). The Accessibility Id will be similar to the text of the option like
accessibility id = "Reload"
I'm new to flutter, and after doing some searching, can't find a widget similar to the Drawer for the top of the page coming down, instead of the left or right side of the page coming out. Is there such a widget or a way to create one?
Not an easy task, but Flutter is open source. You can create your own version of Scaffold and Drawer with a vertical orientation. Just copy and modify the source code.
As of this date the Drawer widget doesn't support this, and there is no 'Vertical Drawer' widget in the Flutter widget catalog.
Thankfully, Akshath Jain created a nice SlidingUpPanel widget which does the trick nicely. For my use case I just needed it to slide from the bottom. I haven't tested it myself, but there is a slideDirection property which you can set to SlideDirection.DOWN and it should do what you're asking for.
I have an app I am builidng in flutter and I want to achieve a similar design that exists in Quora. It it appears to be a sub menu underneath the AppBar and it scrolls horizontally. Is there anything the exists widget wise in flutter that I can use?
I am attaching a screen shot, its the white menu that starts with "For You"