문제

On my HTC Desire (Froyo) I use Power Control Widget to enable Wi-Fi. When I press Wi-Fi button a message "Turn on Wi-Fi" (inside gray tiny box) appears at bottom of home screen (and fades out after 2-3 seconds). I looked through Settings package (platform/packages/apps/Settings.git), but haven't found any usage of that specific string other that within Preferences view.

Does anyone have any idea what how this message is displayed and if this mechanism is available for 3rd party app?

도움이 되었습니까?

해결책

다른 팁

It's called a Toast.

You can invoke it in any activty.

Toast.makeText(CurrentClassName.this,"The message you would like to display",Toast.LENGTH_SHORT).show();

You can substitute Toast.LENGTH_SHORT for Toast.LENGTH_LONG depending on what you want.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top