09 2014 档案

Activity.this和getApplicationContext()的差异
摘要:Activity.this和getApplicationContext()的差异:在运用语句:AlertDialog.Builder builder=new AlertDialog.Builder(this);这里的参数this指的是Activity.this,换句话说,这个参数指的就是这个Acti... 阅读全文

posted @ 2014-09-16 20:33 Chaos.WX 阅读(134) 评论(0) 推荐(0)

LayoutInflater的作用
摘要:LayoutInflater的作用是导入界面,说白了就是查找layout中的.xml界面并导入。如下:public class MainActitivity extends Acticity{ TextView textView; public void onCreate(Bundle save... 阅读全文

posted @ 2014-09-15 21:05 Chaos.WX 阅读(249) 评论(0) 推荐(0)

Intent的两种用法
摘要:Intent主要负责组件之间的跳转,有两种用法:1.显式用法:Intent intent =new Intent(this,TargetActivity.class);startActivity(intent);其中,this指的是当前的.java文件,TargetActivity.class即是要... 阅读全文

posted @ 2014-09-15 19:59 Chaos.WX 阅读(496) 评论(0) 推荐(0)

Application 用法
摘要:Application用于存储和访问任何界面的变量,也就是说,在一个工程里,我们可以在Application定义全局变量,在其他Activity中引用。具体用法如下:1.建立MyApplication.java文件package entity;import com.android.volley.Re... 阅读全文

posted @ 2014-09-14 08:58 Chaos.WX 阅读(375) 评论(0) 推荐(0)

xml动画
摘要:anim中的四个xml文件:1.alpha.xml: 2.scale.xml 3.translate.xml: 4.rotate.xml: layout中的xml文件activity_main.xml: src中的.java文件M... 阅读全文

posted @ 2014-09-03 21:54 Chaos.WX 阅读(208) 评论(0) 推荐(0)

Handler和AsyncTask
摘要:Android消息机制:Message,handler,looper类的使用及消息的传递主线程和子线程之间的消息传递————————————————— ——> Messagemessagemessage——>looper—↑——————————————↓——Params:启动参数StringP... 阅读全文

posted @ 2014-09-02 21:46 Chaos.WX 阅读(120) 评论(0) 推荐(0)

安卓桌面分页
摘要:1.适配器:package com.example.adapter;import java.util.ArrayList;import android.annotation.SuppressLint;import android.app.ActionBar.LayoutParams;import a... 阅读全文

posted @ 2014-09-01 06:47 Chaos.WX 阅读(590) 评论(0) 推荐(0)

适配器的应用
摘要:1.实体类:package com.example.adapter;public class DangDang {private String writers;private int img;private String price;private String critical;public St... 阅读全文

posted @ 2014-09-01 06:43 Chaos.WX 阅读(252) 评论(0) 推荐(0)

导航