摘要: 1.Activity 的生命周期oncreater 创建activity时ondestroy 销毁activity时onStart 可见时onStop 不可见时onResume 有焦点时onPause 无焦点时onRestart 重新启动 2.横竖屏切换: android:screenOrienta 阅读全文
posted @ 2019-07-03 21:15 zp007 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 显示意图:(通过指定具体的包名和类名) Intent intent=new Intent(); intent.setClassName("要跳转的应用程序包名","要跳转的类名的完整路径"); //intent.setClassName("com.test","com.activity.TestAc 阅读全文
posted @ 2019-06-30 17:14 zp007 阅读(589) 评论(0) 推荐(0) 编辑
摘要: <intent-filter><intent-filter android:icon="drawable resource" android:label="string resource" android:priority="integer" > <action> <category> <data> 阅读全文
posted @ 2019-06-27 23:02 zp007 阅读(1249) 评论(0) 推荐(0) 编辑
摘要: 1.<compatible-screens><compatible-screens> <screen android:screenSize=["small" | "normal" | "large" | "xlarge"] android:screenDensity=["ldpi" | "mdpi" 阅读全文
posted @ 2019-06-23 22:28 zp007 阅读(172) 评论(0) 推荐(0) 编辑
摘要: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="string" android:sharedUserId="string" android:sharedUserLabel="string re 阅读全文
posted @ 2019-06-23 22:24 zp007 阅读(626) 评论(0) 推荐(0) 编辑
摘要: 1.get请求方式 2.Post请求 1 public void httpPost() throws Exception { 2 Log.e(TAG, " httpPost "); 3 URL url = new URL("url地址"); 4 HttpURLConnection conn = (H 阅读全文
posted @ 2019-06-15 23:50 zp007 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 收发消息的流程: 发消息: mHandler.sendMessage()-->...-->enqueueMessage()-->将当前的Handler对象赋值给 msg.target -->最终将消息添加到消息队列 queue.enqueueMessage 收消息: Looper.loop()--> 阅读全文
posted @ 2019-06-11 22:24 zp007 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 1 public class ListViewActivity extends AppCompatActivity { 2 ListView lvData; 3 @Override 4 protected void onCreate(Bundle savedInstanceState) { 5 super.onCreate(savedInstan... 阅读全文
posted @ 2019-06-07 22:39 zp007 阅读(91) 评论(0) 推荐(0) 编辑
摘要: android 提供了一个数据库操作的帮助类 SQLiteOpenHelper,我定义一个类继承SQLiteOpenHelper即可完成数据的创建和更新操作。 一、创建类基础 SQLiteOpenHelper 二、获取SQLiteDatabase对象操作数据库 getReadableDatabase 阅读全文
posted @ 2019-06-01 23:00 zp007 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 方式一:字符串拼接 方式二: XmlSerializer 解析XML:xmlPullParser 阅读全文
posted @ 2019-06-01 16:57 zp007 阅读(649) 评论(0) 推荐(0) 编辑