is there any option that i can declare public variable-
such as int,and to be seen in other class in my other activity.When i

This would normally be done by using a static boolean / int in a class designed simply for holding 'global' data.

public class AppSettings
{
   public static boolean playSounds = true ;

}

Now any class should be able to access it:

AppSettings.playSounds = false ;

if (AppSettings.playSounds)
   // do something.

etc.


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to