Trying to change settings

Put your problem here if it does not fit any of the other categories.

Trying to change settings

Postby sandis84 » Mon Aug 17, 2009 2:29 pm

So I have written this code, what is wrong do you think? Im trying to turn off animations, and add so that the first letter in an EditText is capitalized. As you can see I get the permission in the manifest-file and then try to write the new settings when my program boot. But the settings are never changed! Quite frustrating.


Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  3.  
  4.      package="myapps.testapp1"
  5.  
  6.      android:versionCode="1"
  7.  
  8.      android:versionName="1.0">
  9.  
  10.     <uses-permission android:name="android.permission.WRITE_SETTINGS" />
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.         @Override
  2.  
  3.         public void onCreate(Bundle savedInstanceState) {
  4.  
  5.                 super.onCreate(savedInstanceState);
  6.  
  7.                
  8.  
  9.                 android.provider.Settings.System.putInt(
  10.  
  11.                                 this.getContentResolver(), android.provider.Settings.System.WINDOW_ANIMATION_SCALE, 0);
  12.  
  13.                 android.provider.Settings.System.putInt(
  14.  
  15.                                 this.getContentResolver(), android.provider.Settings.System.TEXT_AUTO_CAPS, 1);
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
sandis84
Experienced Developer
Experienced Developer
 
Posts: 78
Joined: Fri Aug 07, 2009 3:54 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 28 guests