freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于android平臺下通訊錄的設計與開發(fā)(編輯修改稿)

2025-01-09 05:09 本頁面
 

【文章內(nèi)容簡介】 } @Override public void onCreate(SQLiteDatabase db) { tableCreate = new StringBuffer()。 (create table ) .append(DB_TABLENAME) .append( () .append(_id integer primary key autoincrement,) .append(name text,) .append(mobilephone text,) .append(officephone text,) .append(familyphone text,) .append(address text,) .append(othercontact text,) .append( text,) .append(position text,) .append(pany text,) .append(zipcode text,) .append(remark text,) .append(imageid int,) .append(privacy int ) .append())。 (())。 (())。 } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { String sql = drop table if exists + DB_TABLENAME。 (sql)。 (db)。 } } } 天津大學仁愛學院 2021屆實習題目設計 19 / 78 用戶信息: package 。 import 。 public class User implements Serializable { public int _id。 public String username。 public String mobilePhone。 public String officePhone。 public String familyPhone。 public String position。 public String pany。 public String address。 public String zipCode。 public String 。 public String otherContact。 public String remark。 public int imageId。 public int privacy。//1代表隱私用戶 0代表普通用戶 } 添加新用戶 : package 。 import 。 天津大學仁愛學院 2021屆實習題目設計 20 / 78 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 public class AddNew extends Activity implements ViewFactory { EditText et_name。 EditText et_mobilePhone。 EditText et_officePhone。 EditText et_familyPhone。 EditText et_position。 EditText et_pany。 EditText et_address。 EditText et_zipCode。 EditText et_otherContact。 EditText et_。 EditText et_remark。 Button btn_save。 Button btn_return。 int privacy。//用于判斷添加的用戶是不是保密的 天津大學仁愛學院 2021屆實習題目設計 21 / 78 ImageButton imageButton。//頭像按鈕 View imageChooseView。//圖像選擇的視圖 AlertDialog imageChooseDialog。//頭像選擇對話框 Gallery gallery。//頭像的 Gallery ImageSwitcher is。//頭像的 ImageSwitcher int currentImagePosition。//用于記錄當前選中圖像 在圖像數(shù)組中的位置 int previousImagePosition。//用于記錄上一次圖片的位置 boolean imageChanged。//判斷頭像有沒有變化 /** * 所有的圖像圖片 */ private int[] images = new int[]{ , , , , , , , , , ,}。 @Override protected void onCreate(Bundle savedInstanceState) { (savedInstanceState)。 setContentView()。 Intent intent = getIntent()。 //先確定好保密類型 if(()!=null amp。amp。 ().getInt(privacy) == 1) { privacy = 1。 } else { privacy = 0。 } et_name = (EditText)findViewById()。 et_mobilePhone = (EditText)findViewById()。 et_officePhone = (EditText)findViewById()。 et_familyPhone = (EditText)findViewById()。 et_position = (EditText)findViewById()。 天津大學仁愛學院 2021屆實習題目設計 22 / 78 et_pany = (EditText)findViewById()。 et_address = (EditText)findViewById()。 et_zipCode = (EditText)findViewById()。 et_otherContact = (EditText)findViewById()。 et_ = (EditText)findViewById()。 et_remark = (EditText)findViewById()。 btn_save = (Button)findViewById()。 btn_return = (Button)findViewById()。 imageButton = (ImageButton)findViewById()。 /** * 響應點擊事件 */ (new OnClickListener(){ @Override public void onClick(View v) { //判斷姓名是否為空 String name = ().toString()。 if(().equals()) { (, 姓名不許為空 , ).show()。 return。 } //從表單上獲取數(shù)據(jù) User user = new User()。 = name。 = ().toString()。 = ().toString()。 = ().toString()。 = ().toString()。 = ().toString()。 = ().toString()。 = ().toString()。 = ().toString()。 = ().toString()。 = ().toString()。 //判斷頭像是否改變 , 若改變 , 則用當前的位置 , 若沒有改變 , 則用前一回的位置 if(imageChanged) { = images[currentImagePosition%]。 } else { = images[previousImagePosition%]。 } = privacy。 天津大學仁愛學院 2021屆實習題目設計 23 / 78 //創(chuàng)建數(shù)據(jù)庫幫助類 DBHelper helper = new DBHelper()。 //打開數(shù)據(jù)庫 ()。 //把 user存儲到數(shù)據(jù)庫里 long result = (user)。 //通過結(jié)果來判斷是否插入成功,若為 1,則表示插入數(shù)據(jù)失敗 if(result == 1 ) { (, 添加失敗 , )。 } setTitle(用戶添加成功 !)。 //返回到上一個 Activity,也就是 setResult(3)。 //銷毀當前視圖 finish()。 } })。 (new OnClickListener(){ @Override public void onClick(View v) { finish()。 } })。 (new OnClickListener(){ @Override public void onClick(View v) { loadImage()。//為 gallery裝載圖片 initImageChooseDialog()。//初始化 imageChooseDialog ()。 } })。 } public void loadImage() { if(imageChooseView == null) { LayoutInflater li = ()。 imageChooseView = (, null)。 天津大學仁愛學院 2021屆實習題目設計 24 / 78 //通過渲染 xml文件,得到一個視圖(
點擊復制文檔內(nèi)容
研究報告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1