Jump to content
JohnLM

Is there a downloadable custom view for Galaxy S10+ phone?

Recommended Posts

SPECS:  Delphi 11.2,  Galaxy S10+ phone (Android 12) (screen size is 6.4 inches)

 

Issue:  I want to change the view in the IDE to match my phone but the closest one is the 'Android 5" phone', and when I add componets on the form in that view, after compiling, the controls don't fit the screen and/or are sometimes off the view of the screen. 

 

In Delphi XE7, in the View's drop-down list, there is a custom setting option. I think I only used it once for a tablet years ago, but could not figure it all out and gave up.  However, in 11.2, there is no listing for custom.  So, I was wondering if there are downloadable views, or does the developer has to figure it out manually by eye/try.

 

I've been searching around but cannot find any answers.  TIA.

Share this post


Link to post

In Delphi 11.2, I found it under Tools\Options\Form Designer\Device manager and I played around in it, but under the field, [Device Background] I could not find an image to use, so it failed to complete without that field being filled in. 

 

I believe my Galaxy S10+ pixel display view is 412x869 - per this link https://yesviz.com/devices/s10+/ 

 

Edited by JohnLM

Share this post


Link to post
8 hours ago, JohnLM said:

under the field, [Device Background] I could not find an image to use, so it failed to complete without that field being filled in.

 

If you don't have a frame for your device, just put a PNG of the good dimension (at least the size of the screen of the device in pixels).

Share this post


Link to post

Okay, I think I know what I can do. 

 

1. I can use the 'Photowall' app, take a picture of a black background (lay the phone face-down) take a photo, and send that to the Photowall app in Windows via app-tethering.

2. update the windows photowall app to capture the bitmap to the clipboard 

3. paste that into windows paint 

4. edit the image somehow to remove most of the black area (or make it white) and leave a 2 to 4 pixel black edge around the whole dimension. 

5. save that to png

6. open in delphi ide, device manager and update the custom view with this new image. I'll call it Galaxy S10+

7. finish

 

Share this post


Link to post

The above idea did not work out as planned. 

 

I did not take into account the camera's photo dimensions. The capture-to-clipboard image was 567x1008 pixels. 

 

I believe that I have to capture the form's image instead.  That may work.  I will try that next, as soon as I return. 

Share this post


Link to post

I think its because I believe the the 412x869 dimensions are not true. 

 

When I send a photo to my windows machine, the dimensions are very large.  I am trying to determine the exact x,y pixels of my device, and its been truely deceptive and annoying.

 

At this moment:

 

* I am trying to figure out how to take a screenshot of my current display--I figure out that part: put a tlayout componet on the form and use layout1.MakeScreenshot;**

* I am also trying to re-work the Photowall mobile app to send the bitmap from .MakeScreenshot via stream. But the snippet I updated/edited is not working. The image is not showing in the PhotoWallVCL app on my laptop computer (with the uppdated/edited code in the mobile app).  If I REM out the code, it works. So I am in the middle of debugging that portion of code now. 

 

** but I'm not sure how to use tlayout. I've never used it. I assume that whatever components (buttons/edits/etc) I add to it, that when I call .MakeScreenshot it will capture the whole current viewport of the device, whatever is displaying on it.  But the problem is, none of the controls are sticking to the tlayout control. That is, none of the controls are bound to it, that if I click and drag the layout1 control, all the controls (buttons/edits/etc) should move with it--but they don't. 

 

 

Edited by JohnLM

Share this post


Link to post

Okay, I finally figured out the code and where to insert it so that it sends a screenshot of my device (my phone) to my laptop.  Now to update the Photowall mobile app to include a TLayout and copy all its controls over to it and then do a screenshot and see how that looks through the PhotoWallVLC app on my laptop. 

Share this post


Link to post

update. . . regarding the pixel dimensions for the screen size. 

 

It appears that the 567x1008 pixels is correct for that Galaxy S10+ Android phone. 

And, it is 390x520 on the Galaxy A10 Android phone. 

 

Now I can move forward in this project. Thanks for all the help/tips/etc., thus far. 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×