摘要:
此程序其实是在上一版输出部分项目中再新建一个Activity用来读取xml文件:Activity文件代码如下:View Code public class ReadXmlActivity extends Activity { private TextView idInfoText = null; private TextView nameInfoText = null; private Button readXmlBtn = null; // 操作XML文件的准备 private File file = null; private Docum... 阅读全文
摘要:
此程序涉及到存储卡的操作,此类操作需要在配置文件中添加写权限<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />主Activity组件与监听事件准备:View Code public class MainActivity extends Activity { private EditText idText = null; private EditText nameText = null; private Button saveXMLBtn = null; ... 阅读全文
摘要:
此应用简单的使用了BroadcastReceiver接收一个闹钟时间传送的PendingIntent,然后通过BroadcastReceiver启动一个Activity来提示闹钟到时信息首先写闹钟到时信息提示的Activity:View Code 1 public class AlarmMsgActivity extends Activity { 2 3 @Override 4 protected void onCreate(Bundle savedInstanceState) { 5 super.onCreate(savedInstanceState); ... 阅读全文