Xamarin.Forms - Community Toolkit Popup working in iOS not Android - xamarin.forms

I have a bit of code that uses the Community Toolkit popup control. It works fine in iOS but no text is shown in Android. When I put a breakpoint, it does not appear to hit the breakpoint -- nor does it appear to hit other breakpoints.
var popup = new SwipePopUp
{
CheckBoxText=CheckboxLabelText,
GotItText=GotItText,
CentralText=CentralText,
Size=size
};
App.Current.MainPage.Navigation.ShowPopup(popup);
Any thoughts?
Thanks!

We have discovered that while iOS does not need OnPropertyChanged, Android does, and adding that fixed the problem.
Thanks!

Related

How to use Toucheffect in Maui. In xamarin forms we can do it using the xamarin toolkit.

This is the shared touch effect files
This is the android platforms specific code
This is where I register the effect and the handler
This is where I used toucheffect nativeanimation property
Some properties are working , for example : the PressedOpacityBackgroundColor. Is there a way to make the native animation property to work
I tried from someone's code from where this issue was mentioned. I implemented as it is but the native animation property isn't working and also some other properties as well.
You can also use the Toutheffect in the MAUI.
You can add the Xamarin.CommunityToolkit.MauiCompat 2.0.2-preview1013 to your project. It is the .NET MAUI Compatible version of Xamarin.CommunityToolkit.

Telegram Web Apps method Expand isn't working

I found that the method Expand of window.Telegram.WebApp object isn't working in the Telegram client for Windows and IOS on computers and tablets.
How to increase the size of Web Apps frame for those devices?
function buttonOn(){
// do something on btn click
}
let main_page = document.querySelector('#main_page');
if (main_page){
window.Telegram.WebApp.expand() //expand window after page loading
window.Telegram.WebApp.MainButton.onClick(buttonOn) //set func on main button click
window.Telegram.WebApp.MainButton.setParams({'text': 'Корзина'}) // set byn params
window.Telegram.WebApp.MainButton.show() //show telegram btn
}
Other button events
Remove the line from the function:
window.Telegram.WebApp.expand() //expand window after page loading
And call it in the beginning/at the top of your main javascript code. (The code that will start running once the user has clicked on the button)
Also, you can make your code a lot shorter by putting window.Telegram.WebApp in a variable like:
const tele = window.Telegram.WebApp; //Initializes the TELEGRAM BOT and
//Gets the user's Telegram ID from the Telegram API
tele.expand(); //Expands the app on the users' phone to 100% height
The reason is, probably, you are a bit incorrect in understanding what "expansion" is. This term could only be applied to mobile devices with OS such as Android or iOS. Web App is displayed there in such native component as BottomSheet with inserted WebView containing your web application. Initially, in mobile devices, application is being opened minimized (not expanded). To make it use maximum allowed height of screen, you could call expand() method. It must work through window.Telegram.WebApp.expand().
In desktop or web versions of Telegram, Web App is displayed in separate component which is not allowed to change its size.
You could probably find more useful information about viewport and expansion here, or use alternative libraries, such as twa-bridge or twa-sdk

Puppeteer - Click button behind a notification

Puppeteer 2.1.0
jest-puppeteer 4.4.0
Win 10 64bit
I have this situation https://i.imgur.com/JbcQAhB.png
I want to click the green button but the notification is in my way.
My code:
selector = "//main/div[1]/div[2]/button[1]"
await page.waitForXPath(selector)
const elementHandle = await page.$x(selector)
await elementHandle[0].click()
This code won't click the button, and I know is the notification, because if before the click() I put a waitFor(5000) and close the notification manually then it works just fine
I also tried in the chrome console directly like this, and it works just fine with the notification in front
$x("//main/div[1]/div[2]/button[1]")[0].click()
Also this kind of code should work for headless mode, so the fact that the notification is "In front" should never be an issue.
Possible questions:
Are you using headed mode? Yes, I have to. I'm testing using chrome extensions.
Using Xpath instead of selectors? Yes, I have no option as well, I have to use xpath
Why no closing the notification? It could work (and actually it does for this particular situation), but that's not the only notification that popUps, more of those show up and messes up with other similar buttons. I need to click the button behind the notification
Thanks!
I found a way, I just changed the await elementHandle[0].click() for await page.evaluate(x=>x.click() , elementHandle[0])
I'll leave the question here, hope somebody find it useful

Radeditor on google chrome not working

I have a telerik rad editor. My application runs in .net 2.0 environment. The telerik version is : 2012.3.1016.35. The rad editor is not enabled on chrome only. I cannot type into it.Works fine in all other browsers. Upgrading to new telerik is not an option. Because this is an old client and changing will/may affect other styling things.
So what are my options. I posted this on telerik, but no response. If you need more information, please let me know. Thanks.
EDIT:
ON checking the console I got an error. Please find the image attached to see the error.
SOLUTION:
I got it. I had a line like below to open a rad window:
rwSC.VisibleOnPageLoad = True
This was causing the problem. Sometimes it would open fast and the control would load and I can place my cursor within the rad editor within the rad window and sometimes cannot. So I replaced that with this
Javascript.RegisterStartupScript(Me, "NewSC", "setTimeout(""$find('" & rwSC.ClientID & "').show();"", 500);", True)
And now it works. The rad editor within the radwindow is enabled and I can edit it.
Is this what you have: http://feedback.telerik.com/Project/108/Feedback/Details/125713?
If so, try the JS workaround there

Disabling Submit Button in ASP.NET 3.5 Application with JavaScript breaks BlackBerry submission

The following code is being used to disable a Submit button once it has been clicked. This works great on desktop browsers and most BlackBerry mobile browsers.
Submit.Attributes.Add("onclick", "javascript:this.disabled=true;" +
ClientScript.GetPostBackEventReference(Submit, null));
Unfortunately, when using a BlackBerry Storm clicking the submit button causes the device to just reload the page. If I remove this code the Storm browser submits the page just fine. I need to disable the button when the browser is capable of doing so but do not want to affect browsers that are not JavaScript capable.
I realize I could add the jQuery framework and only attach the event client side, but am trying to look for the simplest fix (read least intrusive) as this is a legacy application. Any suggestions?
I believe you can do it this way - I haven't done this in a long time and some of the HttpCapabilities API has been tagged as obsolete, but in general you can detect if the browser supports javascript by doing this:
var myBrowserCaps = Request.Browser;
if (((HttpCapabilitiesBase)myBrowserCaps).EcmaScriptVersion.Major > 1)
{
// Browser supports javascript
Submit.Attributes.Add("onclick", "javascript:this.disabled=true;" +
ClientScript.GetPostBackEventReference(Submit, null));
}

Resources