I'm currently developing a windows app with flutter. I experienced that the default mouse cursor changes when hovering over a button that is clickable or shows an "forbidden" sign if a button is deactivated. This does not feel right for me and I think in most Windows programs there is just the standard cursor.
I know about the MouseRegion class where I can set the cursor for one button. Is there a way to change the cursor globally for the entire application?
In my opinion, overall, the cursor topic is still in progress for Flutter. We have been developing a Desktop application for almost two years now and I can definitely tell that, there is a progress but still it is a problem.
What we do most of the time is to create our own buttons and arrange all of them together.
However, to answer your question :) Assuming that you are using new material buttons on the latest Flutter version, in the new Material Buttons shared here. You can see that, ButtonStyle class has a field called final MaterialStateProperty<MouseCursor> mouseCursor; which is the mouseCursor that you can use for your own buttons.
Related
Background:
When focused on a WebView control, TalkBack announces something to the effect of "Bing. WebView. Double tap and hold to long press" (note that focus is on the WebView control itself, not the content within the webview). However, as best I can tell, double tap and long pressing doesn't seem to do anything other than pass TalkBack focus into a control within the WebView itself. Our team has testers that specialize in accessibility which filed a bug on us for this "Double tap and hold to long press" announcement. The rationale within the bug states that since this action doesn't appear to do anything, the announcement will only serve to confuse TalkBack users.
This announcement doesn't appear to be specific to our app as I was able to reproduce this behavior on a new, blank Android app with a WebView that points to Google (there it announces "Google. WebView. Double tap and hold to long press"). As I think it helps show what focus I'm talking about, I have added a screenshot of the prototype app I built with the green TalkBack focus indicator below:
Questions:
Is there a reason for why Android insists on announcing the "double tap and hold to long press" piece for a WebView? If there is a functional reason for this, then any attempt to fix this issue may be moot.
Does anyone know of a way to stop TalkBack from reading the "double tap and long press"? Alternatively, is there a way to hide the WebView control itself from TalkBack without hiding the html content within?
What I've tried:
Unfortunately saw no luck setting isLongClickable to false, setting empty onLongClickListeners, and worked with a few of the suggestions in the stackoverflows here, here, here, and here. I tried all of the mentioned changes on a blank app to reduce the possibility that the complexities of our production app has interfered with the experiments I was running. Setting the ImportantForAccessibility field to "No" hides all of the inner html of the webview from Talkback so that is not an option either.
Sidenote that I find interesting: in my experimentation, I also tried setting the WebView's isClickable property to false and yet it was still clickable. So I am wondering if I am possibly focusing on setting properties on the wrong control (or if Android just completely ignores those properties on a WebView control).
I want to create a button can move to any position like iPhone Style (Virtual Home Button) in Flutter but I don't know any packages or any library can do it. Moreover, I'd like the button to be able to show along with a specific app, eg. dial-up UI. If I deploy to desktop, will its behavior the same with mobile?
ios virtual home button
show button along with dial-up UI
Hope you guys help me ways to create it.
I have tried with unicorndial, floating_bubble, popup window, etc.
but all of them are widget within flutter app, instead of system-wide.
Sorry you can't really create anything like that outside of your App context. Apple is very strict in situations like this.
You can implement this sort of feature in Android by using Floating Service. But for Apple it's a NO NO.
Im trying to retrieve typing information such as the on-screen coordinates of where a user presses a key on a keyboard on Android and iOS using flutter similar to how swiftkey does it to generate their heatmaps.
How would I go about doing this? Do I have to create my own custom keyboard
I've tried to implement the suggestion here: How to Calculate the Coordinates of touch in Flutter?
But once the keyboard drawer pops up, the on-screen coordinates do not register.
To do this you would have to show your own keyboard that you build in flutter. The reason for this is that the keyboard which pops up is actually a different android window (or at least activity, but pretty sure window and likely process as well), that is shown over top of the window that flutter is rendering into. By design, the keypresses can't be recorded as that would be a security issue (the active app is one thing, but imagine if another app could record keypresses or even location of taps - they could steal your passwords!).
There may be some android-specific way of doing it that I'm not aware of, but it probably won't work on all devices and all keyboards and is likely not a good route to follow.
I'm part of a team building a mobile web app using AppGyver Steroids (PhoneGap). We are having an issue with the iOS7 keyboard displaying a very faint "Done" button on the keyboard when the user is operating in a text area or an input select. I suspect this is a problem that is actually global in our app, but these are the instances where I have observed them.
I've searched and searched for a solution or how to "customize" the keyboard in order to make this "Done" button more obvious, but I haven't found any solutions yet. Can anyone point me in the direction of how to adjust the "Done" button or any other keyboard/input controls?
Attached are two screenshots showing the issue.
http://i.stack.imgur.com/KeFYM.png
http://i.stack.imgur.com/h11IH.png
Have you seen the issue on github? It's now fixed. They'll be including the option for custom colours in the near future.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Android facebook style slide
Recently Facebook released a new version of its Android application that features an improved navigation. One main new feature is the new menu (that already existed on the iOS version):
By clicking on the home button of the Action Bar, this menu slides from left to right, hiding the main activity that is no longer accessible.
How do you think this menu has been made? Do you think they have just played with the SlidingDrawer or is it something else like a ViewPager?
Thanks!
EDIT
There is no way that it could be one of the two (ViewPager or SlidingDrawer). It's not the menu that slides in, it's the main screen that moves away leaving only a tiny part of it on the screen. It's like if the menu was already behind that main screen and that it just got uncovered. And second thing, we can actually still interact with that main screen (otherwise I would have assumed that they took a screenshot in order to cut a tiny part of it to compose that view).
Almost everything except the photo taking parts is inside a WebView in the new FB app. I could not find any native Android UI controls in the stream or the lists.
Making the same effect using Javascript/HTML/CSS should be quite easy I feel.
Decompiling the apk would give a better idea.
I was looking for implementing the same thing and I came up with a solution that is good enough (or maybe is really near what they have done).
So what I did was a single FrameLayout with both of the Layouts stacked together and then I just animate the top layout to slide to the right of the screen (just need to call the slideTo or scrollBy. And basically it's that! Quite simple and effective!
EDIT:
I've answered to a similar question here with some code samples, enjoy =): Click here
You can build this application style using javascript, HTML5 and CSS3 like it shows this little library "jbackbone-mobile", https://github.com/mjromper/jbackbone-mobile
and see this demo from any browser (device or desktop) http://lab.ochio.com.es/jbackbone/index.html