Lazarus

Programming => Operating Systems => Android => Topic started by: neuro on June 17, 2021, 02:40:45 am

Title: jDrawingView bug: when jDrawingView1 becomes visible, the “status bar” hides
Post by: neuro on June 17, 2021, 02:40:45 am
The description of jDrawingView bug.
Create new Android GUI project and add jDrawingView and jButton with the following program code.

Code: Pascal  [Select][+][-]
  1. procedure TAndroidModule1.jButton1Click(Sender: TObject);
  2. begin
  3.  jDrawingView1.Visible := not jDrawingView1.Visible;
  4. end;

Then click jButton1 multiple times – with every click DrawingView1 switches between being visible and invisible.
When jDrawingView1 becomes visible, the “status bar” hides.
When jDrawingView1 becomes invisible, the “status bar” becomes visible.
This is a bug of jDrawingView. The visibility of jDrawingView should not change visibility of “status bar”.
How to fix this bug of jDrawingView?
Title: Re: jDrawingView bug: when jDrawingView1 becomes invisible, the “status bar” hides
Post by: jmpessoa on June 17, 2021, 03:28:16 am


Can you put here a simple project? So,  I can try test, find and fix this bug...
Title: Re: jDrawingView bug: when jDrawingView1 becomes visible, the “status bar” hides
Post by: neuro on June 17, 2021, 03:41:04 am
You can create such new project just in one minute. Just create new empty Android GUI project and add jDrawingView and jButton.
Bug testing project is attached.
Title: Re: jDrawingView bug: when jDrawingView1 becomes visible, the “status bar” hides
Post by: jmpessoa on June 17, 2021, 03:52:09 am

Quote
You can create such new project just in one minute.

Yes!

But, now I can see how you configured this parameters...

Quote
    PosRelativeToParent = [rpTop]
    LayoutParamWidth = lpMatchParent
    LayoutParamHeight = lpHalfOfParent
Title: Re: jDrawingView bug: when jDrawingView1 becomes visible, the “status bar” hides
Post by: jmpessoa on June 17, 2021, 05:42:32 am
A simple solution:

Go to LAMW folder   "..............\android_wizard\smartdesigner\java" ,   open  the

file "jDrawingView.java" and comment the line 102 (?):

        //this.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN);


[I will improve the code, so this can be optional......]


Thank you!
Title: Re: jDrawingView bug: when jDrawingView1 becomes visible, the “status bar” hides
Post by: rsu333 on June 17, 2021, 02:00:56 pm
Thanks JMPessoa ;Always great Job and helpful nature .
TinyPortal © 2005-2018