Java鐭ヨ瘑鍒嗕韩缃?- 杞绘澗瀛︿範浠庢寮€濮嬶紒聽聽聽聽

SVN瑙嗛鏁欑▼(缁撳悎eclipse,idea)鍏嶈垂棰嗗彇

姣曡浠e仛锛屽寘鏌ラ噸锛?a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=1982956321&site=qq&menu=yes">鑱旂郴浜篞Q锛?982956321锛? 姣曡澶х

棰嗗彇鍥藉唴浼樼灏变笟锛屽姞钖紝璺虫Ы椤圭洰璇剧▼婧愮爜-vue2+jwt+springboot+mybaits鍓嶅悗绔垎绂婚€氳褰曠郴缁熻绋?/h2>

SpringBoot鎵撻€犱紒涓氱骇杩涢攢瀛?/h2>

Java1234 VIP璇剧▼

棰嗗彇寰俊鎵爜鐧诲綍Java瀹炵幇瑙嗛鏁欑▼

Java1234鑷冲皧VIP锛堢壒浠锋椿鍔級

Android闈㈣瘯棰樺ぇ鍏?PDF 涓嬭浇


鍒嗕韩鍒帮細
鏃堕棿:2020-05-13 16:28鏉ユ簮:http://vitrailad.com 浣滆€?灏忛攱  渚垫潈涓炬姤
Android闈㈣瘯棰樺ぇ鍏?PDF 涓嬭浇
澶辨晥閾炬帴澶勭悊
Android闈㈣瘯棰樺ぇ鍏?PDF 涓嬭浇

鏈珯鏁寸悊涓嬭浇锛?/strong>
閾炬帴锛?a href="https://pan.baidu.com/s/1p7N-kM--2h45MV_9uQSJVQ" target="_blank">https://pan.baidu.com/s/1p7N-kM--2h45MV_9uQSJVQ 
鎻愬彇鐮侊細u6zb
 
鐩稿叧鎴浘锛?/strong>
 
涓昏鍐呭锛?/strong>

