現(xiàn)在如果你運(yùn)行應(yīng)用,什么也不會(huì)發(fā)生。當(dāng)然,EditText的hint會(huì)表現(xiàn)的跟預(yù)期一致。但是沒有material動(dòng)畫也沒有浮動(dòng)標(biāo)簽。為什么會(huì)這樣?我們還缺少一些代碼。 第五步:設(shè)置 Hints 下面是setContentView方法,初始化對(duì)theTextInputLayout視圖的引用。 1 2 finalTextInputLayout usernameWrapper = (TextInputLayout) findViewById(...
www.dbjr.com.cn/article/1272...htm 2025-5-26