Category: StackOverflow

My application shows nothing except a black screen [on hold]

  

By user3665067 Hy, my first Android application generates a number based on a key provided by the user, so it has 2 editboxes and a little code. It is working on all Android 4.x devices I’ve tested, except the person’s tablet I made the aplication for. It doesn show anything, just a black screen. It’s an Android 4.2, Cortex A7, 1,2GHz QUAD Core tablet.

I’ve put a ShowMessage dialog in the Main Windows’s “OnPaint” event and it shows it on runtime, I click “Ok”, but the screen stays black and after a minute or so if I touch “Back” I get “Application is not responding”. On my Android phone, if I run my application, it keeps showing the ShowMessage dialog as the main windows is redrawn, but it’s working fine.

I don’t know how to find the problem if I don’t have an error.

I am working on Delphi XE5 Update 2. Thanks, The code is below:

interface

uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls,
IdGlobal, IdHash, IdHashMessageDigest, FMX.Edit;

type
TMainWindow = class(TForm)
Label1Key: TLabel;
Key: TEdit;
numar: TEdit;
LabelNumber: TLabel;
PanelCentrare: TPanel;
…read more

Via: StackOverflow

Read More

My aplication shows nothing except a black screen

  

By user3665067 Hy, my first Adrod aplication generates number based on a key provided by the user, so it has 2 Editboxes and a litle code. It is working on all android 4.x devices I’ve tested, except the person’s tablet I made the aplication for. It doesn show anything, just a black screen. It’s an Android 4.2, Cortex A7, 1,2GHz QUAD Core tablet.

I’ve put a ShowMessage dialog in the Main Windows’s “OnPaint” event and it shows it on runtime, I click “Ok”, screen stays black and after a minute or so if I toch “Back” I get “Aplication is not responding”. On my Android phone, if I run my aplication, it keps showing the ShowMessage dialog as the main windows is redrawn, but it’s working fine.

I don’t know how to find the problem if I don’t have an error.

I am working on Delphi XE5 Update 2. Thanks, The code is below:

interface

uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls,
IdGlobal, IdHash, IdHashMessageDigest, FMX.Edit;

type
TMainWindow = class(TForm)
Label1Key: TLabel;
Key: TEdit;
numar: TEdit;
LabelNumber: TLabel;
PanelCentrare: TPanel;
procedure …read more

Via: StackOverflow

Read More

Form border color and thickness on Firemonkey

  

By eelias XE5, I am using the MetropolisUIBlue style in this case (not the app template just the style) and I would like to get the same effect that office 2013, where you have a very thin application form border, the title bar is there with the standard icons (close, minimize) with everything following the same form background color.

The result in office 2013 is very nice presentation (for me), that looks visually
clean and light. and you still have the border to resize the form. This border is just
a simple thin black line around the form and the windows theme selected does not interfere.

Right now by default Firemonkey has a dark huge border frame that follows windows theme. (I am in windows 8)

How can I have the color following the same form background color?
How can I reduce to minimum (if possible just a thin line) the form border?
How can I block windows to apply its themes on the form border? …read more

Via: StackOverflow

Read More

Firemonkey SharePoint Online web service or REST

  

By user3662895 I try to connect to SharePoint Online with Firemonkey XE5.
I have no problem to connect to SharePoint on premise.

Can someone post a sample to connect to SharePoint online with Firemonkey ?

Theses links help to understand the process:
http://allthatjs.com/2012/03/28/remote-authentication-in-sharepoint-online
http://woodoweb.com/remote-authentication-to-sharepoint-online-using-javascript

Regards. …read more

Via: StackOverflow

Read More

Firemonkey – How to focus a View, created in Java code?

  

By naXa I have a hard time using 3rd party java library in Delphi. Activity, that I’m launching, is declared in the lib like:

public class LibActivity extends Activity implements SensorEventListener;

View is a picture created programmatically in a local variable (I have no access to it via interface), and placed on top of application. And it is not responding to a user input (like it is frozen).
I think the problem is that Firemonkey doesn’t focus on the newly created View. How to move focus to the View? …read more

Via: StackOverflow

Read More

How to create TDBGridLinkColumn in TStringGrid with Firemonkey

  

By DeveloperPop use a TBindingsList component, and relate TBindSourceDB alongside a TStringGrid and all good
But now I need to create a TDBGridLinkColumn by code (instead of a TStringColumn because it has the fieldname property that I need for my database visualize).

procedure TPrueba.Button1Click(Sender: TObject);
var
colDB :TDBGridLinkColumn;
collect:TCollection;
begin
colDB:=TDBGridLinkColumn.Create(collect);
colDB.Header:=’Code’;
colDB.FieldName:=’Code’;
colDB.Width:=100;
StringGrid1.AddObject(colDB);
end;

