我想制作应用程序,首先显示主题的用户列表,并在用户选择某些内容后显示大文本。那么存储将在列表中使用的信息的最佳方式是什么,我的意思是标题,描述和照片(可绘制),以及如何在项目中存储大文本?
是否更好地存储在res/values/strings
内,但文本可能非常大或者制作xml文件,但是如果选择存储在xml文件中如何存储那里对可绘制资源的引用?
谢谢你的想法;)
答案 0 :(得分:4)
是的,您可以使用 html标记 CDATA在res/values/strings
内存储非常大的文字。
实施例
<string name="terms_text">
<![CDATA[1. INTRODUCTION: Welcome to our application (the “App“). This App is published by
By downloading or otherwise accessing the App you agree to be bound by the following terms and conditions (“Terms“) and our privacy policy and our cookies policy. If you have any queries about the App or these Terms, you can contact Us by any of the means set out in paragraph 11 of these Terms. If you do not agree with these Terms, you should stop using the App immediately.
2. GENERAL RULES RELATING TO CONDUCT: The App is made available for your own, personal use. The App must not be used for any commercial purpose whatsoever or for any illegal or unauthorized purpose. When you use the App you must comply with all applicable USA laws and with any applicable international laws, including the local laws in your country of residence (together referred to as “Applicable Laws”).
You agree that when using the App you will comply with all Applicable Laws and these Terms. In particular, but without limitation, you agree not to:
(a) Use the App in any unlawful manner or in a manner which promotes or encourages illegal activity including (without limitation) copyright infringement; or
(b) Attempt to gain unauthorized access to the App or any networks, servers or computer systems connected to the App; or
(c) Modify, adapt, translate or reverse engineer any part of the App or re-format or frame any portion of the pages comprising the App, save to the extent expressly permitted by these Terms or by law.
You agree to indemnify Norton Avenue and its group companies in full and on demand from and against any loss, damage, costs or expenses which they suffer or incur directly or indirectly as a result of your use of the App otherwise than in accordance with these Terms or Applicable Laws.
3. CONTENT: The copyright in all material contained on, in, or available through the App including all information, data, text, music, sound, photographs, graphics and video messages, the selection and arrangement thereof, and all source code, software compilations and other material (“Material“) is owned by or licensed to Norton Avenue or its group companies. All rights are reserved. You can view, print ,download or share in social networks extracts of the Material for your own personal use but you cannot otherwise copy, edit, vary, reproduce, publish, display, distribute, store, transmit, commercially exploit, disseminate in any form whatsoever or use the Material without Norton Avenue’s express permission.
The trademarks, service marks, images and logos (“Trade Marks“) contained on or in the App are owned by Norton Avenue or its group companies or third party partners of Norton Avenue. You cannot use, copy, edit, vary, reproduce, publish, display, distribute, store, transmit, commercially exploit or disseminate the Trade Marks without the prior written consent of Norton Avenue or the relevant group company or the relevant third party partner of Norton Avenue.
4. LINK TO THIRD PARTIES: The App may contain links to websites operated by third parties (“Third Party Websites“). Norton Avenue may monetize some of these links through the use of third party affiliate programmers’. Notwithstanding such affiliate programmers, Norton Avenue does not have any influence or control over any such Third Party Websites and, unless otherwise stated, is not responsible for and does not endorse any Third Party Websites or their availability or contents.
5. NORTON AVENUE PRIVACY POLICY: We take your privacy very seriously. Norton Avenue will only use your personal information in accordance with the terms of our privacy policy and cookies policy. By using the App you acknowledge and agree that you have read and accept the terms of our privacy policy and cookies policy and these Terms.
6. DISCLAIMER / LIABILITY: USE OF THE APP IS AT YOUR OWN RISK. THE APP IS PROVIDED ON AN “AS IS” BASIS. TO THE MAXIMUM EXTENT PERMITTED BY LAW: (A) NORTON AVENUE DISCLAIMS ALL LIABILITY WHATSOEVER, WHETHER ARISING IN CONTRACT, TORT (INCLUDING NEGLIGENCE) OR OTHERWISE IN RELATION TO THE APP; AND (B) ALL IMPLIED WARRANTIES, TERMS AND CONDITIONS RELATING TO THE APP (WHETHER IMPLIED BY STATUE, COMMON LAW OR OTHERWISE), INCLUDING (WITHOUT LIMITATION) ANY WARRANTY, TERM OR CONDITION AS TO ACCURACY, COMPLETENESS, SATISFACTORY QUALITY, PERFORMANCE, FITNESS FOR PURPOSE OR ANY SPECIAL PURPOSE, AVAILABILITY, NON INFRINGEMENT, INFORMATION ACCURACY, INTEROPERABILITY, QUIET ENJOYMENT AND TITLE ARE, AS BETWEEN FUTURE AND YOU, HEREBY EXCLUDED. IN PARTICULAR, BUT WITHOUT PREJUDICE TO THE FOREGOING, WE ACCEPT NO RESPONSIBILITY FOR ANY TECHNICAL FAILURE OF THE INTERNET AND/OR THE APP; OR ANY DAMAGE OR INJURY TO USERS OR THEIR EQUIPMENT AS A RESULT OF OR RELATING TO THEIR USE OF THE APP. YOUR STATUTORY RIGHTS ARE NOT AFFECTED.
Norton Avenue will not be liable, in contract, tort (including, without limitation, negligence), under statute or otherwise, as a result of or in connection with the App, for any: (i) economic loss (including, without limitation, loss of revenues, profits, contracts, business or anticipated savings); or (ii) loss of goodwill or reputation; or (iii) special or indirect or consequential loss.
IF NORTON AVENUE IS LIABLE TO YOU DIRECTLY OR INDIRECTLY IN RELATION TO THE APP, THAT LIABILITY (HOWSOEVER ARISING) SHALL BE LIMITED TO: (A) FIFTY U.S DOLLARS ($50.00); OR (B) THE SUMS PAID BY YOU UPON PURCHASING THE APP, OR ANY IN-APP SPEND, INCLUDING SUBSCRIPTIONS, WHICHEVER IS GREATER.
Nothing in these Terms shall be construed as excluding or limiting the liability of Future or its group companies for death or personal injury caused by its negligence or for any other liability which cannot be excluded by U.S law.
7. SERVICE SUSPENSION: Norton Avenue reserves the right to suspend or cease providing any services relating to the apps published by it, with or without notice, and shall have no liability or responsibility to you in any manner whatsoever if it chooses to do so.
8. ADVERTISERS IN THE APP: We accept no responsibility for adverts contained within the App. If you agree to purchase goods and/or services from any third party who advertises in the App, you do so at your own risk. The advertiser, not Norton Avenue, is responsible for such goods and/or services and if you have any queries or complaints in relation to them, your only recourse is against the advertiser.
9. COMPETITIONS: If you take part in any competition which is run in or through the App (“Competition“), you agree to be bound by the rules of that competition and any other rules specified by Norton Avenue from time to time (“Competition Rules“) and by the decisions of Norton Avenue, which are final in all matters relating to the Competition. Norton Avenue reserves the right to disqualify any entrant and/or winner in its absolute discretion without notice in accordance with the Competition Rules.
10. IN-APP VOUCHER CODES: Any in-app voucher codes issued by Norton Avenue may only be used in accordance with our Terms and Conditions for in-app voucher codes.
11. GENERAL: These Terms (as amended from time to time) constitute the entire agreement between you and Norton Avenue concerning your use of the App.
Norton Avenue reserves the right to update these Terms from time to time. If it does so, the updated version will be effective immediately, and the current Terms are available through a link in the App to this page. You are responsible for regularly reviewing these Terms so that you are aware of any changes to them and you will be bound by the new policy upon your continued use of the App. No other variation to these Terms shall be effective unless in writing and signed by an authorized representative on behalf of Norton Avenue.
These Terms shall be governed by and construed in accordance with U.S law and you agree to submit to the exclusive jurisdiction of the U.S Courts.
If any provision(s) of these Terms is held by a court of competent jurisdiction to be invalid or unenforceable, then such provision(s) shall be construed, as nearly as possible, to reflect the intentions of the parties (as reflected in the provision(s)) and all other provisions shall remain in full force and effect.
Norton Avenue’s failure to exercise or enforce any right or provision of these Terms shall not constitute a waiver of such right or provision unless acknowledged and agreed to by Norton Avenue in writing.]]>
</string>
在xml中设置它
<TextView
android:id="@+id/termsTxtView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="15dp"
android:singleLine="false"
android:text="@string/terms_text"
android:textSize="18sp" />