[[ blog 이사 과정에서 정확한 posting날짜가 분실됨. 년도와 분기 정도는 맞지 않을까? ]]

* We can refer *.mk in /build/target/product/ to know which Apps. are installed in which product!.

* External WebKit build.
Whole STL is not 100% compatible with ARM, Android uses some STL subset functions of HP - swap, min, max. (see external/webkit/WebKit/android/stl/algorithm). The problem is, if there is standard STL, this conflicts with above function (std::swap). So, if we should use standard STL, we need to modify something about this...

[[ blog 이사 과정에서 정확한 posting날짜가 분실됨. 년도와 분기 정도는 맞지 않을까? ]]

Java has useful visibility; package private.
Let's see the following case.

We want implement quite big module A. And this has some sub features. So, we need to make sub classes a, b, c.

In this case, external module should be able to see only interfaces of A; Not those of a, b and c. It is very difficult to make this in C++. But, in java, we can use package private. Here is design example.

Put all these modules in the same package.
Make interfaces of A as public.
Make all interfaces of a, b and c be package private.

Developer can easily know that using a, b and c directly is not allowed intuitively.

How about in C++?
In C++, there is no proper way to do this. Making A be 'friend' of a, b and c, breaks encapsulation. Making interfaces of a, b and c be public, may lead to misuse of those; we want only interfaces of A be visible to external.

I has been desired this kind of visibility - ex. namespace private - when using C++. :-)

[[ blog 이사 과정에서 정확한 posting날짜가 분실됨. 년도와 분기 정도는 맞지 않을까? ]]
 

* Here is test result about calling onXXX functions.

Starting -> Showing

+ onWindowAttributeChanged x N
+ onContentChanged
+ onCreate
+ onStart
+ onPostCreate
+ onTitleChanged
+ onResume
+ onPostResume
+ onAttachToWindow
+ onWindowFocusChanged

Portrait Landscape (without handling configuration changes directly)

+ onSaveInstanceState
+ onPause
+ onStop
+ onRetainNonConfigurationInstance
+ onDestroy
+ onWindowAttributeChanged x N
+ onContentChanged
+ onCreate
+ onStart
+ onRestoreInstanceState <---
+ onPostCreate
+ onTitleChanged
+ onResume
+ onPostResume
+ onAttachToWindow
+ onWindowFocusChanged

Incomming Call

+ onSaveInstanceState
+ onPause
+ onWindowFocusChanged
+ onStop

Call ended

+ onRestart
+ onStart
+ onResume
+ onPostResume
+ onWindowFocusChanged

* To handle configuration change directly.
- Add android:configChanges="keyboardHidden|orientation" at the Activity in AndroidManifest.xml
- Override onConfigurationChanged(Configuration newConfig) ..

* Using onSaveInstanceSteate/onRestoreInstanceState
onSaveInstanceSteate/onRestoreInstanceState is called very often. So, we would better to avoid writing additional code except for saving/restoring state. Especially, allocating memory in "onRestoreInstanceState" should be avoided, even if this is quite good place to initialize newly restarted or resumed activity. Putting these code in it, may raise "OutOfMemory Exception" due to GC issue. (We cannot control GC. But, this function is called very frequently and memory is allocated here. So, at some moment, if memory is not collected for a while, memory shortage can be occurred.)

* Using ViewTreeObserver.
We can know the moment when something is changed on screen view by using listeners of ViewTreeObserver - ex. orientation is changed, input method is shown and so on. Especially, OnGlobalLayoutListener is very useful. How about try using this?

+ Recent posts