天下棋牌下载

  • <tr id='vkl3g'><strong id='vkl3g'></strong><small id='vkl3g'></small><button id='vkl3g'></button><li id='vkl3g'><noscript id='vkl3g'><big id='vkl3g'></big><dt id='vkl3g'></dt></noscript></li></tr><ol id='vkl3g'><option id='vkl3g'><table id='vkl3g'><blockquote id='vkl3g'><tbody id='vkl3g'></tbody></blockquote></table></option></ol><u id='vkl3g'></u><kbd id='vkl3g'><kbd id='vkl3g'></kbd></kbd>

    <code id='vkl3g'><strong id='vkl3g'></strong></code>

    <fieldset id='vkl3g'></fieldset>
          <span id='vkl3g'></span>

              <ins id='vkl3g'></ins>
              <acronym id='vkl3g'><em id='vkl3g'></em><td id='vkl3g'><div id='vkl3g'></div></td></acronym><address id='vkl3g'><big id='vkl3g'><big id='vkl3g'></big><legend id='vkl3g'></legend></big></address>

              <i id='vkl3g'><div id='vkl3g'><ins id='vkl3g'></ins></div></i>
              <i id='vkl3g'></i>
            1. <dl id='vkl3g'></dl>
                  <dir id='czqd6'><del id='czqd6'><del id='czqd6'></del><pre id='czqd6'><pre id='czqd6'><option id='czqd6'><address id='czqd6'></address><bdo id='czqd6'><tr id='czqd6'><acronym id='czqd6'><pre id='czqd6'></pre></acronym><div id='czqd6'></div></tr></bdo></option></pre><small id='czqd6'><address id='czqd6'><u id='czqd6'><legend id='czqd6'><option id='czqd6'><abbr id='czqd6'></abbr><li id='czqd6'><pre id='czqd6'></pre></li></option></legend><select id='czqd6'></select></u></address></small></pre></del><sup id='czqd6'></sup><blockquote id='czqd6'><dt id='czqd6'></dt></blockquote><blockquote id='czqd6'></blockquote></dir><tt id='czqd6'></tt><u id='czqd6'><tt id='czqd6'><form id='czqd6'></form></tt><td id='czqd6'><dt id='czqd6'></dt></td></u>
                1. <code id='czqd6'><i id='czqd6'><q id='czqd6'><legend id='czqd6'><pre id='czqd6'><style id='czqd6'><acronym id='czqd6'><i id='czqd6'><form id='czqd6'><option id='czqd6'><center id='czqd6'></center></option></form></i></acronym></style><tt id='czqd6'></tt></pre></legend></q></i></code><center id='czqd6'></center>

                    <dd id='czqd6'></dd>

                      <style id='czqd6'></style><sub id='czqd6'><dfn id='czqd6'><abbr id='czqd6'><big id='czqd6'><bdo id='czqd6'></bdo></big></abbr></dfn></sub>
                      <dir id='czqd6'></dir>
                    1. 当前位置 : IT培训网 > 移动开发 > android > 跟Android培训学校学习好的Android开发习惯

                      跟Android培训学校学习好的Android开发习惯

                      时间:2015-08-23 15:26:39  来源:Android培训网  作者:IT培训网  已有:名学员访问该课程
                      四大Android开发习惯供大家参考。

                      刚开始学习android开发时候就养成好的习惯,会在以后的开发过程中起到很大作用,比如文件命名,代码的备份,注释等。今天IT培训网给大家分享android开发好习惯。

                      一、Android编码规范

                      1.javaDAIMAZHONGBUCHUXIANZHONGWEN,ZUIDUOZHUSHIZHONGKEYICHUXIANZHONGWEN;

                      2.JUBUBIANLIANGMINGMING、JINGTAICHENGYUANBIANLIANGMINGMING:ZHINENGBAOHANZIMU,DANCISHOUZIMUCHUDIYIGEDOUWEIDAXIE,QITAZIMUDOUWEIXIAOXIE;

                      3.CHANGLIANGMINGMING:ZHINENGBAOHANZIMUHE_,ZIMUQUANBUDAXIE,DANCIZHIJIANYONG_GEKAI;

                      天下棋牌下载 4.layoutZHONGDEidMINGMING:MINGMINGMOSHIWEI:viewSUOXIE_MOKUAIMINGCHENG_viewDELUOJIMINGCHENG

                      天下棋牌下载 viewDESUOXIEXIANGQINGRUXIA

                      LinearLayout:ll

                      RelativeLayout:rl

                      TextView:tv

                      天下棋牌下载 ImageView:iv

                      天下棋牌下载 ImageButton:ib

                      Button:btn

                      5.activityZHONGDEviewBIANLIANGMINGMING

                      MINGMINGMOSHIWEI:viewSUOXIE+LUOJIMINGCHENG

                      JIANYI:RUGUOlayoutWENJIANHENFUZA,JIANYIJIANGlayoutFENCHENGDUOGEMOKUAI,MEIGEMOKUAIDINGYIYIGEmoduleViewHolder,QICHENGYUANBIANLIANGBAOHANSUOSHUview

                      天下棋牌下载 6.strings.xmlZHONGDEidMINGMING:

                      MINGMINGMOSHI:activityMINGCHENG_GONGNENGMOKUAIMINGCHENG_LUOJIMINGCHENG activityMINGCHENG_LUOJIMINGCHENG common_LUOJIMINGCHENG

                      strings.xmlZHONG,SHIYONGactivityMINGCHENGZHUSHI,JIANGWENJIANNEIRONGQUFENKAILAI

                      7.drawableZHONGDETUPIANMINGMING

                      MINGMINGMOSHI:activityMINGCHENG_LUOJIMINGCHENG/common_LUOJIMINGCHENG

                      7.styles.xml:JIANGlayoutZHONGBUDUANZHONGXIANDEstyleTILIANCHUTONGYONGDEstyleTONGYONGZUJIAN,FANGDAOstyles.xmlZHONG;

                      8.SHIYONGlayer-listHEselector

                      天下棋牌下载 9.TUPIANJINLIANGFENCHAICHENGDUOGEKEZHONGYONGDETUPIAN

                      10.FUWUDUANKEYISHIXIANDE,JIUBUYAOFANGZAIKEHUDUAN

                      11.YINYONGDISANFANGKUYAOSHENZHONG,BIMIANYINGYONGDARONGLIANGDEDISANFANGKU,DAOZHIKEHUDUANBAOFEICHANGDA

                      12.CHULIYINGYONGQUANJUYICHANGHECUOWU,JIANGCUOWUYIYOUJIANDEXINGSHIFASONGJIFUWUDUAN

                      天下棋牌下载 13.TUPIANDE.9CHULI

                      14.SHIYONGJINGTAIBIANLIANGFANGSHISHIXIANJIEMIANJIANGONGXIANGYAOSHENZHONG

                      15.Log(XITONGMINGCHENG MOKUAIMINGCHENG JIEKOUMINGCHENG,XIANGXIMIAOSHU)

                      16.DANYUANCESHI(LUOJICESHI、JIEMIANCESHI)

                      天下棋牌下载 17.BUYAOZHONGYONGFULEIDEhandler,DUIYINGYIGELEIDEhandlerYEBUYINGGAIRANGQIZILEIYONGDAO,FOUZEHUIDAOZHImessage.whatCHONGTU

                      天下棋牌下载 18.activityZHONGZAIYIGEView.OnClickListenerZHONGCHULISUOYOUDELUOJI

                      19.strings.xmlZHONGSHIYONG%1$sSHIXIANZIFUCHUANDETONGPEI

                      20.RUGUODUOGEActivityZHONGBAOHANGONGTONGDEUICHULI,NEIMEKEYITILIANYIGECommonActivity,BATONGYONGBUFENJIAOYOUTALAICHULI,QITAactivityZHIYAOJICHENGTAJIKE

                      21.SHIYONGbutton+activitgroupSHIXIANtabXIAOGUOSHI,SHIYONGButton.setSelected(true),QUEBAOANNIUCHUYUXUANZEZHUANGTAI,BINGSHIactivitygroupDEDANGQIANactivityYUGAIbuttonDUIYING

                      22.RUGUOSUOKAIFADEWEITONGYONGZUJIAN,WEIBIMIANCHONGTU,JIANGdrawable/layout/menu/valuesMULUXIADEWENJIANMINGZENGJIAQIANZHUI

                      23.SHUJUYIDINGYAOXIAOYAN,LIRU

                      ZIFUXINGZHUANSHUZIXING,RUGUOZHUANHUANSHIBAIYIDINGYAOYOUQUESHENGZHI;

                      FUWUDUANXIANGYINGSHUJUSHIFOUYOUXIAOPANDUAN;

                      二、Android性能优化

                      1.httpYONGgzipYASUO,SHEZHILIANJIECHAOSHISHIJIANHEXIANGYINGCHAOSHISHIJIAN

                      天下棋牌下载 httpQINGQIUANZHAOYEWUXUQIU,FENWEISHIFOUKEYIHUANCUNHEBUKEHUANCUN,NEIMEZAIWUWANGLUODEHUANJINGZHONG,RENGRANTONGGUOHUANCUNDEhttpresponseLIULANBUFENSHUJU,SHIXIANLIXIANYUEDU。

                      2.listview XINGNENGYOUHUA

                      1).FUYONGconvertView

                      ZAIgetItemViewZHONG,PANDUANconvertViewSHIFOUWEIKONG,RUGUOBUWEIKONG,KEFUYONG。RUGUOcouvertviewZHONGDEviewXUYAOTIANJIAlisterner,DAIMAYIDINGYAOZAIif(convertView==null){}ZHIWAI。

                      天下棋牌下载 2).YIBUJIAZAITUPIAN

                      itemZHONGRUGUOBAOHANYOUwebimage,NEIMEZUIHAOYIBUJIAZAI

                      天下棋牌下载 3).KUAISUHUADONGSHIBUXIANSHITUPIAN

                      DANGKUAISUHUADONGLIEBIAOSHI(SCROLL_STATE_FLING),itemZHONGDETUPIANHUOHUOQUXUYAOXIAOHAOZIYUANDEview,KEYIBUXIANSHICHULAI;ERCHUYUQITALIANGZHONGZHUANGTAI(SCROLL_STATE_IDLE HESCROLL_STATE_TOUCH_SCROLL),ZEJIANGNEIXIEviewXIANSHICHULAI

                      3.SHIYONGXIANCHENGCHI,FENWEIHEXINXIANCHENGCHIHEPUTONGXIANCHENGCHI,XIAZAITUPIANDENGHAOSHIRENWUFANGZHIZAIPUTONGXIANCHENGCHI,BIMIANHAOSHIRENWUZUSAIXIANCHENGCHIHOU,DAOZHISUOYOUYIBURENWUDOUBIXUDENGDAI

                      4.YIBURENWU,FENWEIHEXINRENWUHEPUTONGRENWU,ZHIYOUHEXINRENWUZHONGCHUXIANDEXITONGJICUOWUCAIHUIBAOCUO,YIBURENWUDEuiCAOZUOXUYAOPANDUANYUANactivitySHIFOUCHUYUJIHUOZHUANGTAI

                      天下棋牌下载 5.JINLIANGBIMIANstaticCHENGYUANBIANLIANGYINYONGZIYUANHAOFEIGUODUODESHILI,BIRUContext

                      天下棋牌下载 6.SHIYONGWeakReferenceDAITIQIANGYINYONG,RUOYINYONGKEYIRANGNINBAOCHIDUIDUIXIANGDEYINYONG,TONGSHIYUNXUGCZAIBIYAOSHISHIFANGDUIXIANG,HUISHOUNEICUN。DUIYUNEIXIECHUANGJIANBIANYIDANHAOFEIDALIANGNEICUNDEDUIXIANG,JIXIWANGBAOCHIGAIDUIXIANG,YOUYAOZAIYINGYONGCHENGXUXUYAOSHISHIYONG,TONGSHIXIWANGGCBIYAOSHIHUISHOUSHI,KEYIKAOLVSHIYONGRUOYINYONG。

                      7.CHAOJIDAPANGZIBitmap

                      JISHIDEXIAOHUI(ActivityDEonDestroySHI,JIANGbitmapHUISHOU)

                      SHEZHIYIDINGDECAIYANGLV

                      QIAOMIAODEYUNYONGRUANYINYONG

                      drawableDUIYINGresidDEZIYUAN,bitmapDUIYINGQITAZIYUAN8.BAOZHENGCursor ZHANYONGDENEICUNBEIJISHIDESHIFANGDIAO,ERBUSHIDENGDAIGCLAICHULI。BINGQIE AndroidMINGXIANSHIQINGXIANGYUBIANCHENGZHESHOUDONGDEJIANGCursor closeDIAO

                      9.XIANCHENGYESHIZAOCHENGNEICUNXIELUDEYIGEZHONGYAODEYUANTOU。XIANCHENGCHANSHENGNEICUNXIELUDEZHUYAOYUANYINZAIYUXIANCHENGSHENGMINGZHOUQIDEBUKEKONG

                      10.RUGUOImageViewDETUPIANSHILAIZIWANGLUO,JINXINGYIBUJIAZAI

                      天下棋牌下载 11.YINGYONGKAIFAZHONGZIDINGYIViewDESHIHOU,JIAOHUBUFEN,QIANWANBUYAOXIECHENGXIANCHENGBUDUANSHUAXINJIEMIANXIANSHI,ERSHIGENJUTouchListenerSHIJIANZHUDONGCHUFAJIEMIANDEGENGXIN

                      三、Android UI优化

                      天下棋牌下载 1.layoutZUJIANHUA,JINLIANGSHIYONGmergeJIincludeFUYONG

                      2.SHIYONGstyles,FUYONGYANGSHIDINGYI

                      3.RUANJIANPANDEDANCHUKONGZHI,BUYAORANGQIFUGAISHURUKUANG

                      4.SHUZI、ZIMUHEHANZIHUNPAIZHANWEIWENTI:JIANGSHUZIHEZIMUQUANJIAOHUA。YOUYUXIANZAIDADUOSHUQINGKUANGXIAWOMENDESHURUDOUSHIBANJIAO,SUOYI ZIMUHESHUZIDEZHANWEIWUFAQUEDING,DANSHIYIDANQUANJIAOHUAZHIHOU,SHUZI、ZIMUDEZHANWEIJIUHEYIGEHANZIDEZHANWEIXIANGTONGLE,ZHEIYANGJIUKEYIBIMIANYOUYUZHANWEIDAOZHIDEPAIBANWENTI。

                      5.YINGWENWENDANGPAIBAN:textviewZIDONGHUANXINGSHIYAOBAOCHIDANCIDEWANZHENGXING,JIEJUEFANGANSHIJISUANZIFUCHUANZHANGDU,RANHOUSHOUDONGSHEDINGMEIYIXINGXIANSHIDUOSHAOGEZIMUBINGJIASHANG‘n‘

                      6.FUZABUJUSHIYONGRelativeLayout

                      7.ZISHIYINGPINGMU,SHIYONGdpTIDAIpix

                      8.SHIYONGandroid:layout_weightHUOZHETableLayoutZHIZUODENGFENBUJU

                      9.SHIYONGanimation-listZHIZUODONGHUAXIAOGUO

                      四、其他的一些Android开发建议

                      天下棋牌下载 1.GENSHANGSHIDAIDEBUFA,BAEclipseHUANCHENGAndroid Studio,BASVNHUANCHENGGit,ZHEIDANGRANYAOSHIHEXIANGMUKAIFASHUXINGDEXUYAO,GitXUEXIZHONGWENWANGZHAN。

                      2.QINZUOZONGJIE,TUIJIANSHIYONGYINXIANGBIJI,BAYIXIEDONGDEJINGYANZONGJIEQILAI,BAHAIBUDONGDEWENZHANGGUALIMIAN,YOUSHIJIANJIUMANMANXIAOHUA;

                      3.DINGQIcode review,BUDUANDIEDAI,NIZONGHUIFAXIANYIXIEBUHELIDEDAIMA,HUOZHEXUYAOYOUHUADEDIFANG。

                      4.GUANZHUYIXIEZHIMINGDEJISHUDAVHUOWANGZHAN,LIMIANXUDUODONGXIZHIDENIQUXIAOHUA,DANZONGGUILAISHUO,QUAndroidGUANWANGHUOZHECANKAOYIFENJava APIWENDANGSUISHUOKUZAO,DANSHUXIZHIHOU,NIHUIYOUGENGDADEJINBU。

                      5.RUGUONIGONGSIMEIYOUQIANGDADECESHITUANDUI,FABUYINGYONGQIANZUIHAOBAYINGYONGFANGDAOCESHIPINGTAIQUCECE,BIRUYUNCEZHILEIDE;

                      6.QUYINGYONGBAOMINGDESHIHOUQIEJIQUTAIRONGYIZHONGFUDE,RUGUOTONGKUANSHOUJIYIJINGYOUGAIBAOMING,NEIMEHUIYINWEIQIANMINGBUTONGERDAOZHIANZHUANGBUSHANG,ZHEIYEGUAIZHONGGUOANZHUOSHICHANGTAIDUO,WUFAXIANGGoogle PlayNEIYANGJINXINGBAOMINGSHENHE。

                      天下棋牌下载 DUIYUYIGEAndroidKAIFAXINSHOULAISHUO,NENGYOUGENGXIANGXIDEDAANNEIKENENGHUIGENGYOUBANGZHU。

                      顶一下
                      (0)
                      0%
                      踩一下
                      (0)
                      0%

                      IT培训0元试听 每期开班座位有限.0元试听抢座开始! IT培训0元试听

                      • 姓名 : *
                      • 电话 : *
                      • QQ : *
                      • 留言 :
                      • 验证码 : 看不清?点击更换请输入正确的验证码

                      在线咨询在线咨询

                      温馨提示 : 请保持手机畅通,咨询老师为您
                      天下棋牌下载提供专属一对一报名服务。

                      ------分隔线----------------------------
                      ------分隔线----------------------------

                      TUIJIANNEIRONG

                      京梦棋牌 - 跟Android培训学校学习好的Android开发习惯-IT培训网 乐酷棋牌---天下棋牌下载_欢迎您 疯狂牛牛安卓---天下棋牌下载_欢迎您 娱乐正规网址-Welcome 升机棋牌---天下棋牌下载_Welcome