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

正文內(nèi)容

android手機(jī)訂餐系統(tǒng)計(jì)算機(jī)-資料下載頁(yè)

2024-12-07 01:04本頁(yè)面

【導(dǎo)讀】隨著科技的發(fā)展,二十一世紀(jì)成為了以網(wǎng)絡(luò)化、信息化為核心的社會(huì)。傳統(tǒng)的訂餐方式已不能滿足人們的需求,為了解決這種處在高速發(fā)展社會(huì)的就餐困。難的問(wèn)題,所以設(shè)計(jì)了本系統(tǒng)。息以及顧客訂單的管理,從而提高了服務(wù)的質(zhì)量。MyEclipse、TOMCAT、AndroidSDK、ADT等開(kāi)發(fā)環(huán)境并遵照MVC模式來(lái)進(jìn)行開(kāi)發(fā)。此系統(tǒng)界面美觀、操作便捷將會(huì)受到廣大用戶的青睞。

  

【正文】 58 所示: 圖 58 菜譜大全界面 菜譜列表的信息是通過(guò) url 地址將 action 傳遞到服務(wù)器端,由服務(wù)器從數(shù)據(jù)庫(kù)中將菜單信息通過(guò) json 再傳遞給客戶端,再通過(guò) List 來(lái)循環(huán)顯示出來(lái)的。 關(guān)于圖片的加載主要使用的技術(shù)是: AsyncImageLoader 異步加載圖片的技術(shù)。 找畢業(yè)設(shè)計(jì)、項(xiàng)目源碼、編程視頻,就上碼農(nóng)網(wǎng) manong365 異步加載圖片的相關(guān)技術(shù)說(shuō)明如下: 首先我們要在布局文件中設(shè)計(jì)一個(gè)圖片的占位: ImageView android:id = @+id/image android:layout_width = fill_parent android:layout_height = fill_parent android:layout_gravity = center_horizontal android:layout_marginTop= 20dip android:src = @drawable/product_default_icon / 之后要在代碼中將圖片的路徑加載進(jìn)來(lái): private Context context = 。 private ImageView image 。 //圖片地址 private String imageUrl = 。 public void onCreate ( Bundle savedInstanceState ) { ( savedInstanceState )。 setContentView ( )。 getWidget ( )。 loadImage ( imageUrl )。 } /** 獲得組件 */ public void getWidget ( ) { image = ( ImageView ) findViewById( ) 。 } private void loadImage( final String imageUrl ) { ImageAsyncLoader asyncImageLoader = new ImageAsyncLoader ( ) 。 // 異步 加載圖片 ,獲得圖片的地址,設(shè)置圖片的大小以及樣式 Drawable cachedImage = ( context, imageUrl, new ImageCallback ( ) { public void imageLoaded ( Drawable imageDrawable, String imageUrl ) { 找畢業(yè)設(shè)計(jì)、項(xiàng)目源碼、編程視頻,就上碼農(nóng)網(wǎng) manong365 if ( imageDrawable != null ) { ( (imageDrawable, (context, 150), ( context, 150 ) ) ) 。 } } } ) 。 if (cachedImage != null) { ((cachedImage, ( context, 150 ) , ( context, 150 ) ) )。 } } 加載異步圖片的主要的工具如下: private HashMap String, SoftReference Drawable cacheMap = null。 private BlockingQueue Runnable queue = null。 private ThreadPoolExecutor executor = null。 public ImageAsyncLoader ( ) { cacheMap = new HashMap String, SoftReference Drawable ( ) 。 queue = new LinkedBlockingQueue Runnable ( ) 。 /** * 線程池維護(hù)線程的最少數(shù)量 2 br * 線程池維護(hù)線程的最大數(shù)量 10br * 線程池維護(hù)線程所允許的空閑時(shí)間 180 秒 */ executor = new ThreadPoolExecutor ( 2, 10, 180, , queue ) 。 } public Drawable loadDrawable ( final Context context, final String imageUrl, final ImageCallback imageCallback ) { if ( ( imageUrl ) ) { SoftReference Drawable softReference = ( imageUrl ) 。 找畢業(yè)設(shè)計(jì)、項(xiàng)目源碼、編程視頻,就上碼農(nóng)網(wǎng) manong365 Drawable drawable = ( ) 。 if ( drawable != null ) { return drawable。 } } //handler 主要用于數(shù)據(jù)信息的存儲(chǔ) final Handler handler = new Handler ( ) { public void handleMessage ( Message message ) { ( ( Drawable ) , imageUrl )。 } } 。 // 將任務(wù)添加到線程池 ( new Runnable ( ) { public void run ( ) { // 根據(jù) URL 加載圖片 Drawable drawable = loadImageFromUrl ( context, imageUrl ) 。 // 圖片資源不為空是創(chuàng)建軟引用 if ( null != drawable ) (imageUrl, new SoftReference Drawable ( drawable ) ) 。 Message message = ( 0, drawable ) 。 ( message )。 } } ) 。 return null。 } // 網(wǎng)絡(luò)圖片先下載到本地 cache 目錄保存,以 imagUrl 的圖片文件名保存,如果有同名文件在 cache 目錄就從本地加載 public static Drawable loadImageFromUrl ( Context context, String imageUrl ) { Drawable drawable = null 。 if (imageUrl == null) return null 。 找畢業(yè)設(shè)計(jì)、項(xiàng)目源碼、編程視頻,就上碼農(nóng)網(wǎng) manong365 String fileName = 。 // 獲取 url 中圖片的文件名與后綴 if ( imageUrl != null amp。amp。 () != 0 ) { fileName = ( ( / ) + 1 ) 。 } // 根據(jù)圖片的名稱創(chuàng)建文件(不存在:創(chuàng)建) File file = new File ( ( ), fileName )。 // 如果在緩存中找不到指定圖片則下載 if ( !() amp。amp。 ! ( ) ) { try { // 從網(wǎng)絡(luò)上下載圖片并寫入文件 FileOutputStream fos = new FileOutputStream ( file ) 。 InputStream is = new URL ( imageUrl ).openStream( ) 。 int data = ( ) 。 while ( data != 1 ) { ( data ) 。 data = ( ) 。 } ( ) 。 ( ) 。 drawable = ( ( ) )。 } catch ( IOException e ) { ()。 } } // 如果緩存中有則直接使用緩存中的圖片 else { // ( ( ) + + ( ) ) 。 drawable = ( ( ) ) 。 } return drawable 。 } 找畢業(yè)設(shè)計(jì)、項(xiàng)目源碼、編程視頻,就上碼農(nóng)網(wǎng) manong365 public interface ImageCallback { public void imageLoaded ( Drawable imageDrawable, String imageUrl ) 。 } 異步加載圖片要在 manifest 中進(jìn)行配置,具體配置的內(nèi)容為: usespermission android:name = / usespermission android:name = / 異步加載圖片的主要代碼如下: //客戶端通過(guò) url 將需求傳遞給服務(wù)器端 @Override protected String doInBackground (String... params) { String json = null。 serverUrl = ( getApplicationContext()) + ServletService ? Action = getdisheslistamp。msg = + params [ 0 ]。 //為 URL 加載一個(gè)隨機(jī)值是為了防止頁(yè)面的緩存問(wèn)題出現(xiàn) json = ( serverUrl )。 return json。 } //服務(wù)器接收請(qǐng)求進(jìn)行處理 protected void service ( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException { try { ( UTF8 ) 。 // 設(shè)置處理請(qǐng)求參數(shù)的編碼格式 ( text/html。charset=UTF8 )。 // 設(shè)置 ContentType 字段值 PrintWriter out = ( ) 。 // 下面的代碼開(kāi)始使用 CommonsUploadFile 組件處理上傳的文件數(shù)據(jù) FileItemFactory factory = new DiskFileItemFactory ( )。 // 建立 FileItemFactory 對(duì)象 ServletFi
點(diǎn)擊復(fù)制文檔內(nèi)容
研究報(bào)告相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1