??xml version="1.0" encoding="utf-8" standalone="yes"?>撸视在线观看免费视频,美女永久在线网站,最新国产精品久久精品http://www.aygfsteel.com/anchor110/articles/410244.html一败涂?/dc:creator>一败涂?/author>Mon, 24 Feb 2014 05:18:00 GMThttp://www.aygfsteel.com/anchor110/articles/410244.htmlhttp://www.aygfsteel.com/anchor110/comments/410244.htmlhttp://www.aygfsteel.com/anchor110/articles/410244.html#Feedback0http://www.aygfsteel.com/anchor110/comments/commentRss/410244.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/410244.html
#google_android更新
203.208.46.146 dl.google.com
203.208.46.146 dl-ssl.google.com

windows上的hosts文g位置如下Q?br />
C:\Windows\system32\drivers\etc\hosts
?br />
C:\Windows\system64\drivers\etc\hosts

试修改是否成功的方法如下:(x)
ping dl.google.comQ如果返回的IP地址?03.208.46.146Q则证明修改成功?br />
此时再打开Android SDK ManagerE序Q执行更C下蝲。有可能q会(x)出现如下的问题:(x)
hostname in certificate didn't match: <dl-ssl.google.com> != <www.google.com> Fetching URL: https://dl-ssl.google.com/android/...

解决办法是:(x)
打开Android SDK ManagerQ选上方的菜单ToolsQ进入OptionsQ在“Force https://… ”前面打钩Q就可以更新了!





]]>
?SDK Manager.exe 无法更新 Android SDK Tools 的解军_?/title><link>http://www.aygfsteel.com/anchor110/articles/382969.html</link><dc:creator>一败涂?/dc:creator><author>一败涂?/author><pubDate>Thu, 12 Jul 2012 22:36:00 GMT</pubDate><guid>http://www.aygfsteel.com/anchor110/articles/382969.html</guid><wfw:comment>http://www.aygfsteel.com/anchor110/comments/382969.html</wfw:comment><comments>http://www.aygfsteel.com/anchor110/articles/382969.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/anchor110/comments/commentRss/382969.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/anchor110/services/trackbacks/382969.html</trackback:ping><description><![CDATA[注:(x)转蝲于:(x)<div>http://hi.baidu.com/yangw80/item/edaa03e9ba9eecc0bbf37d14</div><br /><div><div class="wmqeeuq" id="content" text-content="" clearfix"=""> <p>【故障描q?/p><p>执行 Android SDK 中的 SDK Manager.exe 更新 SDK Ӟ一切都利Q只?Android SDK Tools 无法更新?/p><p>q且Q下载也利Q能?android-sdk-windows\temp 下找C载完成的 tools_r18-windows.zipQ就是下载完成后安装Ӟ提示Q?/p><p>-= Warning! =-<br />A folder failed to be moved. On Windows this typically means that a program is using that folder (for example Windows Explorer or your anti-virus software.) Please momentarily deactivate your anti-virus software or close any running programs that may be accessing the directory 'E:\Android\android-sdk-windows\tools'. When ready, pess YES to try again.</p><p>此时Q根据提C关闭杀毒Y件或别的软g{都无法更新成功?/p><p> </p><p>【问题所在?/p><p>负责更新 Android SDK Tools 的工P恰恰在 tools 文g夹中Q所以导致了q个问题?/p><p> </p><p>【解军_法?/p><p>先关?SDK Manager.exe {Q何?android-sdk-windows 里面文g的Y?其要注意在d理器里面结?adb.exe)?/p><p>?tools 文g夹复制ƈ改名?tools.tmpQ双?yn)L?tools.tmp\android.batQ之后会(x)自动启动 Android SDK ManagerQ再更新 Android SDK Tools 便一切顺利?/p> </div></div><img src ="http://www.aygfsteel.com/anchor110/aggbug/382969.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/anchor110/" target="_blank">一败涂?/a> 2012-07-13 06:36 <a href="http://www.aygfsteel.com/anchor110/articles/382969.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Arrays.asList使用http://www.aygfsteel.com/anchor110/articles/362588.html一败涂?/dc:creator>一败涂?/author>Thu, 03 Nov 2011 02:18:00 GMThttp://www.aygfsteel.com/anchor110/articles/362588.htmlhttp://www.aygfsteel.com/anchor110/comments/362588.htmlhttp://www.aygfsteel.com/anchor110/articles/362588.html#Feedback0http://www.aygfsteel.com/anchor110/comments/commentRss/362588.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/362588.html1 String[] strings = {"xujiaolin""chengsk""caisiming"};
2 List<String> list = Arrays.asList(strings);
3 System.out.println(list.size());

]]>
java final关键解释http://www.aygfsteel.com/anchor110/articles/362585.html一败涂?/dc:creator>一败涂?/author>Thu, 03 Nov 2011 02:02:00 GMThttp://www.aygfsteel.com/anchor110/articles/362585.htmlhttp://www.aygfsteel.com/anchor110/comments/362585.htmlhttp://www.aygfsteel.com/anchor110/articles/362585.html#Feedback0http://www.aygfsteel.com/anchor110/comments/commentRss/362585.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/362585.html
解释如下Q?br />1、如果此对象指向一个常量:(x)
     例如Qfinal int a = 100;那么a的值永q是100?br />     后箋如果重新赋|会(x)报编译错误:(x)a = 200;

2、如果此对象指向一个变量:(x)
     例如Qfinal User admin = new User("administrator");那么代表adminq个对象引用不可改变。但是却可以改变他的属性倹{?br />    
     以下语句~译正确Q?br />     admin.setName("admin");

     以下语句~译错误Q?br />     admin = new User("zhangsan");

]]>
androidllistview的item讑֮高度http://www.aygfsteel.com/anchor110/articles/362387.html一败涂?/dc:creator>一败涂?/author>Mon, 31 Oct 2011 08:18:00 GMThttp://www.aygfsteel.com/anchor110/articles/362387.htmlhttp://www.aygfsteel.com/anchor110/comments/362387.htmlhttp://www.aygfsteel.com/anchor110/articles/362387.html#Feedback0http://www.aygfsteel.com/anchor110/comments/commentRss/362387.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/362387.htmlq行Q高度设|无效?br />

