Custom theme inherits different values in different SDK Environments

Source: Internet
Author: User

Be careful with yourself first.:
Maybe many of the students who compiled the ghost APK in the later version may have the same confusion as me, that is, how can users of earlier versions experience the higher version, for example, the holo style that can only be used in 3.0.

As a result, many people have turned to many open-source sdks, such as holo everywhere and sherlockactionbar. However, these libraries are huge and are usually added, in earlier versions, the running speed of applications is also seriously affected. So why don't we think about whether our starting point is also the user's needs? My girlfriend gave me a negative answer to this question. She uses Android 2.1. She said she is used to the dialog box 2.1. She thinks the android dialog box is like this, 4.0 is not nice at all, so it may be for many 2.1 ~ For 2.3 of users, holo is not essential for their needs and pursuits. As long as they are familiar with the control, there is no need to force them to experience 4.0 of the style in their own software, otherwise it may be extremely difficult. In addition, it is really better to spend time improving other performance to customize the native alertdialog.

So I think the correct approach should be: not to pursue completely consistent performance of your applications in all sdks, but to use the style they are familiar with from the user's perspective. This leads to the method in the question:

The technology is quite simple.:
1. Change the SDK to 3.0 or later.
2. Create a styles. xml in the values-v11 and values of RES respectively
3. Add <style name = "apptheme" parent = "Android: theme. holo. Light">
4. Add <style name = "apptheme" parent = "@ Android: style/theme. Light">
5. Add Android: theme = "@ style/theme. greendroid. Light">
A theme inherits different values in different SDK environments.

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.