Thanks for your time, try to find some information but have not been successful for creating column …read more

Via: StackOverflow

Read More

Scaling the firemonkey printer canvas fontsize to represent windows font size

  

By r_j Problem :
When I use the same font settings for the default FMX: Printer that i used for the VCL printer,
the printed text comes out much smaller, for all different sizes.

I am making a Windows 32bit application.

How do i know the scaling factor in which i need to scale the font? So i can represent the normal font size. Or how does one calculate this scale?

Also, on a different note the pen size seems to be smaller.

I have tried changing the DPI to 300/300 (it was 600/600). …read more

Via: StackOverflow

Read More

How to deploy with large numbers of files in C++ Builder XE6?

  

By Anthony Burg I’m new to cross-platform development, and am deploying a project to both Windows and Mac using C++ Builder XE6 with Firemonkey (FMX).

I have a large number of files in a large number of folders that should be deployed with the project. Looking at the Embarcadero page on the Deployment Manager here

and using the Manager a bit, it seems I have to add files individually (or, at the best, in a given folder) at a time. This is really inconvenient, as I have large numbers of folders within several folders to be deployed. It would be much easier to simply select a folder with a recursive include.

Is there a simpler way to setup files for deployment with C++ Builder XE6? …read more

Via: StackOverflow

Read More

ALOOPER_POLL_ERROR What this mean?

  

By Necrodome I’m doing something with Delphi Xe6 for android, and using the background service, of blong blog. When application goes back(pressing home button) and i click on his icon again, Delphi show this message:

“ALOOPER_POLL_ERROR”.

I really don’t have ideia what that mean or how fix that!

Can someone helpe me? I’m sorry if i can be clear with my question. …read more

Via: StackOverflow

Read More

How can I have a TFrame Styled at Design Time in Firemonkey

  

By eelias I am using Delphi XE5 up 2.

Based with seems to be the correct rules, I am writing an application that has only one form and lots of frames (TFrame) in firemonkey.

I have a StyleBook on my mainform, and it works well. When the Frame is inserted during runtime it works fine.

However I need to draw my frame using the style that I need. It needs to be at design time, since there are adjustments to be made, and I need to review many frames eventually.

Suggestions that did not work:

Draw the contents on a form, when finished cut and paste on a frame: I expect better that that!
Change the global style by resource: I have added as a resource with the platform name the style I wanted but I did not see any effect. (Project->resouces and images)
I have tried to use a form and then insert it like a frame on my mainform, but I could not make it work.
So, is there a way to have my frame styled during design time?

or there is an alternative? (I need to draw in something that can be styled and then inserted at runtime when needed) …read more

Via: StackOverflow

Read More

Loading style from resource on Mac OS X

  

By Anthony Burg Using Firemonkey (FMX) in C++ Builder XE6, I am attempting to load a style in my project’s cpp file.

Just before

Application->Initialize ()

I have

Fmx::Types::TFmxObject *style;
style = TStyleStreaming::LoadFromResource((unsigned int)HInstance, L”MacJet”, RT_RCDATA);
TStyleManager::SetStyle (style);

where the style named MacJet has been loaded as a resource into the project at design time.

When I activate Win32 as the target platform, this runs fine, and the style shows properly in the application.

When I activate Mac OS X, however, I get an error on the style = … line, stating

“Exception class SIGSEGV (11).”

When I remove the three lines above and run on Mac, the program loads up.

I’m new to cross-platform development, any ideas what is causing this error? …read more

Via: StackOverflow

Read More

E2501: Unable to open import file ‘filename’ (C++) error in XE5

  

By user3460812 I am working on a firemonkey application.
I am including the file NSPrintInfo.h.
I am doing
#include ;
the compiler can see the header file.

However, NSPrintInfo.h has a few #import statements like #import which gives error E2501: Unable to open import file ‘filename’ (C++).

The file exists, but why does the comppiler can’t import it? #include doesn’t give error; only #import does.
This is true for evert #import in the hearder files.
Why is it so? Is there a workaround?
Thanks,
Priya …read more

Via: StackOverflow

Read More

Simple Android application has stopped unexpectedly

  

By user3651679 I am new to andriod development – using Delphi XE6 trial version – and now I am stuck with a strange problem.

I created a small screen using a firemonkey blank mobile application. I added a TEdit and a TButton. On button click event the TEdit.Text property is set.

The projects compiles ok but when it installs, the application on to the virtual device (Android 4.2.2, API Level 17) it gives the following error

The application (com.embarcadero.) has stopped unexpectedly. please try again

What might be the issue here is there any settings I have to do in the Delphi XE6 IDE for running andriod apps. …read more

Via: StackOverflow

Read More