解决办法Q?br />litem讑֮minHeightQ即可?img src ="http://www.aygfsteel.com/anchor110/aggbug/362387.html" width = "1" height = "1" />

]]>
androidllistview讄分割UDivider样式 http://www.aygfsteel.com/anchor110/articles/362299.html一败涂?/dc:creator>一败涂?/author>Sat, 29 Oct 2011 15:47:00 GMThttp://www.aygfsteel.com/anchor110/articles/362299.htmlhttp://www.aygfsteel.com/anchor110/comments/362299.htmlhttp://www.aygfsteel.com/anchor110/articles/362299.html#Feedback2http://www.aygfsteel.com/anchor110/comments/commentRss/362299.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/362299.html
<ListView android:id="@+id/HomeListView" android:layout_width="fill_parent"
        android:layout_height="fill_parent" android:divider="#123"
        android:layout_margin="10dip"></ListView>

但运行后Q发现样式没起作用?br />
解决办法Q?br />llistview讄a(chn)ndroid:dividerHeight为非0卛_?br />
如:(x)
<ListView android:id="@+id/HomeListView" android:layout_width="fill_parent"
        android:layout_height="fill_parent" android:divider="#000"
        android:dividerHeight="1px"
        android:layout_margin="10dip"></ListView>


]]>
HttpUrlConnection通过代理讉K|络Q{Qhttp://www.iteye.com/problems/38978Q?/title><link>http://www.aygfsteel.com/anchor110/articles/360413.html</link><dc:creator>一败涂?/dc:creator><author>一败涂?/author><pubDate>Mon, 10 Oct 2011 09:52:00 GMT</pubDate><guid>http://www.aygfsteel.com/anchor110/articles/360413.html</guid><wfw:comment>http://www.aygfsteel.com/anchor110/comments/360413.html</wfw:comment><comments>http://www.aygfsteel.com/anchor110/articles/360413.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/anchor110/comments/commentRss/360413.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/anchor110/services/trackbacks/360413.html</trackback:ping><description><![CDATA[<div><ol start="1"><li><span>import java.io.IOException;   </span></li><li><span>import java.io.InputStream;   </span></li><li><span>import java.net.InetSocketAddress;   </span></li><li><span>import java.net.MalformedURLException;   </span></li><li><span>import java.net.Proxy;   </span></li><li><span>import java.net.ProxySelector;   </span></li><li><span>import java.net.SocketAddress;   </span></li><li><span>import java.net.URI;   </span></li><li><span>import java.net.URISyntaxException;   </span></li><li><span>import java.net.URL;   </span></li><li><span>import java.net.URLConnection;   </span></li><li><span>import java.util.List;   </span></li><li><span>import java.util.Properties;   </span></li><li>  </li><li><span>public class NetProxy   </span></li><li>{   </li><li><span>// 试本地JVM的网l缺省配|?nbsp;  </span></li><li><span>public void setLocalProxy()   </span></li><li>{   </li><li>Properties prop = System.getProperties();   </li><li><span>//讄http讉K要用的代理服务器的地址   </span></li><li>prop.setProperty(<span>"http.proxyHost", "10.10.0.96");   </span></li><li><span>//讄http讉K要用的代理服务器的端口   </span></li><li>prop.setProperty(<span>"http.proxyPort", "8080");   </span></li><li><span>//讄不需要通过代理服务器访问的LQ可以?通配W,多个地址用|分隔   </span></li><li>prop.setProperty(<span>"http.nonProxyHosts", "localhost|10.10.*");   </span></li><li>  </li><li><span>//讄安全讉K使用的代理服务器地址与端?nbsp;  </span></li><li><span>//它没有https.nonProxyHosts属性,它按照http.nonProxyHosts 中设|的规则讉K   </span></li><li>prop.setProperty(<span>"https.proxyHost", "10.10.0.96");   </span></li><li>prop.setProperty(<span>"https.proxyPort", "443");   </span></li><li>  </li><li><span>//使用ftp代理服务器的L、端口以?qing)不需要用ftp代理服务器的L   </span></li><li>prop.setProperty(<span>"ftp.proxyHost", "10.10.0.96");   </span></li><li>prop.setProperty(<span>"ftp.proxyPort", "2121");   </span></li><li>prop.setProperty(<span>"ftp.nonProxyHosts", "localhost|10.10.*");   </span></li><li>  </li><li><span>//socks代理服务器的地址与端?nbsp;  </span></li><li>prop.setProperty(<span>"socksProxyHost", "10.10.0.96");   </span></li><li>prop.setProperty(<span>"socksProxyPort", "1080");   </span></li><li>}   </li><li>  </li><li><span>// 清除proxy讄   </span></li><li><span>public void removeLocalProxy()   </span></li><li>{   </li><li>Properties prop = System.getProperties();   </li><li>prop.remove(<span>"http.proxyHost");   </span></li><li>prop.remove(<span>"http.proxyPort");   </span></li><li>prop.remove(<span>"http.nonProxyHosts");   </span></li><li>  </li><li>prop.remove(<span>"https.proxyHost");   </span></li><li>prop.remove(<span>"https.proxyPort");   </span></li><li>  </li><li>prop.remove(<span>"ftp.proxyHost");   </span></li><li>prop.remove(<span>"ftp.proxyPort");   </span></li><li>prop.remove(<span>"ftp.nonProxyHosts");   </span></li><li>  </li><li>prop.remove(<span>"socksProxyHost");   </span></li><li>prop.remove(<span>"socksProxyPort");   </span></li><li>}   </li><li>  </li><li><span>//   </span></li><li>  </li><li><span>// 试http   </span></li><li><span>public void showHttpProxy(Object... proxy)   </span></li><li>{   </li><li>URL url = <span>null;   </span></li><li><span>try   </span></li><li>{   </li><li>url = <span>new URL("http://blog.csdn.com/smallnest");   </span></li><li>}   </li><li><span>catch (MalformedURLException e)   </span></li><li>{   </li><li><span>return;   </span></li><li>}   </li><li><span>try   </span></li><li>{   </li><li>URLConnection conn = <span>null;   </span></li><li><span>switch (proxy.length)   </span></li><li>{   </li><li><span>case 0:   </span></li><li>conn = url.openConnection();   </li><li><span>break;   </span></li><li><span>case 1:   </span></li><li>conn = url.openConnection((Proxy) proxy[<span>0]);   </span></li><li><span>break;   </span></li><li><span>default:   </span></li><li><span>break;   </span></li><li>}   </li><li>  </li><li><span>if (conn == null)   </span></li><li><span>return;   </span></li><li>  </li><li>conn.setConnectTimeout(<span>3000); // 讄q接时旉   </span></li><li>InputStream in = conn.getInputStream();   </li><li><span>byte[] b = new byte[1024];   </span></li><li><span>try   </span></li><li>{   </li><li><span>while (in.read(b) > 0)   </span></li><li>{   </li><li>System.out.println(<span>new String(b));   </span></li><li>}   </li><li>}   </li><li><span>catch (IOException e1)   </span></li><li>{   </li><li>}   </li><li>}   </li><li><span>catch (IOException e1)   </span></li><li>{   </li><li>e1.printStackTrace();   </li><li>}   </li><li>  </li><li>}   </li><li>  </li><li><span>// 试ftp   </span></li><li><span>public void showFtpProxy(Object... proxy)   </span></li><li>{   </li><li>URL url = <span>null;   </span></li><li><span>try   </span></li><li>{   </li><li>url = <span>new URL("ftp://ftp.tsinghua.edu.cn");   </span></li><li>}   </li><li><span>catch (MalformedURLException e)   </span></li><li>{   </li><li><span>return;   </span></li><li>}   </li><li><span>try   </span></li><li>{   </li><li>URLConnection conn = <span>null;   </span></li><li><span>switch (proxy.length)   </span></li><li>{   </li><li><span>case 0:   </span></li><li>conn = url.openConnection();   </li><li><span>break;   </span></li><li><span>case 1:   </span></li><li>conn = url.openConnection((Proxy) proxy[<span>0]);   </span></li><li><span>break;   </span></li><li><span>default:   </span></li><li><span>break;   </span></li><li>}   </li><li>  </li><li><span>if (conn == null)   </span></li><li><span>return;   </span></li><li>  </li><li>conn.setConnectTimeout(<span>3000); // 讄q接时旉   </span></li><li>InputStream in = conn.getInputStream();   </li><li><span>byte[] b = new byte[1024];   </span></li><li><span>try   </span></li><li>{   </li><li><span>while (in.read(b) > 0)   </span></li><li>{   </li><li>System.out.println(<span>new String(b));   </span></li><li>}   </li><li>}   </li><li><span>catch (IOException e1)   </span></li><li>{   </li><li>}   </li><li>}   </li><li><span>catch (IOException e1)   </span></li><li>{   </li><li>e1.printStackTrace();   </li><li>}   </li><li>  </li><li>}   </li><li>  </li><li><span>// 得到一个proxy   </span></li><li><span>public Proxy getProxy(Proxy.Type type, String host, int port)   </span></li><li>{   </li><li>SocketAddress addr = <span>new InetSocketAddress(host,port);   </span></li><li>Proxy typeProxy = <span>new Proxy(type, addr);   </span></li><li><span>return typeProxy;   </span></li><li>}   </li><li>  </li><li><span>public static void main(String[] args)   </span></li><li>{   </li><li>NetProxy proxy = <span>new NetProxy();   </span></li><li><span>//试代理服务?nbsp;  </span></li><li>proxy.setLocalProxy();   </li><li>proxy.showHttpProxy();   </li><li>  </li><li><span>//下面两行是清除系l属性,而通过ProxycL定代理服务器   </span></li><li><span>// proxy.removeLocalProxy   </span></li><li><span>//proxy.showHttpProxy(proxy.getProxy(Proxy.Type.SOCKS,"10.10.0.96",1080));   </span></li><li>  </li><li>  </li><li>}   </li><li>}  <br /></li></ol></div><img src ="http://www.aygfsteel.com/anchor110/aggbug/360413.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/anchor110/" target="_blank">一败涂?/a> 2011-10-10 17:52 <a href="http://www.aygfsteel.com/anchor110/articles/360413.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Can't create handler inside thread that has not called Looper.prepare()http://www.aygfsteel.com/anchor110/articles/357626.html一败涂?/dc:creator>一败涂?/author>Wed, 31 Aug 2011 03:28:00 GMThttp://www.aygfsteel.com/anchor110/articles/357626.htmlhttp://www.aygfsteel.com/anchor110/comments/357626.htmlhttp://www.aygfsteel.com/anchor110/articles/357626.html#Feedback0http://www.aygfsteel.com/anchor110/comments/commentRss/357626.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/357626.htmlCan't create handler inside thread that has not called Looper.prepare()
问题原因Q?br />在android的多U程开发中Q比如asyncTaskQ在其doInBackground()Ҏ(gu)Q调用了更新UI的方法?br />
解决办法Q?br />把更新UI的操作,攑ֈ消息处理器中处理Q在doInBackground()Ҏ(gu)中发送更新消息:(x)
Handler updateDate = new Handler(){
         @Override
         public void handleMessage(Message msg) {
             switch(msg.what){
                 case LOADING_FINISHED:
                     listView.setAdapter(gameAdapter);
                     break;
             }
         }
     };


]]>
android ProgressBar动态添加样?/title><link>http://www.aygfsteel.com/anchor110/articles/357168.html</link><dc:creator>一败涂?/dc:creator><author>一败涂?/author><pubDate>Wed, 24 Aug 2011 02:52:00 GMT</pubDate><guid>http://www.aygfsteel.com/anchor110/articles/357168.html</guid><wfw:comment>http://www.aygfsteel.com/anchor110/comments/357168.html</wfw:comment><comments>http://www.aygfsteel.com/anchor110/articles/357168.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/anchor110/comments/commentRss/357168.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/anchor110/services/trackbacks/357168.html</trackback:ping><description><![CDATA[<div>bh_probar = new ProgressBar(context,null,android.R.attr.progressBarStyleHorizontal);</div><img src ="http://www.aygfsteel.com/anchor110/aggbug/357168.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/anchor110/" target="_blank">一败涂?/a> 2011-08-24 10:52 <a href="http://www.aygfsteel.com/anchor110/articles/357168.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>android中listview的刷新问?/title><link>http://www.aygfsteel.com/anchor110/articles/357102.html</link><dc:creator>一败涂?/dc:creator><author>一败涂?/author><pubDate>Tue, 23 Aug 2011 03:11:00 GMT</pubDate><guid>http://www.aygfsteel.com/anchor110/articles/357102.html</guid><wfw:comment>http://www.aygfsteel.com/anchor110/comments/357102.html</wfw:comment><comments>http://www.aygfsteel.com/anchor110/articles/357102.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/anchor110/comments/commentRss/357102.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/anchor110/services/trackbacks/357102.html</trackback:ping><description><![CDATA[在做listview的时候,l常需要增删改查底层的数据。当数据发生变化Ӟ需要发出通知Qlistview才会(x)自动h?br />通知的方法是Q?br /><div>notifyDataSetChanged();</div><img src ="http://www.aygfsteel.com/anchor110/aggbug/357102.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/anchor110/" target="_blank">一败涂?/a> 2011-08-23 11:11 <a href="http://www.aygfsteel.com/anchor110/articles/357102.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>android模拟器输入中文问?/title><link>http://www.aygfsteel.com/anchor110/articles/356374.html</link><dc:creator>一败涂?/dc:creator><author>一败涂?/author><pubDate>Fri, 12 Aug 2011 07:01:00 GMT</pubDate><guid>http://www.aygfsteel.com/anchor110/articles/356374.html</guid><wfw:comment>http://www.aygfsteel.com/anchor110/comments/356374.html</wfw:comment><comments>http://www.aygfsteel.com/anchor110/articles/356374.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/anchor110/comments/commentRss/356374.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/anchor110/services/trackbacks/356374.html</trackback:ping><description><![CDATA[Ҏ(gu)Q?br />在文本输入框中,长按Q即?x)弹入法选择框,选择适合的中文输入法Q完毕?img src ="http://www.aygfsteel.com/anchor110/aggbug/356374.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/anchor110/" target="_blank">一败涂?/a> 2011-08-12 15:01 <a href="http://www.aygfsteel.com/anchor110/articles/356374.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>activity中onResume()的用?/title><link>http://www.aygfsteel.com/anchor110/articles/356315.html</link><dc:creator>一败涂?/dc:creator><author>一败涂?/author><pubDate>Thu, 11 Aug 2011 09:10:00 GMT</pubDate><guid>http://www.aygfsteel.com/anchor110/articles/356315.html</guid><wfw:comment>http://www.aygfsteel.com/anchor110/comments/356315.html</wfw:comment><comments>http://www.aygfsteel.com/anchor110/articles/356315.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/anchor110/comments/commentRss/356315.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/anchor110/services/trackbacks/356315.html</trackback:ping><description><![CDATA[描述Q?br />今天在做一个功能的时候,从Aactivity跛_Bactivity?br />׃Bactivity的操作,影响了Aactivity的数据,所以再回到A的时候,需要A能够q行h操作?br />但是默认跛_ȝ时候,A界面q是上次那个?br /><br />解决Ҏ(gu)Q?br />重写Aactivity的onResume()Ҏ(gu)Q在onResume()斚w里进行刷新操作。因为按照activity的生命周期模型,当activity恢复的时候,onResume()Ҏ(gu)?x)被调用Q所以这是一个刷新的好机?x)?img src ="http://www.aygfsteel.com/anchor110/aggbug/356315.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/anchor110/" target="_blank">一败涂?/a> 2011-08-11 17:10 <a href="http://www.aygfsteel.com/anchor110/articles/356315.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>spinner中ArrayAdapter中传递对象的用法http://www.aygfsteel.com/anchor110/articles/356250.html一败涂?/dc:creator>一败涂?/author>Wed, 10 Aug 2011 08:57:00 GMThttp://www.aygfsteel.com/anchor110/articles/356250.htmlhttp://www.aygfsteel.com/anchor110/comments/356250.htmlhttp://www.aygfsteel.com/anchor110/articles/356250.html#Feedback0http://www.aygfsteel.com/anchor110/comments/commentRss/356250.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/356250.html一般情况下Q我们会(x)用ArrayList<String>来填充Spinner中的Adapter?br />但有Ӟ我们需要传递一些对象,比如选择用户的时候,昄的是用户名,但我们要处理的是用户ID?br />q时侯如果用ArrayList<String>Q则不能满我们的需求,因ؓ(f)QID没地方储存?br />
查阅APIQ发现ArrayAdapter的类声明为ArrayAdapter<T>Q说明,我们可以把T替换成我们想要的对象?br />
于是我们可以构徏如下的语句:(x)
ArrayList<User> users = new ArrayList<User>();
ArrayAdapter<Group> adapter = new ArrayAdapter<Group>(
                this,
                android.R.layout.simple_spinner_item,
                users
                );
