6 80 76.8 131.2 211.2 163.2 96 22.4 131.2 28.8 128 60.8-3.2 35.2-51.2 60.8-137.6 60.8-80 0-179.2-16-224-35.2l-16 118.4c44.8 16 124.8 35.2 220.8 35.2 227.2 0 339.2-80 348.8-169.6 9.6-80-54.4-128-195.2-166.4-105.6-28.8-147.2-28.8-144-64 3.2-28.8 44.8-54.4 124.8-54.4s198.4 16 227.2 25.6l16-118.4c-48-16-137.6-22.4-233.6-22.4-192 0-316.8 73.6-326.4 166.4zM1994.85504 262.4l-22.4 227.2-32 291.2h160l32-294.4c6.4-51.2 12.8-121.6 12.8-121.6s32-9.6 92.8-9.6c179.2-3.2 140.8 108.8 134.4 166.4l-28.8 259.2h163.2l28.8-284.8c22.4-156.8-22.4-332.8-540.8-233.6zM1815.65504 310.4c-64-48-169.6-70.4-300.8-70.4-76.8 0-134.4 3.2-169.6 9.6l-54.4 531.2c54.4 9.6 124.8 12.8 201.6 12.8 128 0 211.2-16 278.4-57.6 73.6-41.6 124.8-108.8 134.4-204.8 6.4-105.6-32-176-89.6-220.8z m-70.4 214.4c-9.6 89.6-102.4 153.6-230.4 153.6-32 0-48-3.2-60.8-6.4l32-320c12.8-3.2 38.4-3.2 54.4-3.2 134.4 3.2 217.6 48 204.8 176z" fill="#231916"></path><path d="M1.25504 518.4c-16 160 121.6 278.4 377.6 278.4 89.6 0 153.6-6.4 185.6-19.2l12.8-121.6c-35.2 9.6-112 19.2-163.2 19.2-150.4 0-227.2-54.4-217.6-163.2 12.8-124.8 124.8-163.2 256-163.2 60.8 0 134.4 9.6 166.4 19.2l16-128c-44.8-9.6-96-16-182.4-16C228.45504 224 23.65504 329.6 1.25504 518.4z" fill="#C92027"></path><path d="M2961.25504 316.8c41.6 70.4 115.2 131.2 220.8 185.6l-22.4 32c-96-51.2-169.6-112-214.4-185.6-57.6 80-128 144-214.4 188.8l-22.4-32c96-48 169.6-112 220.8-188.8h32z m3.2 153.6v316.8h-38.4v-316.8h38.4zM3473.25504 432c28.8 140.8 102.4 246.4 220.8 320l-25.6 32c-105.6-67.2-176-160-211.2-275.2-32 112-102.4 204.8-217.6 278.4l-22.4-32c140.8-86.4 214.4-204.8 217.6-352v-80h38.4c3.2 38.4 0 76.8 0 108.8zM3988.45504 316.8v92.8h182.4v240h-38.4v-32h-147.2v176h-38.4v-176h-147.2v32h-38.4v-240h182.4V316.8h44.8z m-38.4 262.4v-137.6h-147.2v137.6h147.2z m185.6 0v-137.6h-147.2v137.6h147.2zM4340.45504 486.4c-12.8 89.6-35.2 163.2-60.8 227.2l-32-19.2c25.6-64 44.8-137.6 57.6-214.4l35.2 6.4z m92.8 284.8c-35.2 0-54.4-16-54.4-51.2v-294.4h38.4v284.8c0 16 9.6 22.4 28.8 22.4h96c12.8 0 22.4-6.4 25.6-16 6.4-12.8 9.6-48 12.8-108.8l35.2 12.8c-3.2 70.4-12.8 112-22.4 128-9.6 12.8-25.6 19.2-44.8 19.2h-115.2z m124.8-320l-32 22.4c-25.6-38.4-64-83.2-108.8-131.2l32-19.2c48 44.8 83.2 89.6 108.8 128z m160 224l-35.2 16c-25.6-80-54.4-153.6-86.4-217.6l35.2-12.8c35.2 70.4 64 140.8 86.4 214.4z" fill="#231916"></path></symbol><symbol id="icon-wap-toolbar-menu" viewBox="0 0 1024 1024"><path d="M64 448h896c35.2 0 64 28.8 64 64s-28.8 64-64 64H64c-35.2 0-64-28.8-64-64s28.8-64 64-64z m0 448h896c35.2 0 64 28.8 64 64s-28.8 64-64 64H64c-35.2 0-64-28.8-64-64s28.8-64 64-64zM64 0h896c35.2 0 64 28.8 64 64s-28.8 64-64 64H64C28.8 128 0 99.2 0 64s28.8-64 64-64z"></path></symbol></svg><div class="csdn-toolbar clearfix" style="top: 0px; "> <div class="mToolbarL floatL"><div class="toolbarBack"><a href="https://www.csdn.net"><svg class="icon" aria-hidden="true"><use href="#icon-fanhui"></use></svg></a></div> <div class="logo floatR"><a href="/"><svg class="icon" aria-hidden="true"><use href="#icon-wap_toolbar_blog"></use></svg></a></div></div> <div class="rightmenu floatR clearfix unlogin"> <a class="floatL search_btn" href="http://so.csdn.net/so/?t=blog"><svg xmlns="//www.w3.org/2000/svg" viewBox="0 0 64 64"><path d="M64 58.3L58.4 64 43 48.5c-4.5 3.5-10.1 5.6-16.2 5.6C12 54.1 0 42 0 27S12 0 26.8 0s26.8 12.1 26.8 27c0 5.9-1.9 11.3-5.1 15.8L64 58.3zM26.8 6.5C15.6 6.5 6.5 15.7 6.5 27s9.1 20.5 20.3 20.5c11.2 0 20.3-9.2 20.3-20.5S38 6.5 26.8 6.5z" fill="#999"></path></svg></a> <div class="login floatR"> <a href="https://passport.csdn.net/account/login?ref=toolbar">登录</a> </div> <div class="logout floatR"> <a href="//my.csdn.net/"><img src="//csdnimg.cn/public/common/toolbar/images/100x100.jpg"></a> </div> </div> </div>
<script type="text/javascript" id="m-toolbar-tpl-scriptId" prod="blog" src="https://csdnimg.cn/public/common/toolbar/js/m_toolbar-1.0.1.js"></script>
<script type="text/javascript">
var BlogData = {
like : 0 };
</script>
<div id="main">
<div class="a_d_1"></div>
<div id="article" class="margin_sides">
<h1 class="article_title">
<span class="type type-1">
原 </span>
Android Settings添加选项 </h1>
<div class="article_info clearfix">
<div class="top_user_mod clearfix">
<div class="top_user_info floatL clearfix">
<a href="https://blog.csdn.net/u013921245" target="_blank" class="floatL clearfix">
<img class="floatL avatar" src="https://avatar.csdn.net/B/F/D/3_u013921245.jpg" alt="">
<span class="nick_name odd-overhidden floatL">N葫芦</span>
</a>
<span class="read_num floatR">阅读数:2342</span>
<span class="create_time floatR">2016-01-29</span>
</div>
</div>
</div>
<div class="article_content" style="overflow-x: hidden; overflow-y: hidden; ">
<div class="article-copyright">
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u013921245/article/details/50607460 </div>
<div class="markdown_views">
<p><span></span><span style="font-size:14px;">在Android中,设置Settings一直都是header+fragment的形式出现。例如设置里面的“时间和日期”项,在settings_hesder.xml中其布局大概是这样:</span><span style="font-size:12px;"></span></p>
<p><span></span></p>
<pre onclick="hljs.copyCode(event)"><code class="language-html hljs xml"><span class="hljs-comment"><!-- Date & Time --></span>
<span class="hljs-tag"><<span class="hljs-name">header</span>
<span class="hljs-attr">android:id</span>=<span class="hljs-string">"@+id/date_time_settings"</span>
<span class="hljs-attr">android:fragment</span>=<span class="hljs-string">"com.android.settings.DateTimeSettings"</span>
<span class="hljs-attr">android:icon</span>=<span class="hljs-string">"@drawable/ic_settings_date_time"</span>
<span class="hljs-attr">android:title</span>=<span class="hljs-string">"@string/date_and_time"</span>></span>
Back to home |
File page
Subscribe |
Register |
Login
| N