2019 骞寸櫨搴?Android 闈㈣瘯棰?鍏叡鎶€鏈偣 涔?View 缁樺埗娴佺▼ View 缁樺埗鏈哄埗 1. View 鏍戠殑缁樺浘娴佺▼銆愭枃鏈湁褰╄泲銆?褰?Activity 鎺ユ敹鍒扮劍鐐圭殑鏃跺€欙紝瀹冧細琚姹傜粯鍒跺竷灞€,璇ヨ姹傜敱 Android framework 澶勭悊.缁樺埗鏄粠鏍硅妭鐐瑰紑濮嬶紝瀵瑰竷灞€鏍戣繘琛?measure 鍜?draw銆傛暣涓?View 鏍戠殑缁樺浘娴佺▼鍦?ViewRoot.java 绫荤殑 performTraversals()鍑芥暟灞曞紑锛岃鍑芥暟 鎵€鍋?鐨勫伐浣滃彲绠€鍗曟鍐典负鏄惁闇€瑕侀噸鏂拌绠楄鍥惧ぇ灏?measure)銆佹槸鍚﹂渶瑕侀噸鏂?瀹夌疆瑙嗗浘鐨勪綅缃?layout)銆佷互鍙婃槸鍚﹂渶瑕侀噸缁?draw)锛屾祦绋嬪浘濡備笅锛?View 缁樺埗娴佺▼鍑芥暟璋冪敤閾?/div>
闇€瑕佽鏄庣殑鏄紝 鐢ㄦ埛涓诲姩璋冪敤 request锛屽彧浼氬嚭鍙?measure 鍜?layout 杩囩▼锛岃€屼笉浼氭墽琛?draw 杩囩▼2. 姒傚康 measure 鍜?layout 浠庢暣浣撲笂鏉ョ湅 Measure 鍜?Layout 涓や釜姝ラ鐨勬墽琛岋細
鏍戠殑閬嶅巻鏄湁搴忕殑锛岀敱鐖惰鍥惧埌瀛愯鍥撅紝姣忎竴涓?ViewGroup 璐熻矗娴嬬粯瀹冩墍鏈夌殑 瀛愯鍥撅紝鑰屾渶搴曞眰鐨?View 浼氳礋璐f祴缁樿嚜韬€?鍏蜂綋鍒嗘瀽 measure 杩囩▼鐢?measure(int, int)鏂规硶鍙戣捣锛屼粠涓婂埌涓嬫湁搴忕殑娴嬮噺 View锛屽湪 measure 杩囩▼鐨勬渶鍚庯紝姣忎釜瑙嗗浘瀛樺偍浜嗚嚜宸辩殑灏哄澶у皬鍜屾祴閲忚鏍笺€?layout 杩?绋嬬敱 layout(int, int, int, int)鏂规硶鍙戣捣锛屼篃鏄嚜涓婅€屼笅杩涜閬嶅巻銆傚湪璇ヨ繃绋嬩腑锛屾瘡 涓埗瑙嗗浘浼氭牴鎹?measure 杩囩▼寰楀埌鐨勫昂瀵告潵鎽嗘斁鑷繁鐨勫瓙瑙嗗浘銆?measure 杩囩▼浼氫负涓€涓?View 鍙婃墍鏈夊瓙鑺傜偣鐨?mMeasuredWidth 鍜?mMeasuredHeight 鍙橀噺璧嬪€硷紝璇ュ€煎彲浠ラ€氳繃 getMeasuredWidth()鍜?getMeasuredHeight()鏂规硶鑾峰緱銆傝€屼笖杩欎袱涓€煎繀椤诲湪鐖惰鍥剧害鏉熻寖鍥翠箣鍐咃紝杩?鏍锋墠鍙互淇濊瘉鎵€鏈夌殑鐖惰鍥鹃兘鎺ユ敹鎵€鏈夊瓙瑙嗗浘鐨勬祴閲忋€傚鏋滃瓙瑙嗗浘瀵逛簬 Measure 寰楀埌鐨勫ぇ灏忎笉婊℃剰鐨勬椂鍊欙紝鐖惰鍥句細浠嬪叆骞惰缃祴閲忚鍒欒繘琛岀浜屾 measure銆傛瘮濡傦紝鐖惰鍥惧彲浠ュ厛鏍规嵁鏈粰瀹氱殑 dimension 鍘绘祴閲忔瘡涓€涓瓙瑙嗗浘锛?濡傛灉鏈€缁堝瓙瑙嗗浘鐨勬湭绾︽潫灏哄澶ぇ鎴栬€呭お灏忕殑鏃跺€欙紝鐖惰鍥惧氨浼氫娇鐢ㄤ竴涓‘鍒囩殑 澶у皬鍐嶆瀵瑰瓙瑙嗗浘杩涜 measure銆?measure 杩囩▼浼犻€掑昂瀵哥殑涓や釜绫?/div>
1.ViewGroup.LayoutParams 锛圴iew 鑷韩鐨勫竷灞€鍙傛暟锛?2.MeasureSpecs 绫伙紙鐖惰鍥惧瀛愯鍥剧殑娴嬮噺瑕佹眰锛?ViewGroup.LayoutParams 杩欎釜绫绘垜浠緢甯歌锛屽氨鏄敤鏉ユ寚瀹氳鍥剧殑楂樺害鍜屽搴︾瓑鍙傛暟銆傚浜庢瘡涓鍥剧殑 height 鍜?width锛屼綘鏈変互涓嬮€夋嫨锛?1.鍏蜂綋鍊?2.MATCH_PARENT 琛ㄧず瀛愯鍥惧笇鏈涘拰鐖惰鍥句竴鏍峰ぇ(涓嶅寘鍚?padding 鍊? 3.WRAP_CONTENT 琛ㄧず瑙嗗浘涓烘濂借兘鍖呰9鍏跺唴瀹瑰ぇ灏?鍖呭惈 padding 鍊? ViewGroup 鐨勫瓙绫绘湁鍏跺搴旂殑 ViewGroup.LayoutParams 鐨勫瓙绫汇€傛瘮濡?RelativeLayout 鎷ユ湁鐨?ViewGroup.LayoutParams 鐨勫瓙绫?RelativeLayoutParams銆?鏈夋椂鎴戜滑闇€瑕佷娇鐢?view.getLayoutParams() 鏂规硶鑾峰彇涓€涓鍥?LayoutParams锛?鐒跺悗杩涜寮鸿浆锛屼絾鐢变簬涓嶇煡閬撳叾鍏蜂綋绫诲瀷锛屽彲鑳戒細瀵艰嚧寮鸿浆閿欒銆傚叾瀹炶鏂规硶寰?鍒扮殑灏辨槸鍏舵墍鍦ㄧ埗瑙嗗浘绫诲瀷鐨?LayoutParams锛屾瘮濡?View 鐨勭埗鎺т欢涓?RelativeLayout锛岄偅涔堝緱鍒扮殑 LayoutParams 绫诲瀷灏变负 RelativeLayoutParams

 

------鍒嗛殧绾?---------------------------
鍏虫敞Java1234寰俊鍏紬鍙?/strong>
鎺ㄨ崘璧勬枡