但这时有?x)遇C个问题,既然你传递过来的是一个objQ但我的要求是:(x)昄用name昄Q处理用idQ这个怎么实现咧?br />{案是,重写User的toString()Ҏ(gu)Q只q回name。这样就能满x们的需求啦?/div>当然Q这只是一U简单的做法Q一般情况下Q还有另一U写法,是重写adapter?img src ="http://www.aygfsteel.com/anchor110/aggbug/356250.html" width = "1" height = "1" />

]]>android anr原因之一http://www.aygfsteel.com/anchor110/articles/356157.html一败涂?/dc:creator>一败涂?/author>Tue, 09 Aug 2011 10:34:00 GMThttp://www.aygfsteel.com/anchor110/articles/356157.htmlhttp://www.aygfsteel.com/anchor110/comments/356157.htmlhttp://www.aygfsteel.com/anchor110/articles/356157.html#Feedback0http://www.aygfsteel.com/anchor110/comments/commentRss/356157.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/356157.html做国际化Ӟ在values和values-zh-rcn中,都包含了一份strings.xmlQ而且q两份完全相同?br />后来在values-zh-rcn中新增了一个string|但没有对values文g中的strings.xml做相应修攏V?br />
于是在英文环境下Q引用到那个新增的string值时Qandroid报出了难看的anr错误?img src ="http://www.aygfsteel.com/anchor110/aggbug/356157.html" width = "1" height = "1" />

]]>
java.net.ProtocolExceptionhttp://www.aygfsteel.com/anchor110/articles/355875.html一败涂?/dc:creator>一败涂?/author>Fri, 05 Aug 2011 07:53:00 GMThttp://www.aygfsteel.com/anchor110/articles/355875.htmlhttp://www.aygfsteel.com/anchor110/comments/355875.htmlhttp://www.aygfsteel.com/anchor110/articles/355875.html#Feedback0http://www.aygfsteel.com/anchor110/comments/commentRss/355875.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/355875.html做androidd功能Ӟ向服务器发送一个登录验证请求,利用的通信是自己包装的http通信c,里面有代码如下:(x)
URL url = new URL(reqAddress);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setConnectTimeout(5000);
conn.setReadTimeout(6000);
conn.setRequestMethod("post");

