Android/Java - Custom View on GoogleMaps FragmentActivity isnt shown

前端 未结 1 772
旧巷少年郎
旧巷少年郎 2021-01-24 23:34

Im trying to draw some Stuff for testing in an Custom View, which is added to the GoogleMaps FragmentActivity. But somehow, when i run it in the emulator, it seems like my Custo

相关标签:
1条回答
  • 2021-01-25 00:02

    You need to measure the desired size of your view. You are just passing what you are receiving, which probably is 0.

    Another option is to set a LayoutParams with MATCH_PARENT, but I'm not sure if this will work.

    What you are trying to do is advanced, you should read some tutorials before trying it.

    Here you have more info: https://developer.android.com/training/custom-views/custom-drawing.html

    0 讨论(0)
提交回复
热议问题