Finish adding Makefiles for the Notepad tutorial.
Add the missing makefiles for the non-solution versions of the tutorial code. Required providing missing imports in Notepadv2. Also standardized white spaces using Source > Correct Indentation in Eclipse and a few manual changes. This was done to minimize differences such as: diff -r Notepadv1 Notepadv1Solution diff -r Notepadv1Solution/src/com/android/demo/notepad1/ Notepadv2/src/com/android/demo/notepad2/ Change-Id: Ie8b10efd61f2200b3c741ea500a6924710ab54ed
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
# Only build apk if this package is added to CUSTOM_MODLUES in buildspec.mk
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
# Only compile source java files in this apk.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView android:id="@+id/text1"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<TextView android:id="@+id/text1" xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
@@ -43,13 +43,13 @@ public class NotesDbAdapter {
|
||||
private static final String TAG = "NotesDbAdapter";
|
||||
private DatabaseHelper mDbHelper;
|
||||
private SQLiteDatabase mDb;
|
||||
|
||||
|
||||
/**
|
||||
* Database creation sql statement
|
||||
*/
|
||||
private static final String DATABASE_CREATE =
|
||||
"create table notes (_id integer primary key autoincrement, "
|
||||
+ "title text not null, body text not null);";
|
||||
"create table notes (_id integer primary key autoincrement, "
|
||||
+ "title text not null, body text not null);";
|
||||
|
||||
private static final String DATABASE_NAME = "data";
|
||||
private static final String DATABASE_TABLE = "notes";
|
||||
@@ -102,7 +102,7 @@ public class NotesDbAdapter {
|
||||
mDb = mDbHelper.getWritableDatabase();
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public void close() {
|
||||
mDbHelper.close();
|
||||
}
|
||||
@@ -158,9 +158,9 @@ public class NotesDbAdapter {
|
||||
|
||||
Cursor mCursor =
|
||||
|
||||
mDb.query(true, DATABASE_TABLE, new String[] {KEY_ROWID,
|
||||
KEY_TITLE, KEY_BODY}, KEY_ROWID + "=" + rowId, null,
|
||||
null, null, null, null);
|
||||
mDb.query(true, DATABASE_TABLE, new String[] {KEY_ROWID,
|
||||
KEY_TITLE, KEY_BODY}, KEY_ROWID + "=" + rowId, null,
|
||||
null, null, null, null);
|
||||
if (mCursor != null) {
|
||||
mCursor.moveToFirst();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user