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

正文內(nèi)容

手機電子書閱讀器的設計與實現(xiàn)畢業(yè)論文-資料下載頁

2025-06-23 23:38本頁面
  

【正文】 ockWidth/baseNum。int topY = row*blockWidth+blockWidth/baseNum。int rightX = col*blockWidth+blockWidthblockWidth/baseNum。int bottomY = row*blockWidth+blockWidthblockWidth/baseNum。GesturePoint p = new GesturePoint(leftX, rightX, topY, bottomY, image,i+1)。(p)。}}繪制界面繪制監(jiān)聽的核心代碼:@Overridepublic boolean onTouchEvent(MotionEvent event) {if (isDrawEnable == false) {// 當期不允許繪制return true。}((245, 142, 33))。// 設置默認連線顏色33switch (()) {case :mov_x = (int) ()。mov_y = (int) ()。// 判斷當前點擊的位置是處于哪個點之內(nèi)currentPoint = getPointAt(mov_x, mov_y)。if (currentPoint != null) {()。(())。}invalidate()。break。case :clearScreenAndDrawList()。// 得到當前移動位置是處于哪個點內(nèi)GesturePoint pointAt = getPointAt((int) (), (int) ())。// 代表當前用戶手指處于點與點之前if (currentPoint == null amp。amp。 pointAt == null) {return true。} else {// 代表用戶的手指移動到了點上if (currentPoint == null) {// 先判斷當前的 point 是不是為 null// 如果為空,那么把手指移動到的點賦值給 currentPointcurrentPoint = pointAt。// 把 currentPoint 這個點設置選中為 true。()。(())。}}if (pointAt == null || (pointAt) || == ()) {//點擊移動區(qū)域不在圓的區(qū)域,或者當前點擊的點與當前移動到的//點的位置相同,或者當前點擊的點處于選中狀態(tài)//那么以當前的點中心為起點,以手指移動位置為終點畫線((), (), (), (), paint)。// 畫線} else {// 如果當前點擊的點與當前移動到的點的位置不同34// 那么以前前點的中心為起點,以手移動到的點的位置畫線((), (), (),(), paint)。// 畫線()。// 判斷是否中間點需要選中GesturePoint betweenPoint = getBetweenCheckPoint(currentPoint, pointAt)。if (betweenPoint != null amp。amp。 != ()) {// 存在中間點并且沒有被選中PairGesturePoint, GesturePoint pair1 = new PairGesturePoint, GesturePoint(currentPoint, betweenPoint)。(pair1)。(())。PairGesturePoint, GesturePoint pair2 = new PairGesturePoint, GesturePoint(betweenPoint, pointAt)。(pair2)。(())。// 設置中間點選中()。// 賦值當前的 point。currentPoint = pointAt。} else {PairGesturePoint, GesturePoint pair = newPairGesturePoint, GesturePoint(currentPoint, pointAt)。(pair)。(())。// 賦值當前的 point。currentPoint = pointAt。}}invalidate()。break。case MotionEvent. 當手指抬起的時候if (isVerify) {// 手勢密碼校驗// 清掉屏幕上所有的線,只畫上集合里面保存的線35if ((())) {// 代表用戶繪制的密碼手勢與傳入的密碼相同()。} else {// 用戶繪制的密碼與傳入的密碼不同。()。}} else {(())。}break。}return true。}指定時間去清除繪制的狀態(tài)的代碼:public void clearDrawlineState(long delayTime) {if (delayTime 0) {// 繪制紅色提示路線isDrawEnable = false。drawErrorPathTip()。}new Handler().postDelayed(new clearStateRunnable(), delayTime)。} 使用幫助模塊功能描述圖 31 所示是使用幫助主頁面,此頁面通過讀取幫助文件在 TextView 中顯示,并且為 TextView 添加滾動條。文件中含有本軟件的特點、功能介紹、操作說明等,可以讓用戶通過此模塊更好的了解和使用本軟件。36圖 31 使用幫助文件讀取的核心代碼:private String getFromAssets(String fileName){try {InputStreamReader input = new InputStreamReader(getResources().getAssets().open(fileName))。BufferedReader buf = new BufferedReader(input)。String line = 。StringBuffer result = new StringBuffer()。while ((line = ())!=null)(line).append(\n)。return ()。} catch (IOException e) {()。}return 。} 關(guān)于模塊功能描述37通過一個簡單的彈出窗口來顯示本軟件的版本信息、聯(lián)系方式,方便用戶聯(lián)系我們?nèi)鐖D 32 所示。圖 32 關(guān)于部分代碼實現(xiàn):private void aboutDialog(){View myInputView = (this).inflate(, null)。dialog = new Dialog(this,)。(myInputView)。Button confirm = (Button)myInputView.findViewById()。(new OnClickListener() {@Overridepublic void onClick(View v) {()。}})。 WindowManager m = getWindowManager()。 Display d = ()。 //為獲取屏幕寬、高 Window dialogWindow = ()。38 p = dialogWindow.getAttributes()。 //獲取對話框當前的參數(shù)值 ()。 = ()*4/5。 //寬度設置為屏幕 4/5 的寬度(p)。 //設置生效 ()。}394 項目技術(shù)總結(jié) 技術(shù)創(chuàng)新及特點就整個項目而言,開發(fā)的過程中采用的比較新穎的設計和技術(shù)。例如:通過隱藏、顯示部分布局來實現(xiàn)彈出導航欄;通過使用 android:layout_weight 來按比例進行布局使其對不同分辨率的屏幕擁有更好的支持;使用SharedPreferences 來存儲系統(tǒng)配置,關(guān)閉軟件后讓用戶的配置不丟失;使用JSON 來儲存已經(jīng)提取的章節(jié)目錄,使用戶下次的查看目錄更加快速;自定義一個 SysApplication 類,利用單例模式管理 Activity,在每個在 Activity 的onCreate()方法中調(diào)用 ().addActivity(this)方法,在閱讀頁面退出時直接調(diào)用 ().exit()方法,就可以完全退出應用程序了。,使軟件界面更簡潔,在此我使用了彈出式的導航欄,它的布局與實現(xiàn)代碼如下:xml 布局部分核心代碼:LinearLayoutandroid:id=@+id/book_toolbar_layoutandroid:layout_width=100dipandroid:layout_height=fill_parentandroid:orientation=verticalandroid:background=@drawable/bg1android:padding=0dipandroid:visibility=gone ProgressBarstyle=?android:attr/progressBarStyleHorizontalandroid:layout_width=fill_parentandroid:layout_height=2dipandroid:background=ffffff /Buttonandroid:id=@+id/book_sort_buttonandroid:layout_width=fill_parentandroid:layout_height=40dipandroid:background=00ddddddandroid:text=分類排序> /LinearLayoutandroid:id=@+id/book_sort_layoutandroid:layout_width=fill_parentandroid:layout_height=wrap_contentandroid:background=ffffff40android:orientation=verticalandroid:padding=0dipandroid:visibility=gone ……/LinearLayout/LinearLayoutjava 代碼實現(xiàn):private class MyOnClickListener implements OnClickListener{@Overridepublic void onClick(View v) {switch (()) {case :if(()==){()。setBookShelfSize(2)。}else{()。()。()。()。setBookShelfSize(3)。}break。case :if(()==){()。()。()。}else{()。}break。……}}},引入了 JSON 存取。通過把提取的章節(jié)存儲到對應的 JSON 文本中以方便下次的快速讀取。JSON存儲核心代碼:public void saveListJson() {41JSONObject allData = new JSONObject()。try {(persondata, jsonArr)。} catch (JSONException e) {()。}File file = new File(filePath + fileName)。if (!().exists())().mkdirs()。PrintStream out = null。try {out = new PrintStream(new FileOutputStream(file))。(())。} catch (FileNotFoundException e) {()。} finally {if (out != null)()。}}JSON讀取核心代碼:public void readListData() {File file = new File(filePath + fileName)。StringBuffer str = new StringBuffer()。try {FileInputStream input = new FileInputStream(file)。Scanner scan = new Scanner(input)。while (()) {(())。}()。} catch (FileNotFoundException e) {()。}try {JSONObject allData = new JSONObject(())。jsonArr = (persondata)。} catch (JSONException e) {()。}}42,在閱讀頁面左下角顯示出當前手機剩余電量(100 為滿電量 0 為電量為空) 。動態(tài)獲取電量信息的核心代碼:@Overri
點擊復制文檔內(nèi)容
試題試卷相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1