Android phone tablet is not mistaken, use fragment to implement compatible mobile phone and tablet program

Source: Internet
Author: User
Tags requires versions

Remember I was involved in the development of a Huawei project that requires programs to support several terminal devices, including the Android phone and the Android Pad. Then, in order to save people, the company's rogue to let the Android phone and Android pad are developed by our team. At that time, the project team decided to make two versions of the app, a mobile phone version, a pad version. Because at that time mobile version of the main function has done almost, so the pad is basically the mobile phone version of the code completely copied over, and then according to the characteristics of the plate to modify a little bit better.

However, we have been very bitter since then. Each time you want to add a new feature, the same code should be written two times. Every time you want to fix any bugs, you have to change them in your mobile and pad code. This is nothing, and every time it comes to publication, it's even more outrageous. Huawei has asked for two versions each time, a version of Huawei's intranet environment, a client-site version, and now has a mobile phone and pad, which requires four versions at a time. If there is a problem with the self-test after the release, you can go straight through the night. This is especially bitter for our x total (because he plays DotA better, I like to call him X God). He maintains a separate module in our project team, and he is responsible for each version, and we can run overtime, that is, he can't run. This is also a tribute to our X-god professionalism, if he can see it.

I've been through so hard times and I've been thinking, can I make apps that are compatible with mobile phones and tablets? Of course, the answer is yes, but I am a lazy person, has not been the spirit to delve into this problem. Until a friend of mine studying in the United States, Gong asked me to help her to solve her graduate tutor assignments (I know your postgraduate tutor can not understand the Chinese ^-^), just involved in this piece, also take this opportunity to study, now take out to share with you.

Let's take a look at the Android phone's setup interface and click Sound to jump to the sound settings screen, as shown in the following two images:


Then take a look at the Android pad Setup interface, the main settings page and the Sound Settings page are displayed in one interface, as shown in the following image:

Related Article

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.