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

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

如何使用支持庫(kù)實(shí)現(xiàn)波紋動(dòng)畫?

如何使用支持庫(kù)實(shí)現(xiàn)波紋動(dòng)畫?

猛跑小豬 2019-08-24 14:33:27
如何使用支持庫(kù)實(shí)現(xiàn)波紋動(dòng)畫?我想在按鈕點(diǎn)擊上添加一個(gè)漣漪動(dòng)畫。我確實(shí)喜歡下面但它需要minSdKVersion到21。ripple.xml<ripple xmlns:android="http://schemas.android.com/apk/res/android"     android:color="?android:colorControlHighlight">     <item>         <shape android:shape="rectangle">             <solid android:color="?android:colorAccent" />         </shape>     </item></ripple>按鍵<com.devspark.robototextview.widget.RobotoButton     android:id="@+id/loginButton"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:background="@drawable/ripple"     android:text="@string/login_button" />我想讓它向后兼容設(shè)計(jì)庫(kù)。怎么做到這一點(diǎn)?
查看完整描述

3 回答

?
GCT1015

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

基本紋波設(shè)置

  • 視圖中包含的漣漪。
    android:background="?selectableItemBackground"

  • 超出視圖范圍的漣漪:
    android:background="?selectableItemBackgroundBorderless"

    看看這里解決?(attr)Java代碼中的xml引用。

支持庫(kù)

  • 使用?attr:(或?簡(jiǎn)寫)代替?android:attr引用支持庫(kù),因此可以返回到API 7。

漣漪與圖像/背景

  • 要獲得圖像或背景并覆蓋紋波,最簡(jiǎn)單的解決方案是使用或ViewFrameLayout包含在波紋組中。setForeground()setBackground()

老實(shí)說(shuō),除此之外沒有干凈的方式這樣做,盡管尼克布徹在漣漪的主題上發(fā)布了這個(gè)ImageView


查看完整回答
反對(duì) 回復(fù) 2019-08-24
  • 3 回答
  • 0 關(guān)注
  • 432 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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