Adnroid 13 (Samsung Galaxy S22) Alert Dialog window disappears when EditText view is touched - android-edittext

This Problem is only reproduced on Samsung Galaxy S22 and Android 13.
No problem with [Pixel 6 Pro API 33] in Adnroid Studio.
The problem is that when I click EditText View of Alert Dialog, Alert Dialog disappears.
Here's the scenario:
There is an Alert Dialog and if you click TextView, a new Alert Dialog is displayed again.
Below is an image of the problem.
When I touch the EditText view, the Soft Keyboard appears, but
The Alert Dialog with EditText disappears and the first Alert Dialog behind appears as below.
The current focus seems to be on the disappeared Alert Dialog.
This app has been used since Android 7, and there was no problem with Galaxy S22 and Android 12.
After the Android 13 update, this problem always appears, what is the problem?
This problem comes from all Alert Dialogs used in Activity and Service.
Alert Dialog settings are usually as follows.
// AlertDialog
AlertDialog.Builder builder;
builder = new AlertDialog.Builder(mContext);
builder.setTitle(title);
builder.setView(mBindingTimeUnit.getRoot());
builder.setPositiveButton(mContext.getString(R.string.Common_Confirm), Listener_Positive);
builder.setNegativeButton(mContext.getString(R.string.Common_Cancel), Listener_Negative);
builder.setOnDismissListener(Listener_Dismiss);
AlertDialog alert = builder.create();
alert.getWindow().setType(mLAYOUT_FLAG);
alert.setCancelable(false);
alert.show();
There is no problem when only one Alert Dialog window appears.
If I open the Alert Dialog again on top of the Alert Dialog, a problem appears.
I tested another app also.
Another app that pops up the alert dialog twice also reproduces the same problem
.
Another app name is "Automatic clicker"

Related

Swipe iphone home screen to left , XCode UI Testing

Following is my piece of code . After the launch of application I click on the submit button which shows me an alert.
After I click ok on the UIAlertViewController I move to the home screen , and then I want to swipe left on the home screen.
Any idea how this can be done.
Any help will be appreciated
func testExample() {
let app = XCUIApplication()
app.buttons["Submit"].tap()
app.alerts["Please enable bluetooth"].buttons["OK"].tap()
XCUIDevice.sharedDevice().pressButton(XCUIDeviceButton.Home)
}
As of Xcode 8.0 you cannot interact with the UI outside of your application from the UI Test target. I filed a bug report http://www.openradar.me/radar?id=6180999608139776

UIAlertView popup won't let me swipe up Control Center

I'm currently working on a Xamarin MvvmCross ios app. I have it set to display a UIAlertView popup to inform the user when their internet is disabled (the app requires an internet connection).
The problem is that when this popup shows, the user can't swipe up the Control Center to activate their internet...
var dlg = new UIAlertView(config.Title ?? String.Empty, config.Message, null, config.CancelText, config.OkText);
dlg.Clicked += (s, e) =>
{
var ok = (dlg.CancelButtonIndex != e.ButtonIndex);
_activeDialog.DismissAlertDialog();
config.OnConfirm(ok);
};
dlg.Show();
They then have to either click OK and race the popup reappearing, or home the app, reactivate internet, then come back to the app...
Anyone any suggestions?
It's not possible to get around this, since UIAlertView is probably being displayed above the window that handles gestures for the Control Center. This is the way Apple made it.
I would use a custom view as a UIAlertView and fade the background view's alpha. Or you could use a library that already does this:
https://github.com/alexanderjarvis/PXAlertView
https://github.com/wimagguc/ios-custom-alertview
https://github.com/ChrisXu1221/CXAlertView
Related Questions:
Can't use Control Center when UIAlertView displayed (iOS 7)
UIAlertView Strange Behaviour with Shortcut Control center

Accessing and Enable/disable UIViewalert Button in ios 7 and earlier

I am stuck on Accessing uialertview buttons in ios 7 . when googling i read ios 7 did not allow to customize or chenging the uialert view button .
I want to do these functionality in my project my deployment target is 5.0-
->I want to disable AlertView first button disable for 15 second with its title like this
OK(15),OK(14)......OK(0),OK(with user enable). After completion 15 seconds user can tap to the ok button to dismiss the alert view .
please suggest me how to do this.
Can i get the ok (fist button) of alert view and can change its title as i write above .
Or
i have to use custom alert view .
I want to show the default looking UIAlert which match with IOS 7 and earlier version Ui
Thanks .

Cancel button from UIActionSheet doesn't appear after long press on phone number in UITextView

I have a problem with the devices that have less then 4 inch display. When pressing long tap on phone number in UITextView, the UIActionSheet that appears doesn't show the Cancel button. The issue is that the actionSheet does showInView, instead of showFromTabBar.
In a demo app, this issue doesn't reproduce. Need help!
Check that the option 'Full Screen at Launch' is checked on the Window in you MainWindow.xib.
I had a similar problem and others when updating for iPhone 5 screen. Apparently the 'Simulated metrics' of Window will be the actual metrics when launching (provided you have not checked 'Full Screen at Launch').
Apple actually has a Note about it in the UIWindow Class Reference:
... If you choose to create a window in Interface Builder, be sure to select the Full Screen at Launch option in the Attributes inspector so that the window is sized appropriately for the current device. ...

iOS 7: keyboard shows in UIKeyboardAppearanceLight when an app is opening from multitasking screen

I've noticed an issue with the keyboard in ios 7, and I'm not sure if I'm doing something wrong.
Here's a simple scenario which replicates the issue on a blank xcode 5 project:
When you tap on a textfield added using interface builder (with keyboard appearance set to dark), the correct (dark) keyboard appears.
If you then resign the responder (add a button or something for that) > press the home button to get to home screen > double press the homebutton to get to the multitasking selection screen > tap on the app > tap on the textfield > it shows up the Light keyboard for a second, and then it draws the dark keyboard.
So is this an iOS bug or could it be something on my end?

Resources