AS IDE font unreable - android-studio

I changed my windows system font to Google Sans which I like very much but now android studio ide font is not being displayed properly. How do I fix it, I do want to keep my system font though.

After some digging I found a file in
C:\Users\USERNAME\.AndroidStudio4.0\config\options
called ui.Inf.xml
which was
<application>
<component name="UISettings">
<option name="SHOW_MAIN_TOOLBAR" value="true" />
<option name="SHOW_MEMORY_INDICATOR" value="true" />
<option name="SHOW_NAVIGATION_BAR" value="false" />
<option name="SHOW_STATUS_BAR" value="false" />
</component>
</application>
I added these 3 lines
<option name="FONT_FACE" value="Consolas" />
<option name="FONT_SIZE" value="24" />
<option name="OVERRIDE_NONIDEA_LAF_FONTS" value="true" />
saved the file and restarted as.
Done!!!!!!!!!!!!!!!!!!!!

Related

Android Studio Kotlin Compiler warning

I found warning in Kotlin Compiler settings
Following modules override project settings: app
Project compiles and works perfect but can this warning make affect in future? And how to solve this.
Thanks in advance.
Open ProjectFolder/app/app.iml and edit the following node, changing useProjectSettings to true.
<facet type="kotlin-language" name="Kotlin">
<configuration version="3" platform="JVM 1.6" useProjectSettings="true">
<compilerSettings />
<compilerArguments>
<option name="destination" value="$MODULE_DIR$/build/tmp/kotlin-classes/debug" />
<option name="noStdlib" value="true" />
<option name="noReflect" value="true" />
<option name="moduleName" value="app_debug" />
<option name="addCompilerBuiltIns" value="true" />
<option name="loadBuiltInsFromDependencies" value="true" />
<option name="languageVersion" value="1.2" />
<option name="apiVersion" value="1.2" />
...
</compilerArguments>
</configuration>
</facet>

Specific cordova hooks in config.xml per platform

I was trying to use to run specific nodejs scripts per pratform.
In the docs it says it is possible set a hook per platform:
https://cordova.apache.org/docs/en/edge/guide_appdev_hooks_index.md.html
If i put the hooks in config.xml outsite of the platforms tags, the scripts will be called:
<hook type="before_platform_add" src="HookInstallPluginsWP8.js" />
<hook type="before_platform_add" src="HookInstallPluginsIOS.js" />
But if I put it inside a tag it does not run:
<platform name="wp8">
<preference name="fullscreen" value="true"/>
<hook type="before_platform_add" src="HookInstallPluginsWP8.js" />
</platform>
<platform name="ios">
<preference name="fullscreen" value="true"/>
<hook type="before_platform_add" src="HookInstallPluginsIOS.js" />
</platform>
What I'm doing wrong?
This doesn't seem to be supported until Cordova 5.x. Are you sure you are running the latest Cordova?
npm install -g cordova
I think I found the reason why this was happening.
Today I tried to add <icons> and <splash> images to my project and I faced the same situation. The icons and splash were not added if inside a platform tag.
In my case this was happening because inside a <platform> tag, it only could exist one type of tag.
For example:
<platform name="android">
<preference name="fullscreen" value="true"/>
<hook type="before_platform_add" src="HookInstallPluginsAndroid.js" />
<icon src="res/icons/android/icon-36-ldpi.png density="ldpi" />
</platform>
In this case the hook and the icon will be ignored.
I have to add different <platform> nodes:
<platform name="android">
<preference name="fullscreen" value="true"/>
</platform>
<platform name="android">
<icon src="res/icons/android/icon-36-ldpi.png density="ldpi" />
</platform>
<platform name="android">
<hook type="before_platform_add" src="HookInstallPluginsAndroid.js" />
</platform>
Is this a documented case? I did not found anything on cordova docs... maybe it's just a bogus situation?

Can't get devices language in phonegap

