Android and androidsdk
Black screen
By default, a black screen period occurs when the program starts. The reason is that the first activity loads some data, such as initializing the list data.
Removal steps
1./res/values/styles. xml in Theme, add an android: windowBackgrounds attribute and set the desired image
2. Set Theme to the first started Activity in AndroidManifest. xml.
3. Add/res/drawable-port/loading.png. (If the screen is landscape-mounted, place it in/res/drawable-land/loading.png)
4. Complete
Code
<style name="MyTheme.NoTitleBar.CustomBackground" parent="@android:Theme.Black"> <item name="android:windowBackground">@drawable/loading</item> <item name="android:windowNoTitle">true</item> <item name="android:windowFullscreen">true</item> <item name="android:windowContentOverlay">@null</item> </style>
<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true"> <activity android:label="@string/app_name" android:theme="@style/MyTheme.NoTitleBar.CustomBackground" android:configchanges="keyboardHidden|navigation|orientation" android:name="com.test.ui.MainActivity" android:screenorientation="portrait"> <intent-filter> <action android:name="android.intent.action.MAIN"> <category android:name="android.intent.category.LAUNCHER"> </category> </action> </intent-filter> </activity> ... ...</application>
I am the dividing line of tiantiao
Reference: http://blog.csdn.net/kepoon/article/details/6759724
Android: id
Android: id = "@ + id/layout01": The layout01 variable is defined and is automatically written into R. java, in R. the internal class id is generated in the java file, which can be called in the main program. id. layout01 to obtain the layout variable entity.
Android: orientation = "vertical": the vertical layout. Horizontal for horizontal layout
Android: id
Android: id = "@ + id/layout01": The layout01 variable is defined and is automatically written into R. java, in R. the internal class id is generated in the java file, which can be called in the main program. id. layout01 to obtain the layout variable entity.
Android: orientation = "vertical": the vertical layout. Horizontal for horizontal layout