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

正文內(nèi)容

手機(jī)電子書閱讀器的設(shè)計(jì)與實(shí)現(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) {// 當(dāng)期不允許繪制return true。}((245, 142, 33))。// 設(shè)置默認(rèn)連線顏色33switch (()) {case :mov_x = (int) ()。mov_y = (int) ()。// 判斷當(dāng)前點(diǎn)擊的位置是處于哪個(gè)點(diǎn)之內(nèi)currentPoint = getPointAt(mov_x, mov_y)。if (currentPoint != null) {()。(())。}invalidate()。break。case :clearScreenAndDrawList()。// 得到當(dāng)前移動(dòng)位置是處于哪個(gè)點(diǎn)內(nèi)GesturePoint pointAt = getPointAt((int) (), (int) ())。// 代表當(dāng)前用戶手指處于點(diǎn)與點(diǎn)之前if (currentPoint == null amp。amp。 pointAt == null) {return true。} else {// 代表用戶的手指移動(dòng)到了點(diǎn)上if (currentPoint == null) {// 先判斷當(dāng)前的 point 是不是為 null// 如果為空,那么把手指移動(dòng)到的點(diǎn)賦值給 currentPointcurrentPoint = pointAt。// 把 currentPoint 這個(gè)點(diǎn)設(shè)置選中為 true。()。(())。}}if (pointAt == null || (pointAt) || == ()) {//點(diǎn)擊移動(dòng)區(qū)域不在圓的區(qū)域,或者當(dāng)前點(diǎn)擊的點(diǎn)與當(dāng)前移動(dòng)到的//點(diǎn)的位置相同,或者當(dāng)前點(diǎn)擊的點(diǎn)處于選中狀態(tài)//那么以當(dāng)前的點(diǎn)中心為起點(diǎn),以手指移動(dòng)位置為終點(diǎn)畫線((), (), (), (), paint)。// 畫線} else {// 如果當(dāng)前點(diǎn)擊的點(diǎn)與當(dāng)前移動(dòng)到的點(diǎn)的位置不同34// 那么以前前點(diǎn)的中心為起點(diǎn),以手移動(dòng)到的點(diǎn)的位置畫線((), (), (),(), paint)。// 畫線()。// 判斷是否中間點(diǎn)需要選中GesturePoint betweenPoint = getBetweenCheckPoint(currentPoint, pointAt)。if (betweenPoint != null amp。amp。 != ()) {// 存在中間點(diǎn)并且沒有被選中PairGesturePoint, GesturePoint pair1 = new PairGesturePoint, GesturePoint(currentPoint, betweenPoint)。(pair1)。(())。PairGesturePoint, GesturePoint pair2 = new PairGesturePoint, GesturePoint(betweenPoint, pointAt)。(pair2)。(())。// 設(shè)置中間點(diǎn)選中()。// 賦值當(dāng)前的 point。currentPoint = pointAt。} else {PairGesturePoint, GesturePoint pair = newPairGesturePoint, GesturePoint(currentPoint, pointAt)。(pair)。(())。// 賦值當(dāng)前的 point。currentPoint = pointAt。}}invalidate()。break。case MotionEvent. 當(dāng)手指抬起的時(shí)候if (isVerify) {// 手勢(shì)密碼校驗(yàn)// 清掉屏幕上所有的線,只畫上集合里面保存的線35if ((())) {// 代表用戶繪制的密碼手勢(shì)與傳入的密碼相同()。} else {// 用戶繪制的密碼與傳入的密碼不同。()。}} else {(())。}break。}return true。}指定時(shí)間去清除繪制的狀態(tài)的代碼:public void clearDrawlineState(long delayTime) {if (delayTime 0) {// 繪制紅色提示路線isDrawEnable = false。drawErrorPathTip()。}new Handler().postDelayed(new clearStateRunnable(), delayTime)。} 使用幫助模塊功能描述圖 31 所示是使用幫助主頁面,此頁面通過讀取幫助文件在 TextView 中顯示,并且為 TextView 添加滾動(dòng)條。文件中含有本軟件的特點(diǎn)、功能介紹、操作說明等,可以讓用戶通過此模塊更好的了解和使用本軟件。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通過一個(gè)簡(jiǎn)單的彈出窗口來顯示本軟件的版本信息、聯(lián)系方式,方便用戶聯(lián)系我們?nèi)鐖D 32 所示。圖 32 關(guān)于部分代碼實(shí)現(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()。 //獲取對(duì)話框當(dāng)前的參數(shù)值 ()。 = ()*4/5。 //寬度設(shè)置為屏幕 4/5 的寬度(p)。 //設(shè)置生效 ()。}394 項(xiàng)目技術(shù)總結(jié) 技術(shù)創(chuàng)新及特點(diǎn)就整個(gè)項(xiàng)目而言,開發(fā)的過程中采用的比較新穎的設(shè)計(jì)和技術(shù)。例如:通過隱藏、顯示部分布局來實(shí)現(xiàn)彈出導(dǎo)航欄;通過使用 android:layout_weight 來按比例進(jìn)行布局使其對(duì)不同分辨率的屏幕擁有更好的支持;使用SharedPreferences 來存儲(chǔ)系統(tǒng)配置,關(guān)閉軟件后讓用戶的配置不丟失;使用JSON 來儲(chǔ)存已經(jīng)提取的章節(jié)目錄,使用戶下次的查看目錄更加快速;自定義一個(gè) SysApplication 類,利用單例模式管理 Activity,在每個(gè)在 Activity 的onCreate()方法中調(diào)用 ().addActivity(this)方法,在閱讀頁面退出時(shí)直接調(diào)用 ().exit()方法,就可以完全退出應(yīng)用程序了。,使軟件界面更簡(jiǎn)潔,在此我使用了彈出式的導(dǎo)航欄,它的布局與實(shí)現(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 代碼實(shí)現(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é)存儲(chǔ)到對(duì)應(yīng)的 JSON 文本中以方便下次的快速讀取。JSON存儲(chǔ)核心代碼: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,在閱讀頁面左下角顯示出當(dāng)前手機(jī)剩余電量(100 為滿電量 0 為電量為空) 。動(dòng)態(tài)獲取電量信息的核心代碼:@Overri
點(diǎn)擊復(fù)制文檔內(nèi)容
試題試卷相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1