Normally, there are three type parser in android. Xmlpullparser, DOM & SAX. Google recomand Xmlpullparser to doing this. But to parser xml files or inputstream, it based on xml content. So using an general way to parser xml. BaseXmlObj: /************…
Develop network with HttpURLConnection & HttpClient. HttpURLConnection is lightweight with HttpClient. So normally, you just need HttpURLConnection. NetWork is a timer wast task, so it is better doing this at asynctask. package com.joyfulmath.androi…
Check & Get network status Normally, there will be two type with phone network: wifi & mobile(gprs,3g,4fg) So, we have can test connect and get the connect type. 1.check connect: public static boolean isOnline(Context context) { ConnectivityManage…
There are a lot of options when it comes to parsing XML on the iPhone. The iPhone SDK comes with two different libraries to choose from, and there are several popular third party libraries available such as TBXML, TouchXML, KissXML, TinyXML, and GDat…
Android color(颜色) 在XML文件和java代码中,有需要的朋友可以参考下. 1.使用Color类的常量,如: int color = Color.BLUE;//创建一个蓝色 是使用Android提供的颜色 int color = Color.RED; int color = Color.WHITE; 2.通过ARGB构建,如: int color = Color.argb(127, 255, 0, 255); //半透明的紫色其中第一个参数表示透明,0表示完全透明,255(ff)…