热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

低版本系统兼容的ActionBar(三)自定义Item视图+进度条的实现+下拉导航+透明ActionBar...

一、自定义MenuItem的视图custom_view.xml(就是一个单选按钮)

      

一、自定义MenuItem的视图

custom_view.xml (就是一个单选按钮)

xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android&#61;"http://schemas.android.com/apk/res/android"android:layout_width&#61;"wrap_content"android:layout_height&#61;"fill_parent"android:gravity&#61;"left|center_vertical"android:orientation&#61;"horizontal"><RadioGroupandroid:id&#61;"&#64;&#43;id/radio_nav"android:orientation&#61;"horizontal"android:layout_width&#61;"fill_parent"android:layout_height&#61;"wrap_content"><RadioButtonandroid:text&#61;"Custom"android:layout_width&#61;"wrap_content"android:layout_height&#61;"wrap_content"android:textColor&#61;"#ffffff"/><RadioButtonandroid:text&#61;"View!"android:layout_width&#61;"wrap_content"android:layout_height&#61;"wrap_content"android:textColor&#61;"#ffffff"/>RadioGroup>
LinearLayout>

 

MainActivity.java

//Inflate the custom viewView customNav &#61; LayoutInflater.from(this).inflate(R.layout.custom_view, null);//Bind to its state change((RadioGroup)customNav.findViewById(R.id.radio_nav)).setOnCheckedChangeListener(new OnCheckedChangeListener() {&#64;Overridepublic void onCheckedChanged(RadioGroup group, int checkedId) {Toast.makeText(MainActivity.this, "Navigation selection changed.", Toast.LENGTH_SHORT).show();}});//Attach to the action bar
getSupportActionBar().setCustomView(customNav);getSupportActionBar().setDisplayShowCustomEnabled(true);

 

二、添加圆形模糊进度的进度条

package com.kale.actionbar02;import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
import android.widget.RadioGroup;
import android.widget.RadioGroup.OnCheckedChangeListener;
import android.widget.Toast;public class MainActivity extends ActionBarActivity {&#64;Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);setContentView(R.layout.activity_main);//设置actionbar上面显示进度条&#xff0c;true表示显示&#xff0c;如果是false表示不显示 setSupportProgressBarIndeterminateVisibility(true);//Attach to the action bar
getSupportActionBar().setCustomView(customNav);getSupportActionBar().setDisplayShowCustomEnabled(true);}

}

 

三、添加有进度的横向进度条

