Android and androidsdk

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.