Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÔÚXMLÖж¨Òå²Ëµ¥

ºÍAndroid UI layoutÒ»Ñù£¬ÎÒÃÇÒ²¿ÉÒÔÔÚXMLÖж¨ÒåÓ¦ÓóÌÐòµÄ²Ëµ¥¡£Í¨¹ýÔڲ˵¥µÄonCreateOptionsMenu·½·¨ÖÐÅòÕͲ˵¥layout¡£ÕâÑù×ö»áʹÎÒÃǵijÌÐò´úÂë¼òµ¥¶àÁË£¬¶øÇÒ¾¡¿ÉÄܵĽ«¸ü¶àµÄ½çÃæÉè¼Æ²¿·Ö·Åµ½XML£¬±ãÓÚä¯ÀÀ¡£
 
1. ÔÚ¹¤³ÌµÄ/res/Îļþ¼ÐÏ´´½¨menuÎļþ¼Ð£¬ÓÃÀ´±£´æÄãΪӦÓóÌÐò¶¨ÒåµÄ²Ëµ¥XMLÎļþ¡£
Ôڲ˵¥XML layoutÖУ¬ÓÐÈý¸öÓÐЧµÄÔªËØ£ºmenu¡¢group¡¢item¡£itemºÍgroup±ØÐëÊÇmenuµÄ×ÓÔªËØ£¬ÇÒitem±ØÐëÊÇgroupµÄ×ÓÔªËØ¡£ÁíÍâµÄmenu¿ÉÒÔÊÇitemµÄ×ÓÔªËØ£¨ÎªÁË´´½¨×Ӳ˵¥£©¡£ÏÂÃæµÄXMLƬ¶ÎÏÔʾÁ˲˵¥µÄ²ã´Î¶¨Ò壺
 
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:title="Play" android:id="@+id/media_play"
  android:icon="@android:drawable/ic_media_play"/>
<item android:title="Pause" android:id="@+id/media_pause"
  android:icon="@android:drawable/ic_media_pause"/>
<item android:title="File" android:id="@+id/file">
<menu>
<item android:title="Open..." android:id="@+id/file_open"/>
<item android:title="Save" android:id="@+id/file_save"/>
<item android:title="Save as" android:id="@+id/file_saveas"/>
<item android:title="Exit" android:id="@+id/file_exit"/>
</menu>
</item>
<item android:title="Edit" android:id="@+id/edit">
<menu>
<group>
<item android:title="Copy" android:id="@+id/edit_copy"/>
<item android:title="Paste" android:id="@+id/edit_paste"/>
<item android:title="Cut" android:id="@+id/edit_cut"/>
<item android:title="Delete" android:id="@+id/edit_delete"/>
</group>
</menu>
</item>
</menu>
 
2. ÖØдActivityµÄonCreateOptionsMenu·½·¨£¬Í¨¹ýMenuInflater.inflate·½·¨À´ÅòÕͲ˵¥XML¡£
 
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu_option, menu);
 
3. ÔÚActivityµÄonOptionsItemSelected·½·¨Öд¦Àíÿ¸ö²Ëµ¥ÏîµÄµã»÷ʼþ£º
 
@Override
public boolean onOptionsItemSelected(MenuItem item) {
super.onOptionsItem


Ïà¹ØÎĵµ£º

ʹÓÃXmlDocumentÀàÍê³É¶ÔXMLµÄ²é¡¢É¾¡¢Ìí¡¢¸Ä

ʹÓÃXmlDocumentÀàÍê³É¶ÔXMLµÄ²é¡¢É¾¡¢Ìí¡¢¸Ä
http://www.aspdiy.net/article/53.htm
ºǫ́C#´úÂë
  1using System;
  2using System.Collections;
  3using System.ComponentModel;
  4using System.Data;
  5using System.Drawing;
  6using System. ......

linq to xml(MOSS GetCurrentUser)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Xml;
using System.IO;
using System.Data;
using System.Dat ......

xml ÐÎʽµÄ´æ´¢¹ý³Ì

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
create procedure [dbo].[MachiningPayedGetListByCondition]
@CustomerName varchar(50),
@CustomerPhone varchar(50),
@PactNumber varchar(50),
@Ispay bit
as
begin
 set nocount on;
 SELECT
 dp.ID as 'MachiningPayed/@ID',
&nbs ......

javaÉú³ÉXMLÎļþ×Ô¶¯»»ÐÐÎÊÌâ

Java codeFormat ft=Format.getRawFormat();
ft.setEncoding("utf-8");
ft.setIndent("    ");//ÉèÖÃËõ½ø
       
XMLOutputter outputter=new XMLOutputter(ft);//ÉèÖÃXML¸ñʽ
Õâλ˵µÄ²»´í£»
ÔÚieÀïÃ棬ËüÄÜ°Ñxml×Ô¶¯½âÎö³ÆÊ÷Ðνṹ£¬ËùÒÔ¿´ÆðÀ´Ã»ÎÊÌ⣬ÔÚ¼Çʱ¾ÀïÃ棬¾Í²»ÐÐÁ ......

JAVAÖжÁÈ¡XMLÎļþÖеÄÅäÖÃÐÅÏ¢

  ÔÚ½øÐÐMISϵͳ¿ª·¢¹ý³ÌÖÐ,´ÓÅäÖÃÎļþÖжÁÈ¡ÅäÖÃÐÅÏ¢ÊÇÿһ¸öϵͳ±ØÐë¾ß±¸µÄ¹¦ÄÜ,ÀýÈç,ÎÒÃÇÒªÅäÖöÁÈ¡Êý¾Ý¿âÅäÖÃÐÅÏ¢,°üÀ¨Çý¶¯³ÌÐòÃû¡¢Á¬½Ó×Ö·û´®£¬Óû§Ãû£¬¿ÚÁîµÈÐÅÏ¢£¬ÓÉÓÚÕâЩÐÅÏ¢»áËæ×ÅÓû§µÄ²»Í¬¶ø·¢Éú¸Ä±ä£¬ËùÒÔ²»ÄÜÖ±½Ó°Ñ²ÎÊýдÔÚ³ÌÐòÖУ¬½«ÆäдÈëÅäÖÃÎļþ£¬È»ºóÔÚÓ¦ÓóÌÐòÖжÁÈ¡ÅäÖÃÐÅÏ¢²¢¼ÓÒÔʹÓã¬ÊÇÒ»¸ö³É ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