Android Question How use panel inf GetWindowInfo

devmobile

Active Member
Licensed User
I use GetWindowInfo in Googlemapextra library in my project
I can create label and return it to windowinfo
But how do i can return panel that load layout into?

When i return panel,it get below error
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.Bitmap.setHasAlpha(boolean)' on a null object reference

B4X:
Sub EventName_GetInfoWindow(Marker1 As Marker) As View
   dim p as panel
   p.initialize("")
   return p
End Sub
 

devmobile

Active Member
Licensed User
Can you post the full error message?
Yes i post it here
I use here code
B4X:
Sub mm_GetInfoWindow(Marker1 As Marker) As View
   
    Dim p As Panel
    p.Initialize("")
    p.Color    =    Colors.Red
    Return p
       
End Sub
And it get below error
ava.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.Bitmap.setHasAlpha(boolean)' on a null object reference
at android.graphics.Bitmap.createBitmap(Bitmap.java:835)
at android.graphics.Bitmap.createBitmap(Bitmap.java:808)
at android.graphics.Bitmap.createBitmap(Bitmap.java:775)
at com.google.maps.api.android.lib6.impl.bw.a:)com.google.android.gms.DynamiteModulesB@11509438:86)
at com.google.maps.api.android.lib6.gmm6.api.e.a:)com.google.android.gms.DynamiteModulesB@11509438:37)
at com.google.maps.api.android.lib6.gmm6.api.g.c:)com.google.android.gms.DynamiteModulesB@11509438:153)
at com.google.maps.api.android.lib6.impl.cz.g:)com.google.android.gms.DynamiteModulesB@11509438:239)
at com.google.maps.api.android.lib6.impl.db.b:)com.google.android.gms.DynamiteModulesB@11509438:27)
at com.google.maps.api.android.lib6.gmm6.api.e.a:)com.google.android.gms.DynamiteModulesB@11509438:64)
at com.google.maps.api.android.lib6.gmm6.vector.m.a:)com.google.android.gms.DynamiteModulesB@11509438:45)
at com.google.maps.api.android.lib6.gmm6.vector.af.c:)com.google.android.gms.DynamiteModulesB@11509438:194)
at com.google.maps.api.android.lib6.gmm6.vector.cr.onSingleTapConfirmed:)com.google.android.gms.DynamiteModulesB@11509438:28)
at com.google.maps.api.android.lib6.impl.gesture.h.onSingleTapConfirmed:)com.google.android.gms.DynamiteModulesB@11509438:125)
at com.google.maps.api.android.lib6.impl.gesture.d.handleMessage:)com.google.android.gms.DynamiteModulesB@11509438:26)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
 
Upvote 0
Top