一q行Qlogcat报错如下Q?br />
java.net.ProtocolException


解决办法Q?br />修改post为大写POST?br />
说明Q?br />

httpURLConnection.setRequestMethod("POST");

setRequestMethodҎ(gu)的参数值必d?例如GET,POST{?




]]>
java.net.ConnectException: localhost/127.0.0.1:8088 - Connection refusedhttp://www.aygfsteel.com/anchor110/articles/355872.html一败涂?/dc:creator>一败涂?/author>Fri, 05 Aug 2011 07:39:00 GMThttp://www.aygfsteel.com/anchor110/articles/355872.htmlhttp://www.aygfsteel.com/anchor110/comments/355872.htmlhttp://www.aygfsteel.com/anchor110/articles/355872.html#Feedback6http://www.aygfsteel.com/anchor110/comments/commentRss/355872.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/355872.html在做注册功能的时候,向本地服务器Q?27.0.0.1发送注册请求,logcat昄出错信息Q?br />
java.net.ConnectException: localhost/127.0.0.1:8088 - Connection refused

解决办法Q?br />弃用127.0.0.1来访问服务器Q改用本机的真实IP?br />
问题解释Q?br />摘自:http://80x86.iteye.com/blog/539356
android模拟器(simulatorQ把它自׃Zlocalhost,也就是说Q代码中使用localhost或?27.0.0.1来访问,都是讉K模拟器自己!q是不行的!

如果你想在模拟器simulator上面讉K你的?sh)脑Q那么就使用android内置的IP 10.0.2.2 吧,  10.0.2.2 是模拟器讄的特定ipQ是你的?sh)脑的别名alias

