But, my application target was 2.2 and it doesn't allow me to add "orientation" in "android:configChanges". Later, I changed the application to target 4.0, only then it works. The app won't restart anymore when the orientation changes. And overwrite the following method in the Activity.< android:name=".MyActivity"
android:label="@string/title_activity_myactivity"
android:configChanges="orientation|screenSize" android:screenOrientation="unspecified" >
//must override this, if not, screen orientation will make the app force closeSome other things i learnt from my previous project:
@Override
public void onConfigurationChanged(Configuration newConfig) {
// TODO Auto-generated method stub
super.onConfigurationChanged(newConfig);
}
1. To remove the title bar from the app (AndroidManifest.xml)
2. the great splash screen example: Android Splashscreen done rightandroid:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar" >
Normally, webview loading is a little slow. And if you create the splashscreen as a separate activity, it won't solve the problem of webview loading slow. The above example use "SplashDialog", which will load webview at the same time as the splashscreen.
*Note: the above orientation handling doesn't seem to work with jquery mobile
0 comments:
Post a Comment
Please feel free to use any font to comment :)