Editbox Hint - Always show hint

后端 未结 2 1796
半阙折子戏
半阙折子戏 2021-01-21 01:56

I have a textbox with a hint but I want the hint to always be shown, even when there is an input in the TB. Example is the \"To\" field in the Gmail app.

2条回答
  •  不要未来只要你来
    2021-01-21 02:29

    The first thing that came to mind is to insert two editText layout relative layout. First over second.at the top of that - put background as android.R.color.transparent Work with top elevent of relative layout! In item below - set hint(that you want) and try to put text. May be you will have specify padding of first element of top to greate display.

    Oh. And one more thing. Maybe put to editText background background image - but is the bad to scalability.

提交回复
热议问题