亚洲国产成人,色呦呦内射午夜,无码一级片,无码人妻少妇色欲AV一区二区

<samp id="jg8hh"></samp>

<p id="jg8hh"></p><delect id="jg8hh"><em id="jg8hh"><blockquote id="jg8hh"></blockquote></em></delect><acronym id="jg8hh"><dd id="jg8hh"></dd></acronym><button id="jg8hh"><dd id="jg8hh"><acronym id="jg8hh"></acronym></dd></button><samp id="jg8hh"><em id="jg8hh"><blockquote id="jg8hh"></blockquote></em></samp>

<p id="jg8hh"></p>

<samp id="jg8hh"><legend id="jg8hh"></legend></samp>
<samp id="jg8hh"><legend id="jg8hh"><samp id="jg8hh"></samp></legend></samp>

<samp id="jg8hh"></samp>

<p id="jg8hh"></p><acronym id="jg8hh"></acronym><p id="jg8hh"><dd id="jg8hh"><acronym id="jg8hh"></acronym></dd></p><p id="jg8hh"></p>

<p id="jg8hh"></p><delect id="jg8hh"><legend id="jg8hh"><var id="jg8hh"></var></legend></delect><button id="jg8hh"><listing id="jg8hh"><i id="jg8hh"></i></listing></button>
<delect id="jg8hh"><legend id="jg8hh"><var id="jg8hh"></var></legend></delect>

自動(dòng)換行l(wèi)inearlayout

發(fā)布時(shí)間:2023-10-23
本文主要介紹自動(dòng)換行l(wèi)inearlayout,下面一起看看自動(dòng)換行l(wèi)inearlayout相關(guān)資訊。
轉(zhuǎn):(22條消息)radiogroup的博客帶自動(dòng)換行點(diǎn)擊事件_再見美猴王_ -csdn博客。
公共類myradiogroup擴(kuò)展了radio group { private static final string tag = radiogroupex public my radio group(context context){ super(context);} public my radio group(context context,attributeset attrs){ super(context,attrs);} @ override protected void on measure(int widthmeasurespec,int heightsmeasurespec){ int width size = measurespec . getsize(widthmeasurespec);int width mode = measure spec . get mode(widthmeasurespec);int heightsize = measure spec . getsize(heightsmeasurespec);int height mode = measure spec . get mode(heightmaurespec);//調(diào)用viewgroup的方法來度量視圖measure children(width measure spec,heightmeasurespec);//最大寬度int maxwidth = 0;//累計(jì)高度int total height = 0;//當(dāng)前行的累計(jì)線寬int line width = 0;//當(dāng)前行的最大行高int maxline height = 0;//用于記錄換行前的線寬和行高int oldheightint舊寬度;int count = get child count;//假設(shè)widthmode和heightmode都是_ most for(int i = 0;我數(shù);i){ view child = get child at(i);邊緣layout params params =(marginlayoutparams)child . getlayout params;//獲取該行的最高oldheight = maxlineheight//當(dāng)前最大寬度oldwidth = maxwidthint deltax = child . getmeasuredwidthparams . left margin params . right margin;if(line width deltax getpadding lightgetpadding lightwidth size){//如果換行,高度增加//與當(dāng)前最大寬度相比,獲得最寬寬度。你可以 t加上當(dāng)前子的寬度,所以你用寬度maxwidth = math.max (line width,width);//reset width line width = deltax;//累積高度totalheight = oldheight//重置行高。當(dāng)前視圖屬于下一行,因此當(dāng)前最大行高是該子級(jí)的高度加上marginmax line height = child。getmeasureheight參數(shù)。上邊距參數(shù)。底部邊距;log.v(標(biāo)簽, maxheightcho 0-@ . com 總高度 - maxwidth: maxwidth);} else {//不換行,累計(jì)寬度linewidth = deltax//不換行,計(jì)算最高int deltay = child . getmeasureheightparams . top margin params . bottom margin;maxline height = math . max(maxline height,deltay);} if (i == count-1) {//在它之前不添加下一行。如果是最后一行,必須疊加最后一行的最高值:totalheight = maxlineheight//將計(jì)算的最后一行與其前面最寬的一行進(jìn)行比較maxwidth = math.max(線寬,舊寬度);} }//加上當(dāng)前容器的填充值maxwidth = getpadding lightgetpadding light;total height = getpadding topgetpadding bottom;setmeasureddimension(width mode = = measure spec。確實(shí)如此。寬度尺寸:最大寬度,高度模式==測(cè)量規(guī)格。確實(shí)如此。h:總高度);} @ override protected void onlayout(boolean changed,int l,int t,int r,int b){ int count = get child count;//pre是所有前一個(gè)子元素的添加位置。int pre left = getpadding left;int pretop = getpadding top;//記錄每行的最高值int max height = 0;for(int i = 0;我數(shù);i){ view child = get child at(i);marginlayoutparams params =(marginlayoutparams)child . getlayoutparams;//r-l是當(dāng)前容器的寬度。如果子視圖的累積寬度大于容器寬度,則換行。if(前置左參數(shù)。左邊距子對(duì)象。getmeasurewidth參數(shù)。右邊距getpadding light(r-l)){//reset pre left = getpadding left;//選擇身高最大的孩子作為設(shè)置pretop = pretop maxheightmaxheight = getchildat(i)。getmeasuredheightparams . top margin params . bottom margin;} else {//不換行,計(jì)算最大高度max height = math.max (max height,child。getmeasureheight參數(shù)。上邊距參數(shù)。下邊距);}//左坐標(biāo)intleft = prelefparams。左邊距;//top coordinate int top = pretop params . top margin;int right = left child . getmeasuredwidth;int bottom = top child . getmeasuredheight;//子視圖的layout child.layout (left,top,right,bottom);//計(jì)算布局后,preleft = params的值。leftmarginchild。getmeasurewidth參數(shù)。右邊距;}}}標(biāo)簽:
寬度包裝
了解更多自動(dòng)換行l(wèi)inearlayout相關(guān)內(nèi)容請(qǐng)關(guān)注本站點(diǎn)。
上一個(gè):vivoxplus4g信號(hào)怎么樣,ViVo手機(jī)信號(hào)好嗎
下一個(gè):吊絲球竹的種植技術(shù)

vue-admin-template權(quán)限管理(vuetemplate admin)
筆記本硬盤線斷了,筆記本硬盤線斷了怎么解決
食用仙人掌大田栽培技術(shù)
選擇適合窗臺(tái)盆栽的花卉
外星人筆記本重裝win10后會(huì)死機(jī)(外星人筆記本重裝win10怎么連接WiFi)
其它茶是喝,普洱茶要品
電腦上怎么安裝微信app(怎么在電腦上安裝apk)
茶--心靈的通道
網(wǎng)站建設(shè)需求文檔包含什么內(nèi)容?怎樣搭建一個(gè)網(wǎng)站?
茶與水的緣份 許是因一萬年前的傾心相視