Think about how to use different theme under different APIs

Source: Internet
Author: User

Good post:

Android... The page turning Effect of book is not distorted .. Not explained ..
Http://www.eoeandroid.com/thread-245287-1-1.html

Items that can be dragged by the gridview are similar to those that can be dragged by the desktop icon.
Http://www.eoeandroid.com/thread-243853-1-1.html

[EOE special journal] OpenGL ES learning and Project Analysis in 27th
Http://www.eoeandroid.com/thread-240293-1-1.html

------------ Post body ----------------------

First, let's be careful:

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 after they are added, these libraries will also be severely affected in earlier versions.

The speed at which the application runs. 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 this question.
In the dialog box 2.1, she thought the android dialog box was originally like this, and 4.0 was not very 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. Just use the controls they are familiar.

There is no need to force them to experience the 4.0 style in their own software, otherwise there may be a lot of things. 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:

We do not want to pursue the full consistency of our applications in all sdks, but 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.