I am developing an application where i am using TabHost.Now , at launching of the application the TabWidget remains disable. I have four buttons on the starting page of the application. When a user clicks one of the buttons , the TabWidget become enable. So far i have done that but now i want to add a toast message which is shown when the user doesn’t select any of four buttons but clicks on the TabWidgets. The toast is for prompting user that he/she have to select any of the four buttons above to enable TabWidget.
Please help me on the issue. Give some idea / sample code / example how can i do that
I have taken some different approach to do the task. I have set a relative layout above tabwidget & set the background color to transparent black , so the tabwidget will still remain visible to user. Then i have set a onclicklistener for the relative layout. So whenever a user taps on the tabwidget, actually he/she is tapping on the relative layout & a toast message will be displayed to prompt the user that the tabwidget is currently disable. When user will enable the tabwidget , the relative layout become invisible & the tabwidget come on top using bringtofront function. Thus i have done the trick on my app.
Sharing my idea because it can be useful for others too ….. 🙂