package com.kale.actionbar02;import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.view.Window;public class MainActivity extends ActionBarActivity {private int mProgress &#61; 100;Handler mHandler &#61; new Handler();Runnable mProgressRunner &#61; new Runnable() {&#64;Overridepublic void run() {mProgress &#43;&#61; 2;// Normalize our progress along the progress bar&#39;s scaleint progress &#61; (Window.PROGRESS_END - Window.PROGRESS_START) / 100* mProgress;setSupportProgress(progress);if (mProgress <100) {mHandler.postDelayed(mProgressRunner, 50);}}};&#64;Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState); supportRequestWindowFeature(Window.FEATURE_PROGRESS);setContentView(R.layout.activity_main);// 设置actionbar上面显示进度条&#xff0c;true表示显示&#xff0c;如果是false表示不显示//setSupportProgressBarVisibility(true);//设置初始状态是否显示进度条&#xff0c;一般我们不显示。在用的时候再显示它
findViewById(R.id.button_id).setOnClickListener(new View.OnClickListener() {&#64;Overridepublic void onClick(View arg0) {if (mProgress &#61;&#61; 100) {mProgress &#61; 0;mProgressRunner.run();}}});}}

 

四、添加下拉导航&#43;悬浮模式

给ActionBar添加下拉导航的方法都是添加一个适配器&#xff0c;可以使简单的ArrayAdapter&#xff0c;也可以使SpinnerAdapter&#xff0c;添加完数据后再绑定个监听器。其实和Spinner没啥太大的区别。悬浮模式是可以让布局文件从ActionBar底下通过&#xff0c;可以实现透明效果。其代码就一行&#xff1a;

 

     // 设置ActionBar为悬浮的&#xff0c;就是说悬浮在布局文件上supportRequestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);

 注意看一下布局的&#xff0c;上边距。是用的ActionBar的高度来指定的

xml version&#61;"1.0" encoding&#61;"utf-8"?><FrameLayout xmlns:android&#61;"http://schemas.android.com/apk/res/android"android:layout_width&#61;"fill_parent"android:layout_height&#61;"fill_parent"><ScrollViewandroid:layout_width&#61;"fill_parent"android:layout_height&#61;"fill_parent"><LinearLayoutandroid:layout_width&#61;"fill_parent"android:layout_height&#61;"wrap_content"android:paddingLeft&#61;"10dp"android:paddingRight&#61;"10dp"android:paddingTop&#61;"?actionBarSize"android:orientation&#61;"vertical"><TextViewandroid:id&#61;"&#64;&#43;id/bunch_of_text"android:layout_width&#61;"fill_parent"android:layout_height&#61;"wrap_content" />LinearLayout>ScrollView>
FrameLayout>

 

下面是下拉导航的代码&#xff1a;

package com.kale.actionbar02;import android.content.Context;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBar.OnNavigationListener;
import android.support.v7.app.ActionBarActivity;
import android.view.Window;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import android.widget.Toast;public class MainActivity extends ActionBarActivity {&#64;Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);// 设置ActionBar为悬浮的&#xff0c;就是说悬浮在布局文件上
supportRequestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);setContentView(R.layout.activity_main);// 将ActionBar的操作模型设置为NAVIGATION_MODE_LIST
getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);getSupportActionBar().setTitle(null);Context context &#61; getSupportActionBar().getThemedContext();ArrayAdapter adapter &#61; ArrayAdapter.createFromResource(context, R.array.locations,android.R.layout.simple_spinner_dropdown_item); getSupportActionBar().setListNavigationCallbacks(adapter,new DropDownListenser());// Load partially transparent black background
getSupportActionBar().setBackgroundDrawable(getResources().getDrawable(R.drawable.bar_color));TextView bunchOfText &#61; (TextView) findViewById(R.id.bunch_of_text);bunchOfText.setText(builder.toString());}/*** 实现 ActionBar.OnNavigationListener接口*/class DropDownListenser implements OnNavigationListener {// 得到和Adapter里一致的字符数组String[] listNames &#61; getResources().getStringArray(R.array.locations);&#64;Overridepublic boolean onNavigationItemSelected(int itemPosition, long itemId) {Toast.makeText(getApplicationContext(), listNames[itemPosition], 0).show();return false;}}}

 

values/array.xml

xml version&#61;"1.0" encoding&#61;"utf-8"?>
<resources><string-array name&#61;"locations"><item>Homeitem><item>Emailitem><item>Calendaritem><item>Browseritem><item>Clockitem>string-array>
resources>

 

 

全部的代码&#xff1a;

 

package com.kale.actionbar02;import android.content.Context;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBar.OnNavigationListener;
import android.support.v7.app.ActionBarActivity;
import android.view.Window;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import android.widget.Toast;public class MainActivity extends ActionBarActivity {&#64;Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);// 设置ActionBar为悬浮的&#xff0c;就是说悬浮在布局文件上
supportRequestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);setContentView(R.layout.activity_main);// 将ActionBar的操作模型设置为NAVIGATION_MODE_LIST
getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);getSupportActionBar().setTitle(null);Context context &#61; getSupportActionBar().getThemedContext();ArrayAdapter adapter &#61; ArrayAdapter.createFromResource(context, R.array.locations,android.R.layout.simple_spinner_dropdown_item);getSupportActionBar().setListNavigationCallbacks(adapter,new DropDownListenser());// Load partially transparent black background
getSupportActionBar().setBackgroundDrawable(getResources().getDrawable(R.drawable.bar_color));StringBuilder builder &#61; new StringBuilder();for (int i &#61; 0; i <3; i&#43;&#43;) {for (String dialog : DIALOGUE) {builder.append(dialog).append("\n\n");}}TextView bunchOfText &#61; (TextView) findViewById(R.id.bunch_of_text);bunchOfText.setText(builder.toString());}/*** 实现 ActionBar.OnNavigationListener接口*/class DropDownListenser implements OnNavigationListener {// 得到和Adapter里一致的字符数组String[] listNames &#61; getResources().getStringArray(R.array.locations);&#64;Overridepublic boolean onNavigationItemSelected(int itemPosition, long itemId) {Toast.makeText(getApplicationContext(), listNames[itemPosition], 0).show();return false;}}public static final String[] DIALOGUE &#61; new String[] {"So shaken as we are, so wan with care,"&#43; "Find we a time for frighted peace to pant,"&#43; "And breathe short-winded accents of new broils"&#43; "To be commenced in strands afar remote."&#43; "No more the thirsty entrance of this soil"&#43; "Shall daub her lips with her own children&#39;s blood;"&#43; "Nor more shall trenching war channel her fields,"&#43; "Nor bruise her flowerets with the armed hoofs"&#43; "Of hostile paces: those opposed eyes,"&#43; "Which, like the meteors of a troubled heaven,"&#43; "All of one nature, of one substance bred,"&#43; "Did lately meet in the intestine shock"&#43; "And furious close of civil butchery"&#43; "Shall now, in mutual well-beseeming ranks,"&#43; "March all one way and be no more opposed"&#43; "Against acquaintance, kindred and allies:"&#43; "The edge of war, like an ill-sheathed knife,"&#43; "No more shall cut his master. Therefore, friends,"&#43; "As far as to the sepulchre of Christ,"&#43; "Whose soldier now, under whose blessed cross"&#43; "We are impressed and engaged to fight,"&#43; "Forthwith a power of English shall we levy;"&#43; "Whose arms were moulded in their mothers&#39; womb"&#43; "To chase these pagans in those holy fields"&#43; "Over whose acres walk&#39;d those blessed feet"&#43; "Which fourteen hundred years ago were nail&#39;d"&#43; "For our advantage on the bitter cross."&#43; "But this our purpose now is twelve month old,"&#43; "And bootless &#39;tis to tell you we will go:"&#43; "Therefore we meet not now. Then let me hear"&#43; "Of you, my gentle cousin Westmoreland,"&#43; "What yesternight our council did decree"&#43; "In forwarding this dear expedience.","Hear him but reason in divinity,"&#43; "And all-admiring with an inward wish"&#43; "You would desire the king were made a prelate:"&#43; "Hear him debate of commonwealth affairs,"&#43; "You would say it hath been all in all his study:"&#43; "List his discourse of war, and you shall hear"&#43; "A fearful battle render&#39;d you in music:"&#43; "Turn him to any cause of policy,"&#43; "The Gordian knot of it he will unloose,"&#43; "Familiar as his garter: that, when he speaks,"&#43; "The air, a charter&#39;d libertine, is still,"&#43; "And the mute wonder lurketh in men&#39;s ears,"&#43; "To steal his sweet and honey&#39;d sentences;"&#43; "So that the art and practic part of life"&#43; "Must be the mistress to this theoric:"&#43; "Which is a wonder how his grace should glean it,"&#43; "Since his addiction was to courses vain,"&#43; "His companies unletter&#39;d, rude and shallow,"&#43; "His hours fill&#39;d up with riots, banquets, sports,"&#43; "And never noted in him any study,"&#43; "Any retirement, any sequestration"&#43; "From open haunts and popularity.","I come no more to make you laugh: things now,"&#43; "That bear a weighty and a serious brow,"&#43; "Sad, high, and working, full of state and woe,"&#43; "Such noble scenes as draw the eye to flow,"&#43; "We now present. Those that can pity, here"&#43; "May, if they think it well, let fall a tear;"&#43; "The subject will deserve it. Such as give"&#43; "Their money out of hope they may believe,"&#43; "May here find truth too. Those that come to see"&#43; "Only a show or two, and so agree"&#43; "The play may pass, if they be still and willing,"&#43; "I&#39;ll undertake may see away their shilling"&#43; "Richly in two short hours. Only they"&#43; "That come to hear a merry bawdy play,"&#43; "A noise of targets, or to see a fellow"&#43; "In a long motley coat guarded with yellow,"&#43; "Will be deceived; for, gentle hearers, know,"&#43; "To rank our chosen truth with such a show"&#43; "As fool and fight is, beside forfeiting"&#43; "Our own brains, and the opinion that we bring,"&#43; "To make that only true we now intend,"&#43; "Will leave us never an understanding friend."&#43; "Therefore, for goodness&#39; sake, and as you are known"&#43; "The first and happiest hearers of the town,"&#43; "Be sad, as we would make ye: think ye see"&#43; "The very persons of our noble story"&#43; "As they were living; think you see them great,"&#43; "And follow&#39;d with the general throng and sweat"&#43; "Of thousand friends; then in a moment, see"&#43; "How soon this mightiness meets misery:"&#43; "And, if you can be merry then, I&#39;ll say"&#43; "A man may weep upon his wedding-day.","First, heaven be the record to my speech!"&#43; "In the devotion of a subject&#39;s love,"&#43; "Tendering the precious safety of my prince,"&#43; "And free from other misbegotten hate,"&#43; "Come I appellant to this princely presence."&#43; "Now, Thomas Mowbray, do I turn to thee,"&#43; "And mark my greeting well; for what I speak"&#43; "My body shall make good upon this earth,"&#43; "Or my divine soul answer it in heaven."&#43; "Thou art a traitor and a miscreant,"&#43; "Too good to be so and too bad to live,"&#43; "Since the more fair and crystal is the sky,"&#43; "The uglier seem the clouds that in it fly."&#43; "Once more, the more to aggravate the note,"&#43; "With a foul traitor&#39;s name stuff I thy throat;"&#43; "And wish, so please my sovereign, ere I move,"&#43; "What my tongue speaks my right drawn sword may prove.","Now is the winter of our discontent"&#43; "Made glorious summer by this sun of York;"&#43; "And all the clouds that lour&#39;d upon our house"&#43; "In the deep bosom of the ocean buried."&#43; "Now are our brows bound with victorious wreaths;"&#43; "Our bruised arms hung up for monuments;"&#43; "Our stern alarums changed to merry meetings,"&#43; "Our dreadful marches to delightful measures."&#43; "Grim-visaged war hath smooth&#39;d his wrinkled front;"&#43; "And now, instead of mounting barded steeds"&#43; "To fright the souls of fearful adversaries,"&#43; "He capers nimbly in a lady&#39;s chamber"&#43; "To the lascivious pleasing of a lute."&#43; "But I, that am not shaped for sportive tricks,"&#43; "Nor made to court an amorous looking-glass;"&#43; "I, that am rudely stamp&#39;d, and want love&#39;s majesty"&#43; "To strut before a wanton ambling nymph;"&#43; "I, that am curtail&#39;d of this fair proportion,"&#43; "Cheated of feature by dissembling nature,"&#43; "Deformed, unfinish&#39;d, sent before my time"&#43; "Into this breathing world, scarce half made up,"&#43; "And that so lamely and unfashionable"&#43; "That dogs bark at me as I halt by them;"&#43; "Why, I, in this weak piping time of peace,"&#43; "Have no delight to pass away the time,"&#43; "Unless to spy my shadow in the sun"&#43; "And descant on mine own deformity:"&#43; "And therefore, since I cannot prove a lover,"&#43; "To entertain these fair well-spoken days,"&#43; "I am determined to prove a villain"&#43; "And hate the idle pleasures of these days."&#43; "Plots have I laid, inductions dangerous,"&#43; "By drunken prophecies, libels and dreams,"&#43; "To set my brother Clarence and the king"&#43; "In deadly hate the one against the other:"&#43; "And if King Edward be as true and just"&#43; "As I am subtle, false and treacherous,"&#43; "This day should Clarence closely be mew&#39;d up,"&#43; "About a prophecy, which says that &#39;G&#39;"&#43; "Of Edward&#39;s heirs the murderer shall be."&#43; "Dive, thoughts, down to my soul: here"&#43; "Clarence comes.","To bait fish withal: if it will feed nothing else,"&#43; "it will feed my revenge. He hath disgraced me, and"&#43; "hindered me half a million; laughed at my losses,"&#43; "mocked at my gains, scorned my nation, thwarted my"&#43; "bargains, cooled my friends, heated mine"&#43; "enemies; and what&#39;s his reason? I am a Jew. Hath"&#43; "not a Jew eyes? hath not a Jew hands, organs,"&#43; "dimensions, senses, affections, passions? fed with"&#43; "the same food, hurt with the same weapons, subject"&#43; "to the same diseases, healed by the same means,"&#43; "warmed and cooled by the same winter and summer, as"&#43; "a Christian is? If you prick us, do we not bleed?"&#43; "if you tickle us, do we not laugh? if you poison"&#43; "us, do we not die? and if you wrong us, shall we not"&#43; "revenge? If we are like you in the rest, we will"&#43; "resemble you in that. If a Jew wrong a Christian,"&#43; "what is his humility? Revenge. If a Christian"&#43; "wrong a Jew, what should his sufferance be by"&#43; "Christian example? Why, revenge. The villany you"&#43; "teach me, I will execute, and it shall go hard but I"&#43; "will better the instruction.","Virtue! a fig! &#39;tis in ourselves that we are thus"&#43; "or thus. Our bodies are our gardens, to the which"&#43; "our wills are gardeners: so that if we will plant"&#43; "nettles, or sow lettuce, set hyssop and weed up"&#43; "thyme, supply it with one gender of herbs, or"&#43; "distract it with many, either to have it sterile"&#43; "with idleness, or manured with industry, why, the"&#43; "power and corrigible authority of this lies in our"&#43; "wills. If the balance of our lives had not one"&#43; "scale of reason to poise another of sensuality, the"&#43; "blood and baseness of our natures would conduct us"&#43; "to most preposterous conclusions: but we have"&#43; "reason to cool our raging motions, our carnal"&#43; "stings, our unbitted lusts, whereof I take this that"&#43; "you call love to be a sect or scion.","Blow, winds, and crack your cheeks! rage! blow!"&#43; "You cataracts and hurricanoes, spout"&#43; "Till you have drench&#39;d our steeples, drown&#39;d the cocks!"&#43; "You sulphurous and thought-executing fires,"&#43; "Vaunt-couriers to oak-cleaving thunderbolts,"&#43; "Singe my white head! And thou, all-shaking thunder,"&#43; "Smite flat the thick rotundity o&#39; the world!"&#43; "Crack nature&#39;s moulds, an germens spill at once,"&#43; "That make ingrateful man!" };}

 

源码下载&#xff1a;http://download.csdn.net/detail/shark0017/7688143



推荐阅读
  • 本文介绍了使用kotlin实现动画效果的方法,包括上下移动、放大缩小、旋转等功能。通过代码示例演示了如何使用ObjectAnimator和AnimatorSet来实现动画效果,并提供了实现抖动效果的代码。同时还介绍了如何使用translationY和translationX来实现上下和左右移动的效果。最后还提供了一个anim_small.xml文件的代码示例,可以用来实现放大缩小的效果。 ... [详细]
  • Android开发实现的计时器功能示例
    本文分享了Android开发实现的计时器功能示例,包括效果图、布局和按钮的使用。通过使用Chronometer控件,可以实现计时器功能。该示例适用于Android平台,供开发者参考。 ... [详细]
  • 在Xamarin XAML语言中如何在页面级别构建ControlTemplate控件模板
    本文介绍了在Xamarin XAML语言中如何在页面级别构建ControlTemplate控件模板的方法和步骤,包括将ResourceDictionary添加到页面中以及在ResourceDictionary中实现模板的构建。通过本文的阅读,读者可以了解到在Xamarin XAML语言中构建控件模板的具体操作步骤和语法形式。 ... [详细]
  • 这两天用到了ListView,写下遇到的一些问题。首先是ListView本身与子控件的焦点问题,比如我这里子控件用到了Button,在需要ListView中的根布局属性上加上下面的这一个属性:and ... [详细]
  • 在最近的一系列文章,对midipadAPP,有一个关于一个radialgradiant渲染每个padview利用的探讨,对审美的原因&#x ... [详细]
  • 如何使用Java获取服务器硬件信息和磁盘负载率
    本文介绍了使用Java编程语言获取服务器硬件信息和磁盘负载率的方法。首先在远程服务器上搭建一个支持服务端语言的HTTP服务,并获取服务器的磁盘信息,并将结果输出。然后在本地使用JS编写一个AJAX脚本,远程请求服务端的程序,得到结果并展示给用户。其中还介绍了如何提取硬盘序列号的方法。 ... [详细]
  • XML介绍与使用的概述及标签规则
    本文介绍了XML的基本概念和用途,包括XML的可扩展性和标签的自定义特性。同时还详细解释了XML标签的规则,包括标签的尖括号和合法标识符的组成,标签必须成对出现的原则以及特殊标签的使用方法。通过本文的阅读,读者可以对XML的基本知识有一个全面的了解。 ... [详细]
  • Java学习笔记之面向对象编程(OOP)
    本文介绍了Java学习笔记中的面向对象编程(OOP)内容,包括OOP的三大特性(封装、继承、多态)和五大原则(单一职责原则、开放封闭原则、里式替换原则、依赖倒置原则)。通过学习OOP,可以提高代码复用性、拓展性和安全性。 ... [详细]
  • Hibernate延迟加载深入分析-集合属性的延迟加载策略
    本文深入分析了Hibernate延迟加载的机制,特别是集合属性的延迟加载策略。通过延迟加载,可以降低系统的内存开销,提高Hibernate的运行性能。对于集合属性,推荐使用延迟加载策略,即在系统需要使用集合属性时才从数据库装载关联的数据,避免一次加载所有集合属性导致性能下降。 ... [详细]
  • 开发笔记:(002)spring容器中bean初始化销毁时执行的方法及其3种实现方式
    篇首语:本文由编程笔记#小编为大家整理,主要介绍了(002)spring容器中bean初始化销毁时执行的方法及其3种实现方式相关的知识,希望对你有一定的参考价值。 ... [详细]
  • 近来有一个需求,是需要在androidjava基础库中插入一些log信息,完成这个工作需要的前置条件有编译好的android源码具体android源码如何编译,这 ... [详细]
  • 在一对一直播源码使用过程中,有时会出现软键盘切换闪屏问题,就是当切换表情的时候屏幕会跳动,因此要对一对一直播源码表情面板无缝切换进行优化。 ... [详细]
  • IjustinheritedsomewebpageswhichusesMooTools.IneverusedMooTools.NowIneedtoaddsomef ... [详细]
  • JDK源码学习之HashTable(附带面试题)的学习笔记
    本文介绍了JDK源码学习之HashTable(附带面试题)的学习笔记,包括HashTable的定义、数据类型、与HashMap的关系和区别。文章提供了干货,并附带了其他相关主题的学习笔记。 ... [详细]
  • http头_http头部注入
    1、http头部注入分析1、原理 ... [详细]
author-avatar
zhihong520珠珠_448
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有