在Android中icon+控件實現(xiàn)文字的多種效果-創(chuàng)新互聯(lián)

這篇文章給大家介紹在Android中icon+控件實現(xiàn)文字的多種效果,內容非常詳細,感興趣的小伙伴們可以參考借鑒,希望對大家能有所幫助。

創(chuàng)新互聯(lián)建站長期為成百上千客戶提供的網(wǎng)站建設服務,團隊從業(yè)經(jīng)驗10年,關注不同地域、不同群體,并針對不同對象提供差異化的產(chǎn)品和服務;打造開放共贏平臺,與合作伙伴共同營造健康的互聯(lián)網(wǎng)生態(tài)環(huán)境。為融安企業(yè)提供專業(yè)的成都網(wǎng)站建設、做網(wǎng)站,融安網(wǎng)站改版等技術服務。擁有十多年豐富建站經(jīng)驗和眾多成功案例,為您定制開發(fā)。

第一步 自定義屬性  

在res/values/目錄下新建attrs.xml文件,
添加如下屬性

<attr name="backColor" format="color" />
 <attr name="backColorPress" format="color" />
 <attr name="textColor" format="color" />
 <attr name="textColorPress" format="color" />

 <declare-styleable name="ButtonExtendM">
  <attr name="backColor"/>
  <attr name="backColorPress"/>
  <attr name="textColor"/>
  <attr name="textColorPress"/>
  <attr name="iconDrawable" format="reference" />
  <attr name="iconDrawablePress" format="reference" />
  <attr name="text" format="string" />
  <attr name="textSize" format="float" />
  <attr name="spacing" format="dimension" />
  <attr name="style">
   <enum name="iconLeft" value="0" />
   <enum name="iconRight" value="1" />
   <enum name="iconUp" value="2" />
   <enum name="iconBottom" value="3" />
  </attr>
 </declare-styleable>

標題名稱:在Android中icon+控件實現(xiàn)文字的多種效果-創(chuàng)新互聯(lián)
轉載注明:http://bm7419.com/article26/dcojjg.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供云服務器、品牌網(wǎng)站建設、ChatGPTGoogle、外貿(mào)網(wǎng)站建設、營銷型網(wǎng)站建設

廣告

聲明:本網(wǎng)站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)

營銷型網(wǎng)站建設