masonyc / xamarin.keyboardhelper Goto Github PK
View Code? Open in Web Editor NEWXamarin.Forms keyboard helper
License: MIT License
Xamarin.Forms keyboard helper
License: MIT License
Adding Nuget at solution level results in "Xamarin.Forms targets have been imported multiple times. Please check your project file and remove the duplicate import(s)." error, cannot build.
Hi,
While following the documentation i tried to add this in My MainActivity file
"Xamarin.EnableKeyboardEffect.Platform.Droid.Effects.Init(this);"
its says The type or namespace name "Platform" does not exist in the namespace "Xamarin.EnableKeyboardEffect".
Also their is no option for adding assembly reference. Please suggest if am missing anything or update the documentation.
In my Xamarin.Forms application I use KeyboardHelper to not show the keyboard on my Entry elements.
But when I give focus to an element, my screen "jumps". The problem is that the keyboard opens and then closes immediately.
Is it possible to make the keyboard not open at all?
Even after successfuly adding this package and all what is required in XAML Entry, the keyboard is still showing
<Entry x:Name="BarcodeEntry" Text="{Binding BarcodeEntryText}" effects:EnableKeyboardEffect.EnableKeyboard="False" IsVisible="false">
<Entry.Behaviors>
<behaviorsPack:EventToCommandBehavior EventName="Completed" Command="{Binding BarcodeEntryCompletedCommand}" />
</Entry.Behaviors>
<Entry.Effects>
<effects:KeyboardEnableEffect/>
</Entry.Effects>
</Entry>
The type or namespace name 'Platform' does not exist in the namespace 'Xamarin.KeyboardHelper' (are you missing an assembly reference?)
when using
Xamarin.KeyboardHelper.Platform.Droid.Effects.Init(this)
version 3.0.1 (Right now I downgraded to 2.0.7)
I created new clone of my project. Then in my Android head project, I did following:
I updated all of my packages in my droid head project, rebuild > success
I added EKE package only to my droid head project, rebuild > success
I added xmlns:effects namespace to the top of my xaml file where I want to have Entry with disabled keyboard, rebuild > success
Then in same file, I added following to my Entry field to add EKE functionality as per your documentation:
<Entry x:Name="BarcodeEntry" Text="{Binding BarcodeEntryText}" IsVisible="false" effects:EnableKeyboardEffect.EnableKeyboard="False">
<Entry.Effects>
<effects:KeyboardEnableEffect/>
</Entry.Effects>
<Entry.Behaviors>
<behaviorsPack:EventToCommandBehavior EventName="Completed" Command="{Binding BarcodeEntryCompletedCommand}" />
</Entry.Behaviors>
</Entry>
Error: Failed to resolve assembly: 'Xamarin.EnableKeyboardEffect, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
Good thing is that I dont see the XF001 error so far but I also added your lib nuget only to Droid head project, not to any other .NETStandard projects. But I am seeing this issue. I would expect to see it since I have not added your lib into my .NETStandard project which hosts my views including the one above.
Good thing is that I havent gotten XF001 error which I have been getting all this time, so I am not sure what fixed it but following these exact steps, I was able to finally add the EKE nuget to my Droid project. Keeping these steps here might be good idea as someone else may run into issue or it gives to you some hints as of what went wrong.
Dependabot couldn't find a .(cs|vb|fs)proj for this project.
Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /<anything>.(cs|vb|fs)proj
.
If this isn't a .NET project, or if it is a library, you may wish to disable updates for it from within Dependabot.
You can mention @dependabot in the comments below to contact the Dependabot team.
Hi Team,
Xamarin.KeyBoardHelper hiding keyboard with effects pretty much good.
I have an issue like,I have barcode scanner attached to device and am able to scan barcode using scanner and am not seeing keyboard which is good.
Issue I found, entry scanning completely slow with barode device scanning..In xaml page am having listview,entry,menu.
I cannot get it to work when a Bluetooth HID mode device is connected, like a Bluetooth barcode scanner which simulates a Bluetooth keyboard. When a Bluetooth device connects in HID mode, the virtual keyboard is automatically hidden by the OS.
I have two entry fields, one for the barcode (bEntry) and one for some mandatory text, that should be entered (tEntry). I need the keyboard to show on the tEntry text field.
<Entry x:Name="tEntry" effects:KeyboardEffect.EnableKeyboard="True" Focused="tEntry_Focused">
<Entry.Effects>
<effects:KeyboardEnableEffect/>
</Entry.Effects>
</Entry>
I added the Focused="tEntry_Focused"
event handler, and in there do SoftKeyboard.Current.InvokeVisibilityChanged(true);
but it does nothing. The keyboard remains hidden.
Is there a way to force the virtual keyboard to show, regardless of a Bluetooth-connected keyboard(simulator)?
Update: works on Android, not on iOS. On iOS, I found out that I should use the scanner-buttons to toggle the virtual keyboard.
Thanks,
Marc
Package to work need to have xamarin.android.support.design library installed. With androidX this library is not used anymore. Is possible to recompile project with androidX support? thanks
When in landscape mode, the keyboard takes full screen and hides my entry control. How to prevent it from taking full screen
I want to force Focus on a blank page. If a user taps anywhere on the blank page (whitespace) then the focus is lost, and one way I thought of achieving constant focus is by adding Entry.Focus() on Entry.Unfocused, so if the user taps on the whitespace, focus is lost then refocused immediately, but the Entry.Unfocused event is not executing at all.
Looks like missing XAML namespace? Can you provide info on how to set that up please?
<Entry x:Name="outhead_ProductCode" Placeholder="备件号" effects:KeyboardEffect.EnableKeyboard="{Binding outhead_ProductCode_check}" FontSize="Small" Margin="0,-5,0,0">
<Entry.Effects>
<effects:KeyboardEnableEffect/>
</Entry.Effects>
</Entry>
bool outhead_ProductCode_check=false;
private void Outhead_BoxCode_Completed(object sender, EventArgs e)
{
outhead_ProductCode.Focus();
this.outhead_ProductCode_check = true;
}
在enter之后,软键盘的binding 没有生效
Why does the keyboard appear briefly and then disappear when I call Entry.Focus() only on Android?
As we use external bar-code scanner to scan into the field, we dont want to show, then hide keyboard when we do Entry.Focus()
call in code.
We need this in order to prevent confusing behavior where keyboard keeps popping up then closing for no obvious reason when user is scanning into the Entry field in question.
Is it possible to prevent keyboard from popping up entirely when programmatically focusing on an Entry from code?
3.0.1 need NETStandard 2.1.
If solution works on UWP/IOS/Android it's not possible use NETStandard 2.1.
Could you make work on NETStandard 2.0?
Will this be available in the future fir .NET MAUI
Getting this error after I followed your steps on VS2017
Error CS0234 The type or namespace name 'Platform' does not exist in the namespace 'Xamarin.KeyboardHelper' (are you missing an assembly reference?)
https://github.com/pulmuone/MauiSoftKeyboard
I cannot add this nugget to any other .NET Standard 2.0 projects, only head projects iOS and Android
Dependabot couldn't find a .(cs|vb|fs)proj for this project.
Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /<anything>.(cs|vb|fs)proj
.
If this isn't a .NET project, or if it is a library, you may wish to disable updates for it from within Dependabot.
You can mention @dependabot in the comments below to contact the Dependabot team.
Hi and thanks for sharing. I havent had a chance to try it but from reading your wiki, it looks like only platform specific code change is required on iOS side.
Also, comment "write here" is confusing, feels like something is missing or need to be added here by whoever uses this effect, I'd suggest changing that to something like "enable EnableKeyboardEffect on iOS" or some better description
I managed to add the library to IOS without problems but when running it, I get the collapsed keyboard as per screenshot. That itself is not a problem, the real problem is that the collapsed keyboard is missing the "arrow" button on the right that allows you to tap on it to hide the collapsed keyboard entirely or to long-tap on it to expand it to full keyboard.
I dont have problem with this collapsed keyboard but it normally comes with the down pointing arrow button on the right which allows me to expand it or hide it entirely. But using this effect removes that
This is pretty much same issue you get by using custom renderers to hide keyboard like so:
public class SoftkeyboardDisabledEntryRenderer : EntryRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
{
base.OnElementChanged(e);
// Disabling the keyboard
this.Control.InputView = new UIView();
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.