1.
Activity可继承自BaseActivity,便于统一风格与处理公共事件,构建对话框统一构建器的建立,万一需要整体变动,一处修改到处有效。2.
数据库表段字段常量和SQL逻辑分离,更清晰。3. 全局变量放全局类中,模块私有放自己的管理类中,不要相信庞大的管理的东西会带来什么好处,可能是一场...
分类:
移动开发 时间:
2014-06-04 15:44:39
阅读次数:
290
在这篇教程中,我们将对之前所添加的Button元素进行设置以实现对用户点击的检测与响应。为了达成这一目标,我们需要在应用程序的主Activity类中略微涉及Java编程内容。如果大家在Java开发方面的经验不太丰富也没必要担心,只要按步骤进行即可完成学习。我们将在本系列的下一篇文章中深入探讨Java...
分类:
移动开发 时间:
2014-06-04 14:42:03
阅读次数:
396
占没有查到替换的方法,先记着!The method
startManagingCursor(Cursor) from the type Activity is deprecatedThe constructor
SimpleCursorAdapter(Context, int, Cursor, St...
分类:
移动开发 时间:
2014-06-02 16:05:59
阅读次数:
309
前言 [Android系列—] 2. Android 项目目录结构与用户界面的创建 在上一篇中,在一个活动中(activity)中显示了一个输入框和一个按钮。这一篇讲接着上一篇继续介绍如何在点击 Send 按钮时,通过添加一些代码到MainActivity中开始一个新的Activity.添加Send 按钮的响应添加按钮的点击事件响应,打开 fra...
分类:
移动开发 时间:
2014-06-02 11:03:45
阅读次数:
233
布局代码: 错误信息:E/AndroidRuntime(2728):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.*****.Main}: java.lang.RuntimeExcepti...
分类:
其他好文 时间:
2014-06-02 05:46:20
阅读次数:
186
格式:
<activity-alias android:enabled=["true" | "false"]
android:exported=["true" | "false"]
android:icon="drawable resource"
android:label="string resou...
分类:
移动开发 时间:
2014-06-02 03:02:06
阅读次数:
253
There are a few scenarios in which your activity is destroyed due to normal app behavior, such as when the user presses theBack button or your activity signals its own destruction
by calling finish(...
分类:
其他好文 时间:
2014-06-01 18:18:52
阅读次数:
550
格式:
<activity android:allowTaskReparenting=["true" | "false"]
android:alwaysRetainTaskState=["true" | "false"]
android:clearTaskOnLaunch=["true" | "false"]
android:confi...
分类:
移动开发 时间:
2014-06-01 15:41:02
阅读次数:
321
一、利用SharedPreferences来实现数据的保存和读取:
1、Mainactivity:
package com.example.sharedpreferencesdemo;
import com.example.sharedpreferencesdemo.util.SharedPreferencesUtil;
import android.app.Activity;
imp...
分类:
移动开发 时间:
2014-06-01 09:51:36
阅读次数:
331
布局文件:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="...
分类:
移动开发 时间:
2014-06-01 04:04:04
阅读次数:
490