CQ在模拟器上?0.0.2.2讉K你的?sh)脑本机?/p>



]]>
Android中引入第三方Jar包的Ҏ(gu)(java.lang.NoClassDefFoundError解决办法)http://www.aygfsteel.com/anchor110/articles/355699.html一败涂?/dc:creator>一败涂?/author>Wed, 03 Aug 2011 10:46:00 GMThttp://www.aygfsteel.com/anchor110/articles/355699.htmlhttp://www.aygfsteel.com/anchor110/comments/355699.htmlhttp://www.aygfsteel.com/anchor110/articles/355699.html#Feedback16http://www.aygfsteel.com/anchor110/comments/commentRss/355699.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/355699.html2、将引用的第三方包,dq工作的build path?br />3、(关键的一步)(j)lib设ؓ(f)源文件夹。如果不讄Q则E序~译可以通过Q但q行的时候,?x)报Q?div>    java.lang.NoClassDefFoundError


]]>
android.content.res.Resources$NotFoundException:String resource ID #0x86http://www.aygfsteel.com/anchor110/articles/355670.html一败涂?/dc:creator>一败涂?/author>Wed, 03 Aug 2011 05:42:00 GMThttp://www.aygfsteel.com/anchor110/articles/355670.htmlhttp://www.aygfsteel.com/anchor110/comments/355670.htmlhttp://www.aygfsteel.com/anchor110/articles/355670.html#Feedback14http://www.aygfsteel.com/anchor110/comments/commentRss/355670.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/355670.html
android.content.res.Resources$NotFoundException:String resource ID #0x86

LogCat昄出错行是Q?br />
if (bet.getStatus() != null) {
            holder.statusView.setText(bet.getStatus());
}

