第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請及時(shí)綁定郵箱和手機(jī)立即綁定

子View位置顯示的不正確

為什么我寫出來的子View的圖標(biāo)是重疊的啊

private ?void getChild() {
? ?int count = getChildCount();
? ?for (int i = 0; i < count - 1; i++) {
? ? ? ?View child = getChildAt(i + 1);
? ? ? ?int l = (int) (mRadius * Math.sin(Math.PI / 2 / (count - 2) * i));
? ? ? ?int t = (int) (mRadius * Math.cos(Math.PI / 2 / (count - 2) * i));
? ? ? ?int width = child.getMeasuredWidth();
? ? ? ?int height = child.getMeasuredHeight();
? ? ? ?// 如果菜單位置在底部 左下,右下
? ? ? ?if (mPosition == Position.LEFT_BOTTOM || mPosition == Position.RIGHT_BOTTOM) {
? ? ? ? ? ?t = getMeasuredHeight() - height - t;
? ? ? ?}
? ? ? ?// 右上,右下
? ? ? ?if (mPosition == Position.RIGHT_TOP || mPosition == Position.RIGHT_BOTTOM) {
? ? ? ? ? ?l = getMeasuredWidth() - width - l;
? ? ? ?}
? ? ? ?child.layout(l, t, l + width, t + height);
? ?}
}

正在回答

2 回答

我也是?https://img1.sycdn.imooc.com//5bdab6e7000154e004840170.jpg

0 回復(fù) 有任何疑惑可以回復(fù)我~

叫截圖看看。

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
Android實(shí)現(xiàn)衛(wèi)星菜單
  • 參與學(xué)習(xí)       26324    人
  • 解答問題       59    個(gè)

學(xué)習(xí)仿Path的衛(wèi)星式菜單,課程涵蓋了自定義控件的整個(gè)過程

進(jìn)入課程

子View位置顯示的不正確

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)