27 Aug 2012
I am using Synergy on my work setup, where the server runs on a iMac, to that iMac computer an Apple keyboard is connected. On such a keyboard the Windows button and Alt button are switched. So when using my mouse and keyboard on my Windows PC and using Visual Studio with ReSharper, trying to press Alt+Enter for some ReSharper commands, I sometimes accidentally press the Win+Enter combination instead. This opens up the Narrator in Windows 8, which is super annoying! I could not find an official way to disable this, but I found out that changing the permissions for the currently running user helped out a lot.
So here is what I did:
- Navigate to %systemroot%\System32
- In this folder a file called Narrator.exe is to be found
- Right click the file and choose Properties
- Choose the Security tab and press Advanced
- In the top of the window press Change to change the Owner permissions
- In the text field write your username and press OK to all the dialogs
Now you should be able to change the permissions of the file, this is where we remove all the permissions from your user and the user back to system, this way your user will not be able to start the Narrator.
- Right click the Narrator file again and choose Properties and Security tab
- Press Advanced
- Now that you are the owner you can change permissions for other users. Choose your own user and press Edit
- Remove the Read & Execute and Read permissions and press OK
- Now press Change in the top under Owner and write system in the text field
- Press OK to all dialogs
Now you should have removed all your permissions and changed the owner permissions the system, which means you cannot open the program anymore. When pressing the Win+Enter combination nothing should happen now. Enjoy!
10 Jul 2012
I was playing around this evening with the MonoDroid.ActionBar to add some functionality to be able to change themes at run time. For this I had to be able to add new Drawable to be reused for each Action Bar Item. Apparently when you set multiple views BackgroundDrawable with the same Drawable instance, it shares it state between these views. So in my case my Drawable was defined in XML and was a item selector for a button so that a different Drawable can be shown for each of the states: pressed, focused and so on. Then when pressing the items in the Action Bar, triggered the states for some of the other Action Bar Items, so when pressing one button the the state of another button was triggered.
I browsed around the world wide web and found some solutions using the method Mutate() which essentially should remove the shared Constant State in the Drawable, but as it still was the same exact reference I passed along nothing changed. Hence I was forced to duplicate the Drawable:
Above code creates a new Drawble each time I add an Item to the Action Bar and eliminates the problems with the visual state of the Item.
03 Jul 2012
I have seen some people asking how to implement a color picker in their Mono for Android application, and it seemed that there were no sample applications showing how to do this. So I decided to create one with different types of Color Pickers.
The Project, which you can find on Github, at the moment contains two different Color Picker dialogs. A simple one, which can also be found in the Android SDK samples and a more advanced one, where hue and alpha can be picked, which was ported from Sergey Margaritov's android-ColorPickerPreference appication.
Simple round color picker from Android SDK samples.
Sergey's Color Picker without the alpha control.
Sergey's Color Picker with the alpha control
The images seem a bit banded, but on the actual device it shows up nice and smooth. This is because the screenshots were taken from the emulator.
Feel free to fork and watch my github repo
with the project. Also leave a comment if you want to see other types of color pickers implemented or have questions.