How to creat Toast Like view

by Tushar » Wed, 11 Mar 2009 16:16:51 GMT

Sponsored Links

Using android.widget.Toast one can created  floating view over the
application. I would like to created similar view which will float on
top of all running applications at a specified location. Any thoughts
on what should I need to do for this. I tried to created activity by
android:windowIsFloating ="true" , but didn't worked out.

Any suggestions ?

How to creat Toast Like view

by Gulfam » Wed, 11 Mar 2009 20:26:20 GMT

 Hi Tushar

You can make toast like this

public void showAlertMessage(Context context, String text){

        LayoutInflater inflater = (LayoutInflater)context.getSystemService
        View view = inflater.inflate(R.layout.toast_layout, null);
        // set the text in the view
        TextView message = (TextView) view.findViewById(;
        ImageView image = (ImageView)view.findViewById(;

        Toast toast = new Toast(context);


AND XML would be like this

<?xml version="1.0" encoding="utf-8"?>

xmlns:android="" ;


                                <!-- android:src="@drawable/vopium_logo_icon"
                        /> -->


another way to make toast is

Toast.makeText(context,"Any String",Toast.LENGTH_LONG).show();

Hope fully it will help u



Sponsored Links

How to creat Toast Like view

by mark . kahrl » Fri, 13 Mar 2009 06:31:31 GMT

 Did you look at PopupWindow in the /widgets package? it is toast
like, but persist until the user closes it.



How to creat Toast Like view

by gymshoe » Fri, 13 Mar 2009 11:13:36 GMT 


Other Threads

1. A couple of Rom questions for the experts

I have a couple of questions for the Rom developers/experts on here
regarding things that can be done with Android ROM's.

Is a parser Rom upgrade possible? So is it possible to change a small
part of a ROM and then allow users to upgrade their ROM easily?

So can I change a part of a ROM and then a customer can upgrade to the
newer ROM without having to be technically savvy and needing to root
and flash their devices?

Can a change be burnt into a ROM so that when a user selects "Restore
Factory Settings" that it doesn't remove the upgrade to the ROM?

So essentially I want to know if its possible (with a device
manufacturers permission) to add to a ROM some small additional parts
and then give this new ROM version as a firmware upgrade to the device
so that a user only has to "upgrade" and not go through the process of
rooting and flashing there device?


2. Pagi....OOT : Ask TFlash

Boys&Girls...., ada titipan pertanyaan dari temen...

Apa APN TFlash Unlimited berubah ? Soalnya katanya dari semalam sampe detik
ini gak bisa internetan baik di HH Android or di PC/Notebook ---> pake modem
kali ya

Sy sendiri sih ada, tp dah 2 bulan gak pernah di pake, bayar doang :P , kalo
mau nutup udah telat ya

~ pake web google mail ajah ~

"Indonesian Android Community [id-android]" 

3. Compiling and porting Open source android to Nexus One

4. Yellow colored background on button click

5. Closed: Pagi....OOT : Ask TFlash

6. Wifi drop Issues on Motorola Droid

7. Help Cara Menggembalikan partisi sdcard ke kapasitas semula