摘要: <?php $REQUEST_METHOD = $_SERVER['REQUEST_METHOD']; echo $REQUEST_METHOD; if($REQUEST_METHOD == 'GET'){ $name = $_GET['name']; $pwd = $_GET['pwd']; if($name == 'Neeke' && $pwd == 'Neeke'){ echo '你好:'.$name; }else{ echo '登录失败!' 阅读全文
posted @ 2012-02-24 11:39 meteorit 阅读(485) 评论(0) 推荐(0) 编辑
摘要: json数据格式解析我自己分为两种;一种是普通的,一种是带有数组形式的;普通形式的:服务器端返回的json数据格式如下:{"userbean":{"Uid":"100196","Showname":"\u75af\u72c2\u7684\u7334\u5b50","Avtar":null,"State":1}}分析代码如下:// TODO 状态处理 500 200 int res = 0; res = httpClient.execute(httpPost 阅读全文
posted @ 2012-02-24 11:33 meteorit 阅读(136) 评论(0) 推荐(0) 编辑
摘要: packagecom.android;importjava.io.IOException;importorg.apache.http.HttpResponse;importorg.apache.http.HttpStatus;importorg.apache.http.client.ClientProtocolException;importorg.apache.http.client.HttpClient;importorg.apache.http.client.methods.HttpGet;importorg.apache.http.impl.client.DefaultHttpClie 阅读全文
posted @ 2012-02-03 10:27 meteorit 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 注意切换效果都是用overridePendingTransition方法来实现的、只有Android2.0以后才支持。public class demoMain extends Activity {private Button btnDemo;private Spinner sprAnim;/** Called when the activity is first created. */@Overridepublic void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentVi 阅读全文
posted @ 2012-01-18 15:50 meteorit 阅读(308) 评论(0) 推荐(0) 编辑
摘要: ProgressBar背景的改变其实说白了改变背景就是改变样式 <ProgressBar android:id=\"@+id/progress_bar\" android:layout_width=\"40dip\" android:layout_height=\"40dip\" android:padding=\"6dp\" android:indeterminate=\"true\" style=\"?android:attr/progressBarStyleInverse\ 阅读全文
posted @ 2012-01-18 15:42 meteorit 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 通过Button实现页面的左右滑动切换public class jipiao extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.s_sql);@Overridepublic void onClick(View arg0) {// TODO Auto-generated m 阅读全文
posted @ 2012-01-16 10:53 meteorit 阅读(771) 评论(0) 推荐(0) 编辑
摘要: RelativeLayout用到的一些重要的属性: 第一类:属性值为true或false android:layout_centerHrizontal 水平居中 android:layout_centerVertical 垂直居中 android:layout_centerInparent 相对于父元素完全居中 android:layout_alignParentBottom 贴紧父元素的下边缘 android:layout_alignParentLeft 贴紧父元素的左边缘 android:layout_alignParentRight 贴紧父元素的右边缘 android:layout_a. 阅读全文
posted @ 2012-01-15 16:48 meteorit 阅读(4931) 评论(1) 推荐(0) 编辑
摘要: android 带文字的ImageButton有两种实现方法如下:实现一:<LinearLayoutandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:orientation="vertical"android:id="@+id/bt"><ImageViewandroid:id="@+id/ib"android:layout_width="wrap_content 阅读全文
posted @ 2012-01-15 16:36 meteorit 阅读(392) 评论(0) 推荐(0) 编辑
摘要: Android开发中有的时候需要把菜单显示在屏幕的底部,但是Android本身没有提供这样的控件,因此需要自己写代码来实现,网上Google一下有关这个主题的网页,最终都是从这篇《android实现底部菜单栏》文复制过去的(源代码在这里),但是如果你把这篇文里的代码全部复制过去,你会发现在模拟器里看不到底部的菜单栏,问题出在哪儿呢?仔细检查一下/res/layout/main.xml这个文件里的下面这节:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:ori 阅读全文
posted @ 2012-01-15 13:25 meteorit 阅读(1377) 评论(1) 推荐(0) 编辑
摘要: 自定义listview,图文混排效果public class Personal extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.p_personal); //绑定Layout里面的ListView ListView list = (ListView) findViewById(R.id.ListView01); //生成动态数组,加入数据 ArrayL... 阅读全文
posted @ 2012-01-15 13:09 meteorit 阅读(1036) 评论(0) 推荐(0) 编辑