Hi, everyone
I'm new to android, just began to learn it a few days ago, but when I tried to learn from the built-in sample source "Snake", I noticed it's just a custom view extending "android.view.View", and it doesn't override the "onMeasure(int widthMeasureSpec, int heightMeasureSpec)", the method from its parent class View, which is supposed to be a must according to android's dev guide, I quote here:
"You will almost certainly want to override onMeasure() and are also likely to need to override onDraw() if you want the component to show something. While both have default behavior, the default onDraw() will do nothing, and the default onMeasure() will always set a size of 100x100
I'm new to android, just began to learn it a few days ago, but when I tried to learn from the built-in sample source "Snake", I noticed it's just a custom view extending "android.view.View", and it doesn't override the "onMeasure(int widthMeasureSpec, int heightMeasureSpec)", the method from its parent class View, which is supposed to be a must according to android's dev guide, I quote here:
"You will almost certainly want to override onMeasure() and are also likely to need to override onDraw() if you want the component to show something. While both have default behavior, the default onDraw() will do nothing, and the default onMeasure() will always set a size of 100x100