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

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

如何使用復(fù)合可繪制對象而不是包含ImageView和TextView的LinearLayout

如何使用復(fù)合可繪制對象而不是包含ImageView和TextView的LinearLayout

繁星淼淼 2019-12-16 09:47:21
針對我的代碼運(yùn)行新的Lint工具。它提出了很多很好的建議,但是我無法理解這一建議。此標(biāo)簽及其子標(biāo)簽可以替換為一個(gè)和一個(gè)可繪制的復(fù)合標(biāo)簽問題:檢查是否可以使用復(fù)合drawable將當(dāng)前節(jié)點(diǎn)替換為TextView。包含ImageView和TextView的LinearLayout可以作為復(fù)合可繪制對象更有效地處理這是我的布局<LinearLayoutandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:orientation="horizontal"android:layout_centerInParent="true"><ImageView     android:id="@+id/upImage"    android:layout_width="20dp"    android:layout_height="20dp"    android:layout_gravity="center_vertical"    android:scaleType="centerInside"    android:src="@drawable/up_count_big"></ImageView><TextView    android:id="@+id/LikeCount"    android:layout_width="wrap_content"    android:layout_height="wrap_content"    android:layout_marginLeft="2dp"    android:layout_marginBottom="1dp"    android:textColor="@color/gray"    android:textSize="16sp"    android:layout_gravity="center_vertical"></TextView></LinearLayout>有人可以提供在這種情況下如何制作復(fù)合畫的具體示例嗎?
查看完整描述

3 回答

?
慕的地6264312

TA貢獻(xiàn)1817條經(jīng)驗(yàn) 獲得超6個(gè)贊

如果由于某種原因需要通過代碼添加,則可以使用以下代碼:


mTextView.setCompoundDrawablesWithIntrinsicBounds(left, top, right, bottom);

左,上,右下方是Drawables


查看完整回答
反對 回復(fù) 2019-12-16
  • 3 回答
  • 0 關(guān)注
  • 537 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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