I'm doing this exact example from the phonegap docs.
<!DOCTYPE HTML>
<html>
<head>
<title>getPreferredLanguage Example</title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">
function checkLanguage() {
navigator.globalization.getPreferredLanguage(
function (language) {alert('language: ' + language.value + '\n');},
function () {alert('Error getting language\n');}
);
}
</script>
</head>
<body>
<button onclick="checkLanguage()">Click for language</button>
</body>
</html>
When I click the button I want it to return the language I'm using on my phone.
It works good if I run it through the PhoneGap app, while connected to the local server on my computer (phonegap serve) however it won't work after making the .apk and installing it on my phone. What am I missing?
edit: here's the config.xml
http://pastebin.com/t6fx3jRD
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.phonegap.helloworld" version="1.0.0"
xmlns="http://www.w3.org/ns/widgets"
xmlns:gap="http://phonegap.com/ns/1.0">
<name>hi bi</name>
<description>
sample stuff
</description>
<author email="support#phonegap.com" href="http://phonegap.com">
PhoneGap Team
</author>
<content src="index.html" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<preference name="phonegap-version" value="3.3.0" />
<preference name="permissions" value="none" />
<preference name="orientation" value="default" />
<preference name="target-device" value="universal" />
<preference name="fullscreen" value="true" />
<preference name="webviewbounce" value="true" />
<preference name="prerendered-icon" value="true" />
<preference name="stay-in-webview" value="false" />
<preference name="ios-statusbarstyle" value="black-opaque" />
<preference name="detect-data-types" value="true" />
<preference name="exit-on-suspend" value="false" />
<preference name="show-splash-screen-spinner" value="true" />
<preference name="auto-hide-splash-screen" value="true" />
<preference name="android-installLocation" value="auto" />
<icon src="icon.png" />
</widget>
I don't see any obvious problems, but there are five things that should be resolved.
you need to post your config.xml to this forum. If you delete that pastebin file, others will not be able to benefit from this. (If we can get it to work.)
you are using the generic file, which is not a bad thing, except the large file makes it more difficult to spot a problem.
you did NOT use <preference name="phonegap-version" value="X.X.X" />, which is not required. But since you do not, then by default you get the latest version (the bleeding edge) of the phonegap. (This might get you leading edge bugs which would be difficult to debug -- without asking for lots of help.)
Since you are using the latest version of Phonegap, and not 3.3.0, then you should reference leading edge - which does not have an full example.
Since you did NOT say what your target platform is, then perhaps you should look at the Bug List
Lastly, you might consider using an earlier version, say <preference name="phonegap-version" value="3.3.0" />, and try you build again. Oh and RTFM.
Best of Luck, Jesse

Configuration Errors upgrading from Azure 1.6 to 1.7

I am trying to migrate to Visual Studio 2012 and Azure 1.7 from 2010 and 1.6. When I upgraded my worker project, I am now getting a bunch of errors like:
CloudServices58 : Cannot load imported module named 'Antimalware.'
Which brings me to this in Microsoft.WindowsAzure.targets:
<Target Name="PreValidateServiceModel">
<ValidateServiceFiles
AllowLegacyWebRoles="$(AllowLegacyWebRoles)"
ServiceDefinitionFile="#(SourceServiceDefinition)"
ServiceConfigurationFile="#(SourceServiceConfiguration)">
</ValidateServiceFiles>
</Target>
And errors like this in my cscfg file:
The setting
'Microsoft.WindowsAzure.Plugins.Antimalware.ServiceLocation' for role
MyProject.ProcessLogs is specified in the service configuration file,
but it is not declared in the service definition file.
The error brings me to here:
<ConfigurationSettings>
<...stuff.../>
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.ServiceLocation" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.EnableAntimalware" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.EnableRealtimeProtection" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.EnableWeeklyScheduledScans" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.DayForWeeklyScheduledScans" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.TimeForWeeklyScheduledScans" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.ExcludedExtensions" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.ExcludedPaths" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.ExcludedProcesses" value="" />
</ConfigurationSettings>
I am pretty lost, any ideas?
I just needed to download and install this: http://www.microsoft.com/en-us/download/details.aspx?id=29209

codeblocks/mingw & windres problems building a .dll (VST Plugin) with png resources

I have a VST plugin that compiles fine with VS200X / MSVC. I am trying to make a Codeblocks/MinGW project also for users who prefer that environment.
When I build the dll with codeblocks it works in a VST host, with GUI, until I start trying to include resources (.png files)
I include the .rc file in the codeblocks project. The resource paths in my resource.h don't have spaces.
If i try and copy the built .dll file the OS has it locked. It is almost as if windres is not compiling the resources successfully and retains a handle on the file - although by the size of the .dll it looks like the resources are there. If I try and run the dll in a vst host via GDB it doesn't hit any breakpoints... presumably the host can't load the .dll.
here are the codeblocks cbp compiler settings...
<Target title="Release Win32">
<Option output="build-win-cb\IPlugEffect" prefix_auto="1" extension_auto="1" />
<Option working_dir="build-win-cb\" />
<Option object_output="build-win-cb\Release" />
<Option type="3" />
<Option compiler="gcc" />
<Option parameters="IPlugEffect.dll" />
<Option host_application="C:\Program Files\vsthost\vsthost.exe" />
<Compiler>
<Add option="-O3" />
<Add option="-msse2" />
<Add option="-ffast-math" />
<Add option="-DVST_API" />
<Add option="-DWIN32" />
<Add option="-D_WIN32_WINNT=0x0501" />
<Add option="-DWINVER=0x0501" />
<Add option="-D_CRT_SECURE_NO_DEPRECATE" />
<Add option="-DPNG_NO_ASSEMBLER_CODE" />
<Add option="-DPNG_LIBPNG_SPECIALBUILD" />
<Add option="-DDLL_BUILD" />
</Compiler>
</Target>
resource.h
...
// Unique IDs for each image resource.
#define KNOB_ID 101
// Image resource locations for this plug.
...
IPlugEffect.rc
#include "resource.h"
KNOB_ID PNG KNOB_FN
#define KNOB_FN "resources/img/knob.png"
problem solved. My dll symbol exports/visibility were not correct for gcc.
http://forum.cockos.com/showpost.php?p=835609&postcount=21

Resources