开始的时候,L找不出原因?br />后来发现错误原因是:(x)
           bet.getStatus()q回的是IntegercdQ{成StringcdQ即可,如下Q?nbsp;         
           holder.statusView.setText("" + bet.getStatus());


]]>
listView.setTextFilterEnabled(boolean testFilterEnabled)的作?/title><link>http://www.aygfsteel.com/anchor110/articles/354046.html</link><dc:creator>一败涂?/dc:creator><author>一败涂?/author><pubDate>Sun, 10 Jul 2011 10:09:00 GMT</pubDate><guid>http://www.aygfsteel.com/anchor110/articles/354046.html</guid><wfw:comment>http://www.aygfsteel.com/anchor110/comments/354046.html</wfw:comment><comments>http://www.aygfsteel.com/anchor110/articles/354046.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/anchor110/comments/commentRss/354046.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/anchor110/services/trackbacks/354046.html</trackback:ping><description><![CDATA[<div><h4>API解释是:(x)<br /></h4><h4>public void setTextFilterEnabled <span>(boolean textFilterEnabled)</span> </h4> <div> <div jd-tagdescr=""> <p>Enables or disables the type filter window. If enabled, typing when this view has focus will filter the children to match the users input. Note that the <a href="../../../reference/android/widget/Adapter.html">Adapter</a> used by this view must implement the <a href="../../../reference/android/widget/Filterable.html">Filterable</a> interface</p><p>中文意思就是:(x)讄是否可以通过键盘输入的字W来qo(h)掉不需要的选项Q定位到需要的选项?br /></p></div></div></div><img src ="http://www.aygfsteel.com/anchor110/aggbug/354046.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/anchor110/" target="_blank">一败涂?/a> 2011-07-10 18:09 <a href="http://www.aygfsteel.com/anchor110/articles/354046.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用java实现|络传输数据的压~(来源|络Q?/title><link>http://www.aygfsteel.com/anchor110/articles/348441.html</link><dc:creator>一败涂?/dc:creator><author>一败涂?/author><pubDate>Sun, 17 Apr 2011 07:59:00 GMT</pubDate><guid>http://www.aygfsteel.com/anchor110/articles/348441.html</guid><wfw:comment>http://www.aygfsteel.com/anchor110/comments/348441.html</wfw:comment><comments>http://www.aygfsteel.com/anchor110/articles/348441.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/anchor110/comments/commentRss/348441.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/anchor110/services/trackbacks/348441.html</trackback:ping><description><![CDATA[import   java.io.*; <br /> import   java.util.zip.*; <br /> <br /> public   class   GZIProc   { <br />     public   static   void   main(String[]   args)   { <br />         <br />         byte[]   b1   ,b2   =   null; <br />         try   { <br />           <br />             BufferedInputStream   in   =   new   BufferedInputStream(   new   FileInputStream(args[0])); <br />             ByteArrayOutputStream   bout   =   new   ByteArrayOutputStream(); <br />             GZIPOutputStream   out   =   new   GZIPOutputStream(bout); <br />             ObjectOutputStream   oout   =   new   ObjectOutputStream(out); <br />             //   d源文?<br />             b1   =   new   byte[in.available()];     <br />             in.read(b1,0,b1.length);             <br />             System.out.println( "压羃?\n "   +   new   String(b1)); <br />                         <br />             //   压羃 <br />             //out.write(b1,0,   b1.length); <br />             oout.writeObject(new   String(b1)); <br />             oout.flush(); <br />             oout.close(); <br />             <br />             //   d压羃字节?<br />             b2   =   bout.toByteArray(); <br />             <br />             System.out.println( "压羃?\n "   +   new   String(b2)); <br />             //   关闭数据?<br />             in.close(); <br />                   <br />             //   解压 <br />             ObjectInputStream   in2   =   new   ObjectInputStream(new   GZIPInputStream(new   ByteArrayInputStream(b2))); <br />             byte[]   b3   =   ((String)in2.readObject()).getBytes(); <br />             in2.close(); <br />             <br />             //   输出 <br />             System.out.println(   new   String(b3)); <br />         }   catch(Exception   e)   { <br />             e.printStackTrace(); <br />         } <br />     } <br /> } <br /> <img src ="http://www.aygfsteel.com/anchor110/aggbug/348441.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/anchor110/" target="_blank">一败涂?/a> 2011-04-17 15:59 <a href="http://www.aygfsteel.com/anchor110/articles/348441.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Android library projects cannot be launchedhttp://www.aygfsteel.com/anchor110/articles/343663.html一败涂?/dc:creator>一败涂?/author>Thu, 27 Jan 2011 05:14:00 GMThttp://www.aygfsteel.com/anchor110/articles/343663.htmlhttp://www.aygfsteel.com/anchor110/comments/343663.htmlhttp://www.aygfsteel.com/anchor110/articles/343663.html#Feedback1http://www.aygfsteel.com/anchor110/comments/commentRss/343663.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/343663.html
  1. In the Package Explorer, right-click the library project and select Properties.
  2. In the Properties window, select the "Android" properties group at left and locate the Library properties at right.
  3. Select the "is Library" checkbox and click Apply.
  4. Click OK to close the Properties window.




]]>
android打印日志Z文ؕ?/title><link>http://www.aygfsteel.com/anchor110/articles/342452.html</link><dc:creator>一败涂?/dc:creator><author>一败涂?/author><pubDate>Thu, 06 Jan 2011 12:54:00 GMT</pubDate><guid>http://www.aygfsteel.com/anchor110/articles/342452.html</guid><wfw:comment>http://www.aygfsteel.com/anchor110/comments/342452.html</wfw:comment><comments>http://www.aygfsteel.com/anchor110/articles/342452.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/anchor110/comments/commentRss/342452.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/anchor110/services/trackbacks/342452.html</trackback:ping><description><![CDATA[描述Q?br />     通过|络获取xmlQ将xml昄在TextView中,中文无ؕ?用Log.i()打印出来Q中文ؕ码?br /> 解释Q?br />     文字~码D的,TextView?x)帮忙你decodeQ但是Log.i()是linux底层的东西,不支持中文?br /> <img src ="http://www.aygfsteel.com/anchor110/aggbug/342452.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/anchor110/" target="_blank">一败涂?/a> 2011-01-06 20:54 <a href="http://www.aygfsteel.com/anchor110/articles/342452.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>android 获取ListView列中的一个ITEM?/title><link>http://www.aygfsteel.com/anchor110/articles/342315.html</link><dc:creator>一败涂?/dc:creator><author>一败涂?/author><pubDate>Tue, 04 Jan 2011 14:45:00 GMT</pubDate><guid>http://www.aygfsteel.com/anchor110/articles/342315.html</guid><wfw:comment>http://www.aygfsteel.com/anchor110/comments/342315.html</wfw:comment><comments>http://www.aygfsteel.com/anchor110/articles/342315.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/anchor110/comments/commentRss/342315.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/anchor110/services/trackbacks/342315.html</trackback:ping><description><![CDATA[如果SimpleAdapter里放q去的是Map<String,Object>的话(一般都是这U格? <br /> <pre name="code" class="java"><你的LiveView名称>.setOnItemClickListener(new OnItemClickListener() {<br />     public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {<br />         Map<String, Object> map = (Map<String, Object>) <你的LiveView名称>.getItemAtPosition(arg2);<br />     }<br /> });<br /> <br /> </pre> <img src ="http://www.aygfsteel.com/anchor110/aggbug/342315.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/anchor110/" target="_blank">一败涂?/a> 2011-01-04 22:45 <a href="http://www.aygfsteel.com/anchor110/articles/342315.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JAVA解析XML字符?/title><link>http://www.aygfsteel.com/anchor110/articles/342312.html</link><dc:creator>一败涂?/dc:creator><author>一败涂?/author><pubDate>Tue, 04 Jan 2011 13:57:00 GMT</pubDate><guid>http://www.aygfsteel.com/anchor110/articles/342312.html</guid><wfw:comment>http://www.aygfsteel.com/anchor110/comments/342312.html</wfw:comment><comments>http://www.aygfsteel.com/anchor110/articles/342312.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/anchor110/comments/commentRss/342312.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/anchor110/services/trackbacks/342312.html</trackback:ping><description><![CDATA[<div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #008080;">1</span> <span style="color: #000000;">DocumentBuilderFactory docBuilderFactory </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000ff;">null</span><span style="color: #000000;">;<br /> </span><span style="color: #008080;">2</span> <span style="color: #000000;">DocumentBuilder docBuilder </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000ff;">null</span><span style="color: #000000;">;<br /> </span><span style="color: #008080;">3</span> <span style="color: #000000;">Document doc </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000ff;">null</span><span style="color: #000000;">;<br /> </span><span style="color: #008080;">4</span> <span style="color: #000000;">docBuilderFactory </span><span style="color: #000000;">=</span><span style="color: #000000;"> DocumentBuilderFactory.newInstance();<br /> </span><span style="color: #008080;">5</span> <span style="color: #000000;">docBuilder </span><span style="color: #000000;">=</span><span style="color: #000000;"> docBuilderFactory.newDocumentBuilder();<br /> </span><span style="color: #008080;">6</span> <span style="color: #000000;">InputStream inputStream </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000ff;">new</span><span style="color: #000000;"> ByteArrayInputStream(xml.getBytes());</span><span style="color: #008000;">//</span><span style="color: #008000;">xml解析的字W串</span><span style="color: #008000;"><br /> </span><span style="color: #008080;">7</span> <span style="color: #000000;">doc </span><span style="color: #000000;">=</span><span style="color: #000000;"> docBuilder.parse(inputStream);</span></div> <img src ="http://www.aygfsteel.com/anchor110/aggbug/342312.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/anchor110/" target="_blank">一败涂?/a> 2011-01-04 21:57 <a href="http://www.aygfsteel.com/anchor110/articles/342312.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>自定义ListViewhttp://www.aygfsteel.com/anchor110/articles/342207.html一败涂?/dc:creator>一败涂?/author>Mon, 03 Jan 2011 09:53:00 GMThttp://www.aygfsteel.com/anchor110/articles/342207.htmlhttp://www.aygfsteel.com/anchor110/comments/342207.htmlhttp://www.aygfsteel.com/anchor110/articles/342207.html#Feedback0http://www.aygfsteel.com/anchor110/comments/commentRss/342207.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/342207.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
 
  <TextView
    android:text="@+id/TextView01"
    android:id="@+id/TextView01"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    />
  <ImageButton
    android:id="@+id/ImageButton01"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    />
</LinearLayout>


MySource.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
public class MySource extends Activity 
{
  private ArrayList<String> dt=new ArrayList<String>();
  
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

for(int i=0;i<10;i++)
{
  dt.add("A"+i);
}

MyAdapter adapter=new MyAdapter(MySource.this, dt);

ListView lv=(ListView)findViewById(R.id.ListView01);
lv.setAdapter(adapter);
}
 
}
 
class MyAdapter extends BaseAdapter
{
  private Context context;
  private LayoutInflater m_inflater;
  private ArrayList<String> dt;
  
  public MyAdapter(Context context, ArrayList<String> dt)
  {
    m_inflater = LayoutInflater.from(context);
    this.context=context;
    this.dt=dt;
  }
  
  @Override
  public int getCount()
  {
    return dt.size();
  }
 
  @Override
  public Object getItem(int arg0)
  {
    return dt.get(arg0);
  }
 
  @Override
  public long getItemId(int position)
  {
    return position;
  }
 
  @Override
  public View getView(int position, View convertView, ViewGroup parent)
  {
    if(convertView==null)
    {
      convertView=m_inflater.inflate(R.layout.lite_item, null);
    }
    
    final TextView tv=(TextView)convertView.findViewById(R.id.TextView01);
    ImageButton ib=(ImageButton)convertView.findViewById(R.id.ImageButton01);
    
    tv.setText(dt.get(position));
    ib.setBackgroundDrawable(convertView.getResources().getDrawable(android.R.drawable.btn_dialog));
    
    ib.setOnClickListener(new OnClickListener()
    {
      @Override
      public void onClick(View v)
      {
        tv.setText("Click!!!");
      }
    });
    
    return convertView;
  }
}


]]>
android:paddingLeft与android:layout_marginLeft的区?注{载于http://hi.baidu.com/fynancywin/blog/item/2701214bf95a263baec3ab46.html)http://www.aygfsteel.com/anchor110/articles/342206.html一败涂?/dc:creator>一败涂?/author>Mon, 03 Jan 2011 09:51:00 GMThttp://www.aygfsteel.com/anchor110/articles/342206.htmlhttp://www.aygfsteel.com/anchor110/comments/342206.htmlhttp://www.aygfsteel.com/anchor110/articles/342206.html#Feedback0http://www.aygfsteel.com/anchor110/comments/commentRss/342206.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/342206.html当按钮分别设|以上两个属性时Q得到的效果是不一L(fng)?/p>

android:paddingLeft="30px"

按钮上设|的内容Q例如图片)(j)L钮左边边?0个像?/p>

android:layout_marginLeft="30px"

整个按钮d边设|的内容30个像?

]]>
android通过字符串标识加载资?/title><link>http://www.aygfsteel.com/anchor110/articles/342170.html</link><dc:creator>一败涂?/dc:creator><author>一败涂?/author><pubDate>Sun, 02 Jan 2011 12:15:00 GMT</pubDate><guid>http://www.aygfsteel.com/anchor110/articles/342170.html</guid><wfw:comment>http://www.aygfsteel.com/anchor110/comments/342170.html</wfw:comment><comments>http://www.aygfsteel.com/anchor110/articles/342170.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/anchor110/comments/commentRss/342170.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/anchor110/services/trackbacks/342170.html</trackback:ping><description><![CDATA[int i=  getResources().getIdentifier("icon", "drawable", getPackageName()) ;<br /> if(i>0)<br />    {Log.i("aa","aa");}<br /> else<br />    {Log.i("vbv","aa");}<br /> <p>或?/p> <p>int resID = getResources().getIdentifier("org.loveandroid.androidtest:drawable/icon",null,null);</p> <p><span id="wmqeeuq" class="kw4">int</span> resID = getResources<span id="wmqeeuq" class="br0">(</span><span id="wmqeeuq" class="br0">)</span>.<span id="wmqeeuq" class="me1">getIdentifier</span><span id="wmqeeuq" class="br0">(</span><span id="wmqeeuq" class="st0">"</span>icon<span id="wmqeeuq" class="st0">"</span>, <span id="wmqeeuq" class="st0">"drawable"</span>, <span id="wmqeeuq" class="st0">"org.anddev.android.testproject"</span><span id="wmqeeuq" class="br0">)</span>;</p> <p>详细请参考:(x)http://wang-peng1.javaeye.com/blog/566362<br /> </p> <br /> <img src ="http://www.aygfsteel.com/anchor110/aggbug/342170.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/anchor110/" target="_blank">一败涂?/a> 2011-01-02 20:15 <a href="http://www.aygfsteel.com/anchor110/articles/342170.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于Android横竖屏切换的解决Ҏ(gu)http://www.aygfsteel.com/anchor110/articles/339353.html一败涂?/dc:creator>一败涂?/author>Mon, 29 Nov 2010 15:25:00 GMThttp://www.aygfsteel.com/anchor110/articles/339353.htmlhttp://www.aygfsteel.com/anchor110/comments/339353.htmlhttp://www.aygfsteel.com/anchor110/articles/339353.html#Feedback1http://www.aygfsteel.com/anchor110/comments/commentRss/339353.htmlhttp://www.aygfsteel.com/anchor110/services/trackbacks/339353.html在开发游戏的时候,有些 游戏是只能横屏玩的,所以手机竖立放|的时候,要保持游戏画面依然横屏。要做到q个要求其实很简单,在AndroidManifest.xml里面配置一 下就可以了。加入这一行android:screenOrientation="landscape"?/p>

例如Qlandscape是横向,portrait是纵向)(j)Q?/p>

<?xml version="1.0" encoding="utf-8"?>  
<manifest xmlns:android="http://schemas.android.com/apk/res/android"  
#       
package="com.ray.linkit"  
#       android:versionCode
="1"  
#       android:versionName
="1.0">  
#     
<application android:icon="@drawable/icon" android:label="@string/app_name">  
#         
<activity android:name=".Main"  
#                   android:label
="@string/app_name"  
#                   android:screenOrientation
="portrait">  
#             
<intent-filter>  
#                 
<action android:name="android.intent.action.MAIN" />  
#                 
<category android:name="android.intent.category.LAUNCHER" />  
#             
</intent-filter>  
#         
</activity>  
#                 
<activity android:name=".GamePlay"  
#                 android:screenOrientation
="portrait"></activity>  
#                 
<activity android:name=".OptionView"  
#                 android:screenOrientation
="portrait"></activity>  
#     
</application>  
#     
<uses-sdk android:minSdkVersion="3" /> 
</manifest> 


另外Qandroid中每ơ屏q的切换动会(x)重启ActivityQ所以应该在Activity销毁前保存当前zd的状态,在Activity再次Create的时候蝲入配|,那样Q进行中的游戏就不会(x)自动重启了!


]]>
Android开发技巧之退出应用程序的另两U方?/title><link>http://www.aygfsteel.com/anchor110/articles/339145.html</link><dc:creator>一败涂?/dc:creator><author>一败涂?/author><pubDate>Fri, 26 Nov 2010 09:32:00 GMT</pubDate><guid>http://www.aygfsteel.com/anchor110/articles/339145.html</guid><wfw:comment>http://www.aygfsteel.com/anchor110/comments/339145.html</wfw:comment><comments>http://www.aygfsteel.com/anchor110/articles/339145.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/anchor110/comments/commentRss/339145.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/anchor110/services/trackbacks/339145.html</trackback:ping><description><![CDATA[finish();Ҏ(gu)是关闭当前的Activity?br /> 以下两种是将<span class="t_tag">应用</span><span class="t_tag">E序</span>d关闭。干掉进E?br /> <span class="t_tag">android</span>.os.Process.killProcess(android.os.Process.myPid());<br /> System.exit(0); <img src ="http://www.aygfsteel.com/anchor110/aggbug/339145.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/anchor110/" target="_blank">一败涂?/a> 2010-11-26 17:32 <a href="http://www.aygfsteel.com/anchor110/articles/339145.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>INSTALL_FAILED_INSUFFICIENT_STORAGE调试错误的解冻I注:(x)转蝲于http://tonyyu.javaeye.com/blog/716767Q?/title><link>http://www.aygfsteel.com/anchor110/articles/338604.html</link><dc:creator>一败涂?/dc:creator><author>一败涂?/author><pubDate>Sun, 21 Nov 2010 06:03:00 GMT</pubDate><guid>http://www.aygfsteel.com/anchor110/articles/338604.html</guid><wfw:comment>http://www.aygfsteel.com/anchor110/comments/338604.html</wfw:comment><comments>http://www.aygfsteel.com/anchor110/articles/338604.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/anchor110/comments/commentRss/338604.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/anchor110/services/trackbacks/338604.html</trackback:ping><description><![CDATA[2.2之前的所有模拟器都会(x)遇到的问?机器内存的瓶?当apk大于我们的机器内存时,模拟器无情的抛出 <p>Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE<br /> Please check logcat output for more details.<br /> Launch canceled!</p> <p>让我们无法调?/p> <p>     现在我们来根治这个问题,解决Ҏ(gu)有两U?/p> <p>     </p> <p>     W一U?仅限apk于机器内存Qƈ且已安装上当前apkQ只是无法再ơdebug)</p> <p><span style="color: #ff0000;">启动<span id="wmqeeuq" class="t_tag">模拟</span>器,然后q入菜单<br /> settings->applications->mange<br /> applications-> select the application->select "unistall".<br /> q样pd删除了,然后再重新安装这个apk没问题?/span></p> <p> </p> <p><span style="color: #ff0000;">   </span><span style="color: #000000;"> W二U?通用)</span></p> <p><span style="color: #ff0000;">-partition-size 128 </span></p> <p> </p> <p><span style="color: #ff0000;">Eclipse中在目Target的Options中添加?/span></p> <img src ="http://www.aygfsteel.com/anchor110/aggbug/338604.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/anchor110/" target="_blank">一败涂?/a> 2010-11-21 14:03 <a href="http://www.aygfsteel.com/anchor110/articles/338604.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ຣʡ</a>| <a href="http://" target="_blank">ʯ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ר</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ʯɽ</a>| <a href="http://" target="_blank">޻</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Դ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ͬ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">̳</a>| <a href="http://" target="_blank">ַ</a>| <a href="http://" target="_blank">ʦ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">°</a>| <a href="http://" target="_blank">Ž</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">鶴</a>| <a href="http://" target="_blank">Ȫ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">÷ӿ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>