<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>无雨之城</title>
	<atom:link href="http://www.adamstudio.cn/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.adamstudio.cn</link>
	<description>稠密的时间 稀疏的事件 圆润的思念 尖锐的蜕变</description>
	<lastBuildDate>Sat, 19 May 2012 09:51:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>YII:路径总结</title>
		<link>http://www.adamstudio.cn/index.php/2012/yii_lu_jing_zong_jie/</link>
		<comments>http://www.adamstudio.cn/index.php/2012/yii_lu_jing_zong_jie/#comments</comments>
		<pubDate>Sat, 19 May 2012 09:50:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[YII]]></category>
		<category><![CDATA[网络技术]]></category>
		<category><![CDATA[网络技术-PHP]]></category>

		<guid isPermaLink="false">http://www.adamstudio.cn/?p=885</guid>
		<description><![CDATA[YII::app()->baseUrl &#8211; 当前网页的baseUrl $this->createUrl(&#8216;site/login&#8217;) &#8211; 以网站根目录为基础，创建新的连接url $this->redirect(array(&#8216;site/index&#8217;)) &#8211; 直接跳转到layout界面 Yii::app()->basePath &#8211; 网站在服务器上的文件夹路径]]></description>
			<content:encoded><![CDATA[<p>YII::app()->baseUrl &#8211; 当前网页的baseUrl<br />
$this->createUrl(&#8216;site/login&#8217;) &#8211; 以网站根目录为基础，创建新的连接url<br />
$this->redirect(array(&#8216;site/index&#8217;)) &#8211; 直接跳转到layout界面<br />
Yii::app()->basePath &#8211; 网站在服务器上的文件夹路径</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamstudio.cn/index.php/2012/yii_lu_jing_zong_jie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CAPTCHA图片不显示的解决方法</title>
		<link>http://www.adamstudio.cn/index.php/2012/captcha_tu_pian_bu_xian_shi_de_jie_jue_fang_fa/</link>
		<comments>http://www.adamstudio.cn/index.php/2012/captcha_tu_pian_bu_xian_shi_de_jie_jue_fang_fa/#comments</comments>
		<pubDate>Sat, 19 May 2012 04:41:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[YII]]></category>
		<category><![CDATA[网络技术]]></category>
		<category><![CDATA[网络技术-PHP]]></category>

		<guid isPermaLink="false">http://www.adamstudio.cn/?p=879</guid>
		<description><![CDATA[CAPTCHA图片不显示的问题仿佛很普遍，首先确保你的GD插件已经启用，是否启用看phpinfo就知道了。如果GD已经启用，而直接打开CAPTCHA图片时提示“图像XXX因其本身有错无法显示” ，可以尝试通过以下几种方法来解决 ： 1 尽量删除文中的空格 2 在php文件顶部加入error_reporting(0); 3 在header输出前加入ob_clean(); 也就是： ob_clean();//加上这行 header('Pragma: public'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Content-Transfer-Encoding: binary'); header("Content-type: image/png"); imagepng($image); imagedestroy($image);]]></description>
			<content:encoded><![CDATA[<p>CAPTCHA图片不显示的问题仿佛很普遍，首先确保你的GD插件已经启用，是否启用看phpinfo就知道了。如果GD已经启用，而直接打开CAPTCHA图片时提示“图像XXX因其本身有错无法显示” ，可以尝试通过以下几种方法来解决 ：<br />
1 尽量删除文中的空格<br />
2 在php文件顶部加入error_reporting(0);<br />
3 在header输出前加入ob_clean(); 也就是：</p>
<pre lang='php'>
                ob_clean();//加上这行
		header('Pragma: public');
		header('Expires: 0');
		header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
		header('Content-Transfer-Encoding: binary');
		header("Content-type: image/png");
		imagepng($image);
		imagedestroy($image);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.adamstudio.cn/index.php/2012/captcha_tu_pian_bu_xian_shi_de_jie_jue_fang_fa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android:IO操作</title>
		<link>http://www.adamstudio.cn/index.php/2012/android_io_cao_zuo/</link>
		<comments>http://www.adamstudio.cn/index.php/2012/android_io_cao_zuo/#comments</comments>
		<pubDate>Wed, 02 May 2012 09:36:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.adamstudio.cn/?p=860</guid>
		<description><![CDATA[Java的IO操作真是复杂，要经过以下几个步骤： URL->HttpURLConnection->InputStream->InputStreamReader->BufferReader.readLine() 请看通用的类HttpDownloader： package cc.ewings.download; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; public class HttpDownloader { private URL url=null; //本函数近适用于文本类文件的下载 public String download(String urlStr){ StringBuffer sb=new StringBuffer(); String line=null; BufferedReader buffer = null; try{ //URL->HttpURLConnection->InputStream->InputStreamReader->BufferReader.readLine() url=new URL(urlStr); HttpURLConnection urlConn=(HttpURLConnection) url.openConnection(); buffer = new BufferedReader(new InputStreamReader(urlConn.getInputStream())); while((line=buffer.readLine()) != null){ sb.append(line); } } catch (Exception e){ [...]]]></description>
			<content:encoded><![CDATA[<p>Java的IO操作真是复杂，要经过以下几个步骤：<br />
URL->HttpURLConnection->InputStream->InputStreamReader->BufferReader.readLine()<br />
请看通用的类HttpDownloader：</p>
<pre lang="java">
package cc.ewings.download;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class HttpDownloader {
	private URL url=null;

	//本函数近适用于文本类文件的下载
	public String download(String urlStr){
		StringBuffer sb=new StringBuffer();
		String line=null;
		BufferedReader buffer = null;
		try{
			//URL->HttpURLConnection->InputStream->InputStreamReader->BufferReader.readLine()
			url=new URL(urlStr);
			HttpURLConnection urlConn=(HttpURLConnection) url.openConnection();
			buffer = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));
			while((line=buffer.readLine()) != null){
				sb.append(line);
			}
		} catch (Exception e){
			e.printStackTrace();
		} finally {
			try{
				buffer.close();
			} catch(Exception e){
				e.printStackTrace();
			}
		}

		return sb.toString();

	}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.adamstudio.cn/index.php/2012/android_io_cao_zuo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Android:事件总结</title>
		<link>http://www.adamstudio.cn/index.php/2012/android_shi_jian_zong_jie/</link>
		<comments>http://www.adamstudio.cn/index.php/2012/android_shi_jian_zong_jie/#comments</comments>
		<pubDate>Tue, 01 May 2012 08:56:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.adamstudio.cn/?p=854</guid>
		<description><![CDATA[一 广播机制 1 创建一个继承自BroadReceiver的类MyReceiver： package cc.ewings.BroadcastTest; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; public class MyReceiver extends BroadcastReceiver { @Override public void onReceive(Context arg0, Intent arg1) { // TODO Auto-generated method stub System.out.println("received"); } } 2 在主类中广播intent package cc.ewings.BroadcastTest; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class BroadCastActivity extends Activity [...]]]></description>
			<content:encoded><![CDATA[<p>一 广播机制</p>
<p>1 创建一个继承自BroadReceiver的类MyReceiver：</p>
<pre lang="java">
package cc.ewings.BroadcastTest;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
public class MyReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context arg0, Intent arg1) {
		// TODO Auto-generated method stub
		System.out.println("received");
	}
}
</pre>
<p>2 在主类中广播intent</p>
<pre lang="java">
package cc.ewings.BroadcastTest;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class BroadCastActivity extends Activity {
    Button myBtn;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        myBtn=(Button) this.findViewById(R.id.myBtn);
        myBtn.setOnClickListener(new MyListener());
    }

    class MyListener implements OnClickListener{

		public void onClick(View arg0) {
			// TODO Auto-generated method stub
			Intent myIntent=new Intent();
			myIntent.setAction(Intent.ACTION_EDIT);
			BroadCastActivity.this.sendBroadcast(myIntent);
		}

    }
}
</pre>
<p>3 在Manifest中注册receiver</p>
<pre><code>&lt;receiver android:name=".MyReceiver"&gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.EDIT"/&gt;
        &lt;/intent-filter&gt;
    &lt;/receiver&gt;</code>
</pre>
<p>注： 在主Activity中也可以直接注册侦听，这样就不用再Manifest注册了：</p>
<pre lang="java">
package cc.ewings.BroadcastTest;

import android.app.Activity;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class BroadCastCodeDefine extends Activity {
    Button myBtn;
    MyReceiver receiver;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        myBtn=(Button) this.findViewById(R.id.myBtn);
        myBtn.setOnClickListener(new MyListener());
        receiver=new MyReceiver();
        registerReceiver(receiver, new IntentFilter("cc.ewings.foodstar.refreshPage"));
    }

    @Override
    protected void onPause() {
        super.onPause();
         unregisterReceiver(receiver);
    }

    class MyListener implements OnClickListener{

		public void onClick(View arg0) {
			// TODO Auto-generated method stub
			System.out.println("broadcasting");
			Intent myIntent=new Intent();
			myIntent.setAction("cc.ewings.foodstar.refreshPage");
			BroadCastCodeDefine.this.sendBroadcast(myIntent);
		}

    }
}
</pre>
<p>这样的好处是，可以关闭侦听。用Manifest中注册的，则关闭程序后仍然能收到侦听。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamstudio.cn/index.php/2012/android_shi_jian_zong_jie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android: SQLite教程</title>
		<link>http://www.adamstudio.cn/index.php/2012/android_sqlite_jiao_cheng/</link>
		<comments>http://www.adamstudio.cn/index.php/2012/android_sqlite_jiao_cheng/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 15:43:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[我的观点]]></category>

		<guid isPermaLink="false">http://www.adamstudio.cn/?p=847</guid>
		<description><![CDATA[一  用adb工具查看数据库,依次使用以下命令： cmd-&#62;adb shell cd data/data/包名/databases ls sqllite3 数据库名 select * form 表名; 二  Android代码 1 新建DBHelper类 package cc.ewings.lib; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase.CursorFactory; import android.database.sqlite.SQLiteOpenHelper; public class DBHelper extends SQLiteOpenHelper { public DBHelper(Context context, String name, CursorFactory factory, int version) { super(context, name, factory, version); // TODO Auto-generated constructor stub } @Override public [...]]]></description>
			<content:encoded><![CDATA[<p>一  用adb工具查看数据库,依次使用以下命令：</p>
<p>cmd-&gt;adb shell<br />
cd data/data/包名/databases<br />
ls<br />
sqllite3 数据库名<br />
select * form 表名;<span id="more-847"></span></p>
<p>二  Android代码</p>
<p>1 新建DBHelper类</p>
<pre lang="java">package cc.ewings.lib;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class DBHelper extends SQLiteOpenHelper {

	public DBHelper(Context context, String name, CursorFactory factory,
			int version) {
		super(context, name, factory, version);
		// TODO Auto-generated constructor stub
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		System.out.println("Create Database");
		db.execSQL("create table user(id int, name varchar(20))");
	}

	@Override
	public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) {
		System.out.println("Update Database");
	}
}</pre>
<p>2 主Activity</p>
<pre lang="java">package cc.ewings.sqllite;

import cc.ewings.lib.DBHelper;
import android.app.Activity;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class SQLiteTestActivity extends Activity {
	DBHelper dbHelper=new DBHelper(SQLiteTestActivity.this,"testDB",null,1);
	SQLiteDatabase db;
	int i=1;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        Button createBtn=(Button) this.findViewById(R.id.createBtn);
        Button addBtn=(Button) this.findViewById(R.id.addBtn);
        Button updateBtn=(Button) this.findViewById(R.id.updateBtn);
        Button selectBtn=(Button) this.findViewById(R.id.selectBtn);
        Button deleteBtn=(Button) this.findViewById(R.id.deleteBtn);

        createBtn.setOnClickListener(new CreateListener());
        addBtn.setOnClickListener(new AddListener());
        updateBtn.setOnClickListener(new UpdateListener());
        selectBtn.setOnClickListener(new SelectListener());
        deleteBtn.setOnClickListener(new DeleteListener());
    }

    class CreateListener implements OnClickListener{

		public void onClick(View arg0) {
			System.out.println("Create Database");
	        db= dbHelper.getWritableDatabase();
		}
    }

    class AddListener implements OnClickListener{
		public void onClick(View arg0) {
			System.out.println("Add Data");
			ContentValues value=new ContentValues();
			value.put("id", i++);
			value.put("name", "zhangshan");
			db=dbHelper.getWritableDatabase();
			db.insert("user", null, value);
		}
    }

    class UpdateListener implements OnClickListener{ 

		public void onClick(View arg0) {
			System.out.println("Insert Data");
			ContentValues value=new ContentValues();
			value.put("name", "lisi");
			db=dbHelper.getWritableDatabase();
			db.update("user", value, "id=?",new String[]{"1"});
		}
    }

    class SelectListener implements OnClickListener{ 

		public void onClick(View arg0) {
			System.out.println("Select Data");
			db=dbHelper.getReadableDatabase();
			Cursor cursor=db.query("user", new String[]{"id","name"}, null, null, null, null, null);
			while(cursor.moveToNext()){
				int id=cursor.getInt(cursor.getColumnIndex("id"));
				String name=cursor.getString(cursor.getColumnIndex("name"));
				System.out.println("id="+id+"  name="+name);
			}
		}
    }

    class DeleteListener implements OnClickListener{ 

		public void onClick(View arg0) {
			System.out.println("Delete Data");
			db=dbHelper.getWritableDatabase();
			db.delete("user", "id=?", new String[]{"1"});
		}
    }
}</pre>
<p>3 布局文件</p>
<pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" &gt;

    &lt;Button 
        android:id="@+id/createBtn"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Create Table"
        /&gt;
    &lt;Button 
        android:id="@+id/addBtn"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Add Data"
        /&gt;
    &lt;Button 
        android:id="@+id/updateBtn"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Update Data"
        /&gt;
    &lt;Button 
        android:id="@+id/selectBtn"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Select Data"
        /&gt;
    &lt;Button
        android:id="@+id/deleteBtn"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Delete Data"
        /&gt;

&lt;/LinearLayout&gt;</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.adamstudio.cn/index.php/2012/android_sqlite_jiao_cheng/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android:线程简单总结</title>
		<link>http://www.adamstudio.cn/index.php/2012/android_xian_cheng_jian_dan_zong_jie/</link>
		<comments>http://www.adamstudio.cn/index.php/2012/android_xian_cheng_jian_dan_zong_jie/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 04:52:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.adamstudio.cn/?p=841</guid>
		<description><![CDATA[伪线程（其实还是用的主线程） 1 Handler myHandler=new Handler {handleMessage(){}}定义内部匿名handler 注：super.handleMessage(msg);//注意：不能带着一句，否则报错 2 Runnable myRunnable=new Runnable(){run(){}}实现线程 3 myHandler.post(myRunnable) 开始线程，myHandler.removeCallbacks(myRunnable);终止线程 4 myHandler.postDelayed(1000) 线程推迟执行 5 Thread.sleep(1000) 在run()里暂停线程 6 在Run里传递参数给handler，hanler里的handleMessage会接收到消息，也可以在其中再次开始线程。 Message msg=myHandler.obtainMessage(); msg.arg1=progress; myHandler.sendMessage(msg); 真线程 用HandlerThread.getLooper()给继承自Handler的MyHandler，这样就可以开始一个新的线程了。MyHandler要起到两个作用：1 把looper传给父级；2 重写handleMessage来加上自己的逻辑 package cc.ewings.handlerTest; import android.app.Activity; import android.os.Bundle; import android.os.Handler; import android.os.HandlerThread; import android.os.Looper; import android.os.Message; import android.widget.Toast; public class LooperAndBoundle extends Activity { @Override protected void onCreate(Bundle [...]]]></description>
			<content:encoded><![CDATA[<h4>伪线程（其实还是用的主线程）</h4>
<p>1 Handler myHandler=new Handler {handleMessage(){}}定义内部匿名handler<br />
注：super.handleMessage(msg);//注意：不能带着一句，否则报错</p>
<p>2 Runnable myRunnable=new Runnable(){run(){}}实现线程</p>
<p>3 myHandler.post(myRunnable) 开始线程，myHandler.removeCallbacks(myRunnable);终止线程</p>
<p>4 myHandler.postDelayed(1000) 线程推迟执行</p>
<p>5 Thread.sleep(1000) 在run()里暂停线程</p>
<p>6 在Run里传递参数给handler，hanler里的handleMessage会接收到消息，也可以在其中再次开始线程。<br />
Message msg=myHandler.obtainMessage();<br />
msg.arg1=progress;<br />
myHandler.sendMessage(msg);</p>
<h4>真线程</h4>
<p>用HandlerThread.getLooper()给继承自Handler的MyHandler，这样就可以开始一个新的线程了。MyHandler要起到两个作用：1 把looper传给父级；2 重写handleMessage来加上自己的逻辑</p>
<pre lang="java">package cc.ewings.handlerTest;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;
import android.os.Message;
import android.widget.Toast;

public class LooperAndBoundle extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		HandlerThread handlerThread=new HandlerThread("my thread");
		handlerThread.start();
		MyHandler myHandler=new MyHandler(handlerThread.getLooper());
		Message msg=myHandler.obtainMessage();
		Bundle b=new Bundle();
		b.putString("name", "zhangsan");
		b.putInt("age", 30);
		msg.setData(b);
		msg.sendToTarget();
	}	

	class MyHandler extends Handler{
		public MyHandler(Looper looper){
			super(looper);
		}
		@Override
		public void handleMessage(Message msg) {
			// TODO Auto-generated method stub
			//super.handleMessage(msg);
			Bundle data=msg.getData();
			String name=(String) data.getString("name");
			int age=(int) data.getInt("age");
			Toast.makeText(LooperAndBoundle.this, "name: "+name+" age:"+age, Toast.LENGTH_LONG).show();
		}

	};
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.adamstudio.cn/index.php/2012/android_xian_cheng_jian_dan_zong_jie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android:RelativeLayout关键词</title>
		<link>http://www.adamstudio.cn/index.php/2012/android_relativelayout_guan_jian_ci/</link>
		<comments>http://www.adamstudio.cn/index.php/2012/android_relativelayout_guan_jian_ci/#comments</comments>
		<pubDate>Sun, 29 Apr 2012 06:43:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[我的观点]]></category>

		<guid isPermaLink="false">http://www.adamstudio.cn/?p=838</guid>
		<description><![CDATA[Attribute Name Related Method Description android:layout_above Positions the bottom edge of this view above the given anchor view ID. android:layout_alignBaseline Positions the baseline of this view on the baseline of the given anchor view ID. android:layout_alignBottom Makes the bottom edge of this view match the bottom edge of the given anchor view ID. android:layout_alignLeft Makes [...]]]></description>
			<content:encoded><![CDATA[<table id="lattrs">
<tbody>
<tr>
<td><em>Attribute Name</em></td>
<td><em>Related Method</em></td>
<td><em>Description</em></td>
</tr>
<tr>
<td><a href="file:///D:/sdks/android-sdk-windows/docs/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_above">android:layout_above</a></td>
<td></td>
<td width="100%">Positions the bottom edge of this view above the given anchor view ID.</td>
</tr>
<tr>
<td><a href="file:///D:/sdks/android-sdk-windows/docs/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_alignBaseline">android:layout_alignBaseline</a></td>
<td></td>
<td width="100%">Positions the baseline of this view on the baseline of the given anchor view ID.</td>
</tr>
<tr>
<td><a href="file:///D:/sdks/android-sdk-windows/docs/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_alignBottom">android:layout_alignBottom</a></td>
<td></td>
<td width="100%">Makes the bottom edge of this view match the bottom edge of the given anchor view ID.</td>
</tr>
<tr>
<td><a href="file:///D:/sdks/android-sdk-windows/docs/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_alignLeft">android:layout_alignLeft</a></td>
<td></td>
<td width="100%">Makes the left edge of this view match the left edge of the given anchor view ID.</td>
</tr>
<tr>
<td><a href="file:///D:/sdks/android-sdk-windows/docs/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_alignParentBottom">android:layout_alignParentBottom</a></td>
<td></td>
<td width="100%">If true, makes the bottom edge of this view match the bottom edge of the parent.</td>
</tr>
<tr>
<td><a href="file:///D:/sdks/android-sdk-windows/docs/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_alignParentLeft">android:layout_alignParentLeft</a></td>
<td></td>
<td width="100%">If true, makes the left edge of this view match the left edge of the parent.</td>
</tr>
<tr>
<td><a href="file:///D:/sdks/android-sdk-windows/docs/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_alignParentRight">android:layout_alignParentRight</a></td>
<td></td>
<td width="100%">If true, makes the right edge of this view match the right edge of the parent.</td>
</tr>
<tr>
<td><a href="file:///D:/sdks/android-sdk-windows/docs/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_alignParentTop">android:layout_alignParentTop</a></td>
<td></td>
<td width="100%">If true, makes the top edge of this view match the top edge of the parent.</td>
</tr>
<tr>
<td><a href="file:///D:/sdks/android-sdk-windows/docs/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_alignRight">android:layout_alignRight</a></td>
<td></td>
<td width="100%">Makes the right edge of this view match the right edge of the given anchor view ID.</td>
</tr>
<tr>
<td><a href="file:///D:/sdks/android-sdk-windows/docs/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_alignTop">android:layout_alignTop</a></td>
<td></td>
<td width="100%">Makes the top edge of this view match the top edge of the given anchor view ID.</td>
</tr>
<tr>
<td><a href="file:///D:/sdks/android-sdk-windows/docs/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_alignWithParentIfMissing">android:layout_alignWithParentIfMissing</a></td>
<td></td>
<td width="100%">If set to true, the parent will be used as the anchor when the anchor cannot be be found for layout_toLeftOf, layout_toRightOf, etc.</td>
</tr>
<tr>
<td><a href="file:///D:/sdks/android-sdk-windows/docs/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_below">android:layout_below</a></td>
<td></td>
<td width="100%">Positions the top edge of this view below the given anchor view ID.</td>
</tr>
<tr>
<td><a href="file:///D:/sdks/android-sdk-windows/docs/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_centerHorizontal">android:layout_centerHorizontal</a></td>
<td></td>
<td width="100%">If true, centers this child horizontally within its parent.</td>
</tr>
<tr>
<td><a href="file:///D:/sdks/android-sdk-windows/docs/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_centerInParent">android:layout_centerInParent</a></td>
<td></td>
<td width="100%">If true, centers this child horizontally and vertically within its parent.</td>
</tr>
<tr>
<td><a href="file:///D:/sdks/android-sdk-windows/docs/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_centerVertical">android:layout_centerVertical</a></td>
<td></td>
<td width="100%">If true, centers this child vertically within its parent.</td>
</tr>
<tr>
<td><a href="file:///D:/sdks/android-sdk-windows/docs/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_toLeftOf">android:layout_toLeftOf</a></td>
<td></td>
<td width="100%">Positions the right edge of this view to the left of the given anchor view ID.</td>
</tr>
<tr>
<td><a href="file:///D:/sdks/android-sdk-windows/docs/reference/android/widget/RelativeLayout.LayoutParams.html#attr_android:layout_toRightOf">android:layout_toRightOf</a></td>
<td></td>
<td width="100%">Positions the left edge of this view to the right of the given anchor view ID.</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.adamstudio.cn/index.php/2012/android_relativelayout_guan_jian_ci/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android:tablelayout简介</title>
		<link>http://www.adamstudio.cn/index.php/2012/android_tablelayout_jian_jie/</link>
		<comments>http://www.adamstudio.cn/index.php/2012/android_tablelayout_jian_jie/#comments</comments>
		<pubDate>Sun, 29 Apr 2012 03:21:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[我的观点]]></category>

		<guid isPermaLink="false">http://www.adamstudio.cn/?p=835</guid>
		<description><![CDATA[linear layout可以实现简单快速的横向布局，但复杂一点的布局更适合于用table layout。它的每个row就是一个view。 android:shrinkColumns和android:stretchColumns的值都是以0开始的index，但必须是string值，即用”1,2,5&#8243;来表示。可以用”*”来表示all columns。而且同一column可以同时设置为shrinkable和stretchable。 判断这些column是否shrinkable或stretchable，可以调用isColumnShrinkable/isColumnStretchable(int columnIndex)，isShrinkAllColumns()/isStretchAllColumns()。 而动态隐藏column，可以调用TableLayout.setColumnCollapsed (int columnIndex, boolean isCollapsed)来指定相应的column。另外TableLayout类的boolean isColumnCollapsed (int columnIndex)能够判断指定的column是否隐藏。 详细介绍和实例请见这里： http://android.blog.51cto.com/268543/314262]]></description>
			<content:encoded><![CDATA[<p>linear layout可以实现简单快速的横向布局，但复杂一点的布局更适合于用table layout。它的每个row就是一个view。</p>
<p>android:shrinkColumns和android:stretchColumns的值都是以0开始的index，但必须是string值，即用”1,2,5&#8243;来表示。可以用”*”来表示all columns。而且同一column可以同时设置为shrinkable和stretchable。</p>
<p>判断这些column是否shrinkable或stretchable，可以调用<strong>isColumnShrinkable/isColumnStretchable(int columnIndex)，isShrinkAllColumns()/isStretchAllColumns()</strong>。</p>
<p>而动态隐藏column，可以调用TableLayout.setColumnCollapsed (int columnIndex, boolean isCollapsed)来指定相应的column。另外TableLayout类的boolean isColumnCollapsed (int columnIndex)能够判断指定的column是否隐藏。</p>
<p>详细介绍和实例请见这里：</p>
<p><a href="http://android.blog.51cto.com/268543/314262">http://android.blog.51cto.com/268543/314262</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamstudio.cn/index.php/2012/android_tablelayout_jian_jie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>截获页面关闭的JS事件</title>
		<link>http://www.adamstudio.cn/index.php/2012/jie_huo_ye_mian_guan_bi_de_js_shi_jian/</link>
		<comments>http://www.adamstudio.cn/index.php/2012/jie_huo_ye_mian_guan_bi_de_js_shi_jian/#comments</comments>
		<pubDate>Sat, 28 Apr 2012 09:16:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[网络技术-Java Script]]></category>

		<guid isPermaLink="false">http://www.adamstudio.cn/?p=831</guid>
		<description><![CDATA[一看就明白： window.onbeforeunload=function (){alert(“关闭”)}; 测了下，IE9下没问题，其他浏览器没测。]]></description>
			<content:encoded><![CDATA[<p>一看就明白：<br />
window.onbeforeunload=function (){alert(“关闭”)};</p>
<p>测了下，IE9下没问题，其他浏览器没测。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamstudio.cn/index.php/2012/jie_huo_ye_mian_guan_bi_de_js_shi_jian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>解决：Android创建keystore时出现java.io.filenotfoundexception错误</title>
		<link>http://www.adamstudio.cn/index.php/2012/jie_jue_android_chuang_jian_keystore_shi_chu_xian_java_io_filenotfoundexception_cuo_wu/</link>
		<comments>http://www.adamstudio.cn/index.php/2012/jie_jue_android_chuang_jian_keystore_shi_chu_xian_java_io_filenotfoundexception_cuo_wu/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 13:45:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.adamstudio.cn/?p=828</guid>
		<description><![CDATA[android开发接近尾声时需要打包apk，如果想sign，那就要生成一个keystore文件。但出现java.io.filenotfoundexception错误. 后来发现是因为jdk安装在了c盘，系统有保护，不让生成文件。于是把jdk挪到D盘，再用命令： keytool -genkey -alias android.keystore -keyalg RSA -validity 100000 -keystore android.keystore 一步一步按提示来，果然成功生成了keystore文件。Oh yeah!]]></description>
			<content:encoded><![CDATA[<p>android开发接近尾声时需要打包apk，如果想sign，那就要生成一个keystore文件。但出现java.io.filenotfoundexception错误.</p>
<p>后来发现是因为jdk安装在了c盘，系统有保护，不让生成文件。于是把jdk挪到D盘，再用命令： <strong>keytool -genkey -alias android.keystore -keyalg RSA -validity 100000 -keystore android.keystore</strong></p>
<p>一步一步按提示来，果然成功生成了keystore文件。Oh yeah!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adamstudio.cn/index.php/2012/jie_jue_android_chuang_jian_keystore_shi_chu_xian_java_io_filenotfoundexception_cuo_wu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

