hey people, i am trying to make mute button on my app,that could
sound-off\on sounds in app-such as ,sound of click,could of some
prezentation.. 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
open new item,i what to
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
http://c2.com/cgi/wiki?GlobalVariablesAreBad
On 30 April 2012 15:33, baturanija1 jadrankobodiroga1...@gmail.com wrote:
hey people, i am trying to make mute button on my app,that could
sound-off\on sounds in app-such as ,sound of click,could of some
prezentation.. is there any option that i
It would be better to create a singleton manager class for managing
settings for your app.
Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware
On Mon, Apr 30, 2012 at 8:53 AM, Daniel Drozdzewski
daniel.drozdzew...@gmail.com wrote:
ok..i have other question...i make code
if (AppSettings.playSounds)
{
play.mp.start(); //play is a another class which i what to start
music what i input in play-class
}
import android.app.Activity;
import android.content.Context;
import android.media.MediaPlayer;
import
Why are you holding onto a static Context reference? Your Activity IS a
context. I have never done anything with MediaPlayer but I doubt it needs
to be static either.
and shows an error..I can not recognize errorfrom logcat...What iam doing
wrong?
Telling us what the error is might be
(Bearing in mind the warning you were giving [by another member] about
globals being evil, don't make *everything* static.)
public static Context context;
public static MediaPlayer mp=MediaPlayer.create(context, R.drawable.klik);
Your error is probably that you declared an object called
7 matches
Mail list logo