I'm trying to modify the panel1 potition in this code.
In the line " panel1.Top = (AltoPantalla * Alto_Panel1) / 100" I receive this error....
If I delete o comment this line, the program run, but my objet is not positioned.
Sorry for my english
SPANISH
Según los códigos de arriba, cuando trato de cambiar la línea top de panel1, me lanza el error que está arriba.
En el diseñador tengo el objeto creado y tiene el mismo nombre (no es problema de mayusculas, etc..) y está inicializado, etc....
No entiendo este error a que se debe
Gracias
B4X:
Sub Globals
.
.
.
.
Private panel1 As Panel
Private caja As ImageView
.
.
.
.
End sub
B4X:
Sub Activity_Create(FirstTime As Boolean)
.
.
.
panel1.Initialize("EventoPanel")
ConfiguraObjetos
.
.
.
End Sub
B4X:
Sub ConfiguraObjetos
AltoPantalla = Activity.Height
AnchoPantalla = Activity.Width
img_fondo.Height = AltoPantalla
img_fondo.Width = AnchoPantalla
img_fondo.Top = Alto_img_fondo
img_cabecera.Top = Alto_img_cabecera
img_cabecera.Width = AnchoPantalla
panel1.Top = (AltoPantalla * Alto_Panel1) / 100
panel1.Left = (AnchoPantalla - panel1.Width) / 2
.
.
.
End Sub
In the line " panel1.Top = (AltoPantalla * Alto_Panel1) / 100" I receive this error....
Installing file.
---- In onAdFailedToLoad ----Server Message: no results. Try again in 10 seconds
~i:** Activity (main) Pause, UserClosed = false **
WakeLock already held.
PackageAdded: package:es.elcuidadorepoc.app
~i:** Activity (main) Create, isFirst = true **
(Main, 69) FullScreen or IncludeTitle properties in layout file do not match the activity attributes settings. (warning #1004)
java.lang.NullPointerException: Attempt to write to field 'int anywheresoftware.b4a.BALayout$LayoutParams.top' on a null object reference
at anywheresoftware.b4a.objects.ViewWrapper.setTop(ViewWrapper.java:176)
at es.elcuidadorepoc.app.main._configuraobjetos(main.java:588)
at es.elcuidadorepoc.app.main._activity_create(main.java:402)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:187)
at es.elcuidadorepoc.app.main.afterFirstLayout(main.java:100)
at es.elcuidadorepoc.app.main.access$100(main.java:17)
at es.elcuidadorepoc.app.main$WaitForLayout.run(main.java:78)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5951)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
If I delete o comment this line, the program run, but my objet is not positioned.
Sorry for my english
SPANISH
Según los códigos de arriba, cuando trato de cambiar la línea top de panel1, me lanza el error que está arriba.
En el diseñador tengo el objeto creado y tiene el mismo nombre (no es problema de mayusculas, etc..) y está inicializado, etc....
No entiendo este error a que se debe
Gracias