-
Content Count
286 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Yaron
-
Can I create my own delphi dark theme (for v10.3.3+)
Yaron replied to Yaron's topic in Delphi IDE and APIs
Sadly using the value from the "Name" field didn't work. Something else is wrong, I can no longer see any of the custom pre-installed themes from the menu. -
Can I create my own delphi dark theme (for v10.3.3+)
Yaron replied to Yaron's topic in Delphi IDE and APIs
I was able to modify the style to me desire, called it "mytheme.vsf", When trying to apply it in the registry by setting "Theme" to "Custom" and "VCLStyle" to "mytheme.vsf" (after placing the file in "c:\Program Files (x86)\Embarcadero\Studio\20.0\Redist\styles\vcl\"). However, Delphi doesn't seem to be using the style, what's more, after restoring the registry setting, if i look under the themes pop-up-menu (clicking the little window-moon icon), the "custom" entry is grayed out. -
Now that 64bit is just around the corner, I recently found out that I'm lacking the 64bit hardware to test it (even on hardware with 64bit processor, it was running 32bit android). What's more frustrating is that it's hard to even know in advance if a device supports 64bit. Sure, it may have a 64bit processor, but is that processor running a 64bit version of Android? I couldn't find out for a few models I looked into. I also tried the Nox emulator, but sadly, I can't get any Delphi APK to run on it (when emulating Android 7, the most recent version supported by Nox), the app just closes unexpectedly right after the splash screen on an empty app (new blank project -> compile). Any cheap & recommended device for testing 64bit? Any other 64bit android emulation framework that works reliably?
-
Can I create my own delphi dark theme (for v10.3.3+)
Yaron replied to Yaron's topic in Delphi IDE and APIs
I'm not sure it's compatible with recent changes in v10.3.2 and 10.3.3. -
Can I create my own delphi dark theme (for v10.3.3+)
Yaron replied to Yaron's topic in Delphi IDE and APIs
What do I use to extract the resources and what do I use to them rebuilt the file and make it accessible in the IDE? Remember, I only need to change a few RGB values, not really anything too complex. I guess if I can't share my work, I'll just document which values I changed. -
It seems the problem is specific accept=".jpg, .jpeg" or even accept=".jpg" using accept="image/jpeg" works just fine.
-
I figured out why it's crashing in my code and not in the simple sample page, If the HTML form file input has an "accept" field (e.g. "<input type="file" accept=".jpg, .jpeg" name="UploadImage" required>"), the App will crash. Since I may not have control over the form's design, I am still looking for a solution around this issue. You can easily test this with the code I linked in the previous post by replacing: WebBrowser.Navigate('https://ps.uci.edu/~franklin/doc/file_upload.html'); With: WebBrowser.LoadFromStrings( '<HTML><HEAD><TITLE>Test</TITLE></HEAD><BODY>'+ '<form method="post" enctype="multipart/form-data" action="https://bla.com">'+ '<input type="file" accept=".jpg, .jpeg" name="UploadImage" required>'+ '<input type="submit" value="Save">'+ '</form>'+ '</BODY></HTML>','');
-
I also tried recreating the FManager component after each page load like this: procedure TMainForm.WebBrowserDidFinishLoad(ASender: TObject); begin FManager := nil; {$IFDEF TRACEDEBUG}AddDebugEntry('Create FWebManager (before)');{$ENDIF} Try FManager := TWebChromeClientManager.Create(WebBrowser); Except on E: Exception do begin {$IFDEF TRACEDEBUG}AddDebugEntry('Error creating FWebManager : '+E.Message);{$ENDIF} end; End; {$IFDEF TRACEDEBUG}AddDebugEntry('Create FWebManager (after)');{$ENDIF} end; But it didn't help, still crashes instantly after pressing the button.
-
Sadly, this issue is not resolved. Like you wrote, it only works if the TWebBrowser component is visible and I verified that it works using the very simple upload form you linked to originally. However, when using it in a more complicated form, after browsing through several pages within the WebView to reach the form, clicking the button just terminates the App instantly (no UI error message). Looking at the logcat, here's the output: 11-28 12:44:35.138 3138 3240 I InputDispatcher: Delivering touch to (3807): action: 0x0, toolType: 1 11-28 12:44:35.138 3807 3807 D ViewRootImpl: ViewPostImeInputStage processPointer 0 11-28 12:44:35.208 3138 3241 D InputReader: Input event(9): value=0 when=3853093882434000 11-28 12:44:35.208 3138 3241 D InputReader: Input event(9): value=0 when=3853093882434000 11-28 12:44:35.208 3138 3241 I InputReader: Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] when=3853093882434000 11-28 12:44:35.208 3138 3240 I InputDispatcher: Delivering touch to (3807): action: 0x1, toolType: 1 11-28 12:44:35.208 3807 3807 D ViewRootImpl: ViewPostImeInputStage processPointer 1 11-28 12:44:35.238 3807 3807 D Instrumentation: checkStartActivityResult() : Intent { act=android.intent.action.GET_CONTENT cat=[android.intent.category.OPENABLE] typ=.jpg } 11-28 12:44:35.238 3807 3807 D Instrumentation: checkStartActivityResult() : intent is instance of [Intent]. 11-28 12:44:35.238 3138 4840 D ApplicationPolicy: isIntentDisabled start :Intent { act=android.intent.action.GET_CONTENT cat=[android.intent.category.OPENABLE] typ=.jpg } 11-28 12:44:35.238 3138 4840 D ApplicationPolicy: isIntentDisabled return :false 11-28 12:44:35.238 3807 3807 W System.err: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.GET_CONTENT cat=[android.intent.category.OPENABLE] typ=.jpg } 11-28 12:44:35.238 3807 3807 W System.err: at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1878) 11-28 12:44:35.238 3807 3807 W System.err: at android.app.Instrumentation.execStartActivity(Instrumentation.java:1545) 11-28 12:44:35.238 3807 3807 W System.err: at android.app.Activity.startActivityForResult(Activity.java:4283) 11-28 12:44:35.238 3807 3807 W System.err: at android.app.Activity.startActivityForResult(Activity.java:4230) 11-28 12:44:35.238 3807 3807 W System.err: at com.embarcadero.rtl.ProxyInterface.dispatchToNative(Native Method) 11-28 12:44:35.238 3807 3807 W System.err: at com.embarcadero.rtl.ProxyInterface.invoke(ProxyInterface.java:21) 11-28 12:44:35.238 3807 3807 W System.err: at java.lang.reflect.Proxy.invoke(Proxy.java:393) 11-28 12:44:35.238 3807 3807 W System.err: at $Proxy12.onFileChooserIntent(Unknown Source) 11-28 12:44:35.238 3807 3807 W System.err: at com.delphiworlds.kastri.DWWebChromeClient.onShowFileChooser(DWWebChromeClient.java:29) 11-28 12:44:35.238 3807 3807 W System.err: at N6.a(PG:145) 11-28 12:44:35.238 3807 3807 W System.err: at xp.runFileChooser(PG:2) 11-28 12:44:35.238 3807 3807 W System.err: at android.os.MessageQueue.nativePollOnce(Native Method) 11-28 12:44:35.238 3807 3807 W System.err: at android.os.MessageQueue.next(MessageQueue.java:323) 11-28 12:44:35.238 3807 3807 W System.err: at android.os.Looper.loop(Looper.java:143) 11-28 12:44:35.238 3807 3807 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7225) 11-28 12:44:35.238 3807 3807 W System.err: at java.lang.reflect.Method.invoke(Native Method) 11-28 12:44:35.238 3807 3807 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 11-28 12:44:35.238 3807 3807 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 11-28 12:44:35.248 1343 1516 D libEGL : eglTerminate EGLDisplay = 0xb690164c 11-28 12:44:35.258 1343 4318 I SurfaceFlinger: id=17304 Removed TurfaceView (4/10) 11-28 12:44:35.258 1343 1522 I SurfaceFlinger: id=17304 Removed TurfaceView (-2/10) 11-28 12:44:35.268 1343 1343 D libEGL : eglTerminate EGLDisplay = 0xbe93d3ac 11-28 12:44:35.888 3138 3240 W InputDispatcher: channel ~ Consumer closed input channel or an error occurred. events=0x9 11-28 12:44:35.888 3138 3240 E InputDispatcher: channel ~ Channel is unrecoverably broken and will be disposed! 11-28 12:44:35.888 3138 4840 I WindowState: WIN DEATH: Window{891996c u0 d0 PopupWindow:8f2b053} 11-28 12:44:35.898 3138 3914 D GraphicsStats: Buffer count: 11 11-28 12:44:35.898 1343 1522 I SurfaceFlinger: id=17305 Removed QopupWindow (5/9) 11-28 12:44:35.898 1343 19954 D libEGL : eglTerminate EGLDisplay = 0xb09a86fc 11-28 12:44:35.898 1343 1522 I SurfaceFlinger: id=17305 Removed QopupWindow (-2/9) 11-28 12:44:35.898 1343 19954 D libEGL : eglTerminate EGLDisplay = 0xb09a86fc 11-28 12:44:35.898 3138 3920 I ActivityManager: Process com.inmatrix.Voucherim (pid 3807)(adj 0) has died(274,734) 11-28 12:44:35.898 3138 3920 D ActivityManager: cleanUpApplicationRecord -- 3807
-
Thanks Eli, Adding the library resolved the exception, however clicking on the choose file button still does nothing, so something else is preventing this from working in my own code and I can't seem to find out what. I posted the App's source here: https://inmatrix.com/temp/TestApp_src.zip It just wraps around a website, simply run it and click 'connect' (no need for name and pass, it just opens a sample file submission page)
-
"Project / Version info / target - all configuration" broken?
Yaron posted a topic in Cross-platform
For some reason, any data I entered under the Project Options version info's "all configuration" entries is not actually applied to the release/debug sections. And later on, I couldn't upload to the play store, because it was seeing the old version number from the "release" section. Is it just me, or am I misunderstanding what the "all configuration" entries actually do (I was assuming it was applying whatever I entered into both release/debug profiles so I don't have to do everything twice). -
"Project / Version info / target - all configuration" broken?
Yaron replied to Yaron's topic in Cross-platform
I tried that, it didn't work. Perhaps I didn't understand what you mean by "manually delete", I just used the project dialog to make sure all entries across debug/release/all configuration were the same and then changed the value on 'all configurations' to see if it affects the 'release configuration' (which it didn't). -
"Project / Version info / target - all configuration" broken?
Yaron replied to Yaron's topic in Cross-platform
And if I have overridden the version number in the past, how can I restore it so it will be set again by 'all configuration'? -
Thanks, In a million years I wouldn't have made that connection.
-
Where is that option? I can't seem to find it.
-
Without any rationale?
-
The demo project seems to work, but when porting the snippet into my own code I'm catching an exception when calling "FWebManager := TWebChromeClientManager.Create(VoucherimWebBrowser);" : "Error creating FWebManager : java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.ClassLoader java.lang.Class.getClassLoader()' on a null object reference" Other than renaming the variables/components, I used the exact same OnCreate override as in the sample and just added an "FWebManager := nil" when closing the app. You mentioned including the jar file, but I haven't seen anything in particular in the demo itself, so I'm assuming it's included by one of the units (which I also included in my project). Any ideas? If needed, I can post the entire source code for this app, it's just a wrapper around a web site. Unrelated, I get a hint while compiling: [DCC Hint] DW.WebChromeClient.Android.pas(98): H2443 Inline function 'TAndroidHelper.GetJActivity' has not been expanded because unit 'Androidapi.JNI.App' is not specified in USES list
-
[ignore this]
-
It would be nice if Embarcadero handled it in-house, considering it's a bug that existed for years and is pretty straight-forward to reproduce.
-
This issue still exists and every so often pops-up, you would think it's a somewhat simple fix.
-
Detecting when an Android app finishes resizing to fullscreen mode
Yaron posted a topic in Cross-platform
I am creating an Android application that scales images based on the device's fullscreen resolution. To enable fullscreen, I do: 1. In "Project Options / Application / Version Info" I set the theme to "No TitleBar". 2. Set "Form.Fullscreen" to enabled in the main form's "OnCreate" event. However, I'm having problems detecting when my App is finally fullscreen, I suspect there may be a rounding error in Delphi's function, here is the log: 05-17 03:56:36.660: I/info(15344): FMX: ZP Remote: ZPR_DBG: Screen Scale : 1.3125 05-17 03:56:36.666: I/info(15344): FMX: ZP Remote: ZPR_DBG: IFMXScreenService.GetScreenSize : 1280x736 (with screen scale) 05-17 03:56:36.666: I/info(15344): FMX: ZP Remote: ZPR_DBG: IFMXScreenService.GetScreenSize : 975x561 (original) 05-17 03:56:36.666: I/info(15344): FMX: ZP Remote: ZPR_DBG: Screen : 975x561 05-17 03:56:36.664: I/info(15344): FMX: ZP Remote: ZPR_DBG: Client : 975x537 05-17 03:56:36.724: I/info(15344): FMX: ZP Remote: ZPR_DBG: Client : 975x537 05-17 03:56:36.940: I/info(15344): FMX: ZP Remote: ZPR_DBG: Client : 975x562 The first 4 lines give system detail from IFMXScreenService.GetScreenScale, IFMXScreenService.GetScreenSize and Screen.Width/Screen.Height. Each "client" line shows the values of "ClientWidth/ClientHeight" on a FormResize event. As you can see, the ClientHeight value is higher than the Screen.Height value, which doesm't make sense. -
Detecting when an Android app finishes resizing to fullscreen mode
Yaron replied to Yaron's topic in Cross-platform
Just for reference, my current logic is to resize the UI after an OnIdle event but not before an "TApplicationEvent.BecameActive" event triggers first. Seems to work, but I'm not perfectly confident that it works across every device. Oh, you may also notice something odd with the last resize event, the form's WindowState value was changed to "TWindowState.wsMinimized" even though the app is fullscreen. Perhaps this has something to do with the app being run on a phone with a notch. -
Detecting when an Android app finishes resizing to fullscreen mode
Yaron replied to Yaron's topic in Cross-platform
That doesn't work, check out this log, a form resize event is triggered AFTER the first OnIdle event. -
You are right, I was able to fix this de-sync issue by going line by line doing cut, paste, cut, paste (copy/paste entire blocks did not work). Strangely enough, I compared the file before/after the fix and the files are identical?!
-
I'm also experiencing this issue, at first I thought it was the issue where unicode characters entered the code by a copy & paste operation (which in the past lead to cases where the debug/code got desynched by a few lines). However, I did my usual fix for that issue (Copy/paste/convert to ascii), but it didn't work this time. The strange thing for me is that this de-sync starts to happens BEFORE any actual functional code and the increases further down the code, check out the included screenshot.