SQLite的小例子--备忘录(7)
来源:未知 责任编辑:责任编辑 发表时间:2014-01-20 07:51 点击:次
<LinearLayout android:id="@+id/LinearLayout01"
android:layout_height="wrap_content" android:layout_width="fill_parent">
<EditText android:layout_height="wrap_content" android:id="@+id/todo_edit_summary"
android:layout_weight="1" android:layout_width="wrap_content"
android:hint="Summary"></EditText>
</LinearLayout>
<EditText android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_weight="1"
android:id="@+id/todo_edit_description" android:hint="Description" android:gravity="top"></EditText>
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/todo_edit_button"
android:text="@string/test_edit_confirm"></Button>
</LinearLayout><span style="white-space: normal;"><span style="white-space: pre;"> </span></span>
下面的是两个Activity的代码
SQLiteOverView.java
Java代码
package com.loulijun.sqlitetest;
import android.app.ListActivity;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
public class SQLiteOverView extends ListActivity {
private MyAdapter dbHelper;
private static final int ACTIVITY_CREATE = 0;
private static final int ACTIVITY_EDIT = 1;
private static final int DELETE_ID = Menu.FIRST + 1;
private Cursor cursor;
@Override
public void onCreate(Bundle savedInstanceState) {
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>