intent通过ComponentName指定要执行的组件名字,创建一个Activity时就可以用这个方式进行指定 通过Main启动Detail 两个活动的布局 Detail <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:and ...
分类:
移动开发 时间:
2020-01-27 22:06:08
阅读次数:
80
布局文件 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android ...
分类:
移动开发 时间:
2020-01-27 22:01:22
阅读次数:
99
新建一个Fragment的过程 package com.example.myactivityiiii; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import and ...
分类:
移动开发 时间:
2020-01-27 17:33:41
阅读次数:
102
图像选择:Main中点击选择图像按钮,启动Head活动用来选择图像, 然后将被选择图像通过bundle发送给Main,同时附带返回值,方便Main来判断 Head布局文件 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:and ...
分类:
移动开发 时间:
2020-01-27 00:17:54
阅读次数:
100
Bundle是个保存元组<key,value>的数据结构,两个活动传递数据时就通过Bundle进行传递 在Main中输入数据,然后将数据传递给Address 两个活动布局 Main <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns: ...
分类:
移动开发 时间:
2020-01-26 22:36:40
阅读次数:
115
注意 onRestart的箭头是弄错了,应该指向onStart MainActivity的布局文件和java代码 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.co ...
分类:
移动开发 时间:
2020-01-26 16:06:58
阅读次数:
121
布局文件 <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/ ...
分类:
移动开发 时间:
2020-01-25 22:13:01
阅读次数:
125
布局文件 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android ...
分类:
移动开发 时间:
2020-01-25 22:00:31
阅读次数:
116
额外新建一个layout,用来布局ImageView组件 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:o ...
分类:
移动开发 时间:
2020-01-25 16:42:18
阅读次数:
133
layout代码 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.and ...
分类:
移动开发 时间:
2020-01-24 23:44:51
阅读次数:
175