自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

bmob個(gè)人失物應(yīng)用_app開發(fā)模板

移動(dòng)開發(fā)
該源碼功能上非常單一,但請(qǐng)從源碼封裝及架構(gòu)的角度來看待。上傳此源碼主要有兩點(diǎn)目的:一、學(xué)習(xí)并體驗(yàn)Bmob云存儲(chǔ)二、站在架構(gòu)的角度,學(xué)習(xí)Android平臺(tái)下app開發(fā)過程中的整合【封裝】

源碼簡(jiǎn)介

該源碼功能上非常單一,但請(qǐng)從源碼封裝及架構(gòu)的角度來看待。

上傳此源碼主要有兩點(diǎn)目的:

一、學(xué)習(xí)并體驗(yàn)Bmob云存儲(chǔ)

二、站在架構(gòu)的角度,學(xué)習(xí)Android平臺(tái)下app開發(fā)過程中的整合【封裝】

源碼運(yùn)行截圖

源碼片段

  1. /** 
  2.      * 查詢?nèi)渴镄畔?nbsp;queryLosts 
  3.      * 
  4.      * @return void 
  5.      * @throws 
  6.      */ 
  7.     private void queryLosts() { 
  8.         showView(); 
  9.         BmobQuery<lost> query = new BmobQuery<lost>(); 
  10.         query.order("-createdAt");// 按照時(shí)間降序 
  11.         query.findObjects(thisnew FindListener<lost>() { 
  12.   
  13.             @Override 
  14.             public void onSuccess(List<lost> losts) { 
  15.                 // TODO Auto-generated method stub 
  16.                 LostAdapter.clear(); 
  17.                 FoundAdapter.clear(); 
  18.                 if (losts == null || losts.size() == 0) { 
  19.                     showErrorView(0); 
  20.                     LostAdapter.notifyDataSetChanged(); 
  21.                     return
  22.                 } 
  23.                 progress.setVisibility(View.GONE); 
  24.                 LostAdapter.addAll(losts); 
  25.                 listview.setAdapter(LostAdapter); 
  26.             } 
  27.   
  28.             @Override 
  29.             public void onError(int code, String arg0) { 
  30.                 // TODO Auto-generated method stub 
  31.                 showErrorView(0); 
  32.             } 
  33.         }); 
  34.     } 
  35.   
  36.     public void queryFounds() { 
  37.         showView(); 
  38.         BmobQuery<found> query = new BmobQuery<found>(); 
  39.         query.order("-createdAt");// 按照時(shí)間降序 
  40.         query.findObjects(thisnew FindListener<found>() { 
  41.   
  42.             @Override 
  43.             public void onSuccess(List<found> arg0) { 
  44.                 // TODO Auto-generated method stub 
  45.                 LostAdapter.clear(); 
  46.                 FoundAdapter.clear(); 
  47.                 if (arg0 == null || arg0.size() == 0) { 
  48.                     showErrorView(1); 
  49.                     FoundAdapter.notifyDataSetChanged(); 
  50.                     return
  51.                 } 
  52.                 FoundAdapter.addAll(arg0); 
  53.                 listview.setAdapter(FoundAdapter); 
  54.                 progress.setVisibility(View.GONE); 
  55.             } 
  56.   
  57.             @Override 
  58.             public void onError(int code, String arg0) { 
  59.                 // TODO Auto-generated method stub 
  60.                 showErrorView(1); 
  61.             } 
  62.         }); 
  63.     } 
  64.   
  65. ······ 
  66.     /** 
  67.      * Add links into a TextView. 
  68.      * @param viewId The id of the TextView to linkify. 
  69.      * @return The BaseAdapterHelper for chaining. 
  70.      */ 
  71.     public BaseAdapterHelper linkify(int viewId) { 
  72.         TextView view = retrieveView(viewId); 
  73.         Linkify.addLinks(view, Linkify.ALL); 
  74.         return this
  75.     } 
  76.   
  77.     /** Apply the typeface to the given viewId */ 
  78.     public BaseAdapterHelper setTypeface(int viewId, Typeface typeface) { 
  79.         TextView view = retrieveView(viewId); 
  80.         view.setTypeface(typeface); 
  81.         return this
  82.     } 
  83.   
  84.     /** Apply the typeface to all the given viewIds */ 
  85.     public BaseAdapterHelper setTypeface(Typeface typeface, int... viewIds) { 
  86.         for (int viewId : viewIds) { 
  87.             TextView view = retrieveView(viewId); 
  88.             view.setTypeface(typeface); 
  89.         } 
  90.         return this
  91.     } 
  92. </found></found></found></found></lost></lost></lost></lost> 
源碼鏈接:http://down.51cto.com/data/1968339
責(zé)任編輯:chenqingxiang 來源: 網(wǎng)絡(luò)整理
相關(guān)推薦

2015-03-26 10:49:23

bmobapp

2011-12-29 15:28:37

App CookeriOS應(yīng)用

2013-03-08 02:31:38

2013-03-08 02:46:00

個(gè)人開發(fā)APP

2017-12-11 10:18:01

2013-09-09 14:26:25

iOS應(yīng)用內(nèi)置付費(fèi)In-App Purc

2013-07-04 13:19:24

Java開發(fā)速度

2011-12-05 14:50:13

Knockout

2024-07-30 09:47:23

模板簡(jiǎn)化應(yīng)用

2013-12-20 11:16:45

個(gè)人市場(chǎng)企業(yè)應(yīng)用

2021-01-18 13:17:04

鴻蒙HarmonyOSAPP

2014-12-17 10:29:59

混合應(yīng)用Hybrid App開發(fā)實(shí)戰(zhàn)

2022-10-08 16:26:23

APP應(yīng)用開發(fā)

2012-04-17 08:55:48

個(gè)人開發(fā)者開發(fā)心得

2015-07-30 09:13:05

GlowAppleWatch

2012-12-04 09:18:02

2013-03-08 02:55:30

2010-11-16 09:23:13

敏捷開發(fā)Visual Stud

2012-03-08 21:38:26

Android

2012-03-09 13:56:27

MITAndroid開發(fā)工具
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)