We're able to get a Uri from Camera, Gallery, Video Camera Intent. We will obtain a Uri from the intent then you can use it to get a temp File.
Customize View by yourself, you must inherit View class. For the View class, it must run this three methods in flow. Brief describe as below
- onMeasure(): Set the layout size.
- onLayout(): Set the layout position.
- onDraw(): Draw the layout content.
Before the flow, I will explain a little the constructor of View or ViewGroup. Normally, there are three constructor we need to override.
This method LayoutInflater.inflate
is used all the time and useful if you are developing the related of views or animations.
I think a junior Android programmer isn't often using it but I believe definitely that a senior engineer use this method every day.
Let's go to main topic. When we create a activity or a fragment or a view, we may add some sub-view into. But sometime succeed, sometimes failed.