Heey
how is everybody??
i'm a beginner in android world, i saw some lessons how to make you
own app but i got some errors, hope that you can help me to fix them
here is my .java file
package com.KR.MySettings;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.TextView;
public class SettingsActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button UpdateSystemSetting =
(Button)findViewById(R.id.updatesystemsetting);
UpdateSystemSetting.setOnClickListener(new
Button.OnClickListener(){
@Override
public void onClick(View arg0) {
android.provider.Settings.System.putInt(getContentResolver(),android.provider.Settings.System.SCREEN_BRIGHTNESS_MODE,
0);
android.provider.Settings.System.putInt(getContentResolver(),android.provider.Settings.System.SCREEN_BRIGHTNESS,
10);
android.provider.Settings.System.putInt(getContentResolver(),android.provider.Settings.System.ACCELEROMETER_ROTATION,
0);
android.provider.Settings.System.putInt(getContentResolver(),android.provider.Settings.System.TRANSITION_ANIMATION_SCALE,
0);
android.provider.Settings.System.putInt(getContentResolver(),android.provider.Settings.System.BUTTON_KEY_LIGHT,
0);
}});
}
}
and when i try to compile it using this command line: C:\KR> ant
debug i used to get his error message
compile:
[javac] C:\Program Files\Android\android-sdk\tools\ant
\main_rules.xml:384: warning: 'includeantruntime' was not set,
defaulting to build.sysclasspath=last;
set to false for repeatable builds
[javac] Compiling 2 source files to C:\Brightness\bin\classes
[javac] C:\Brightness\src\com\KingRuin\MySettings
\SettingsActivity.java:27:cannot find symbol
[javac] symbol : variable BUTTON_KEY_LIGHT
[javac] location: class android.provider.Settings.System
[javac]
android.provider.Settings.System.putInt(getContentResolver(),android.provider.Settings.System.BUTTON_KEY_LIGHT,
0);
[javac] ^
[javac] 1 error
but when i delete this line from the source code
android.provider.Settings.System.putInt(getContentResolver(),android.provider.Settings.System.BUTTON_KEY_LIGHT,
0);
everything went ok, but i need that line
so what is the porblem please??
thanks alot
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en