This question already has answers here:
How to configure an app to run correctly on a machine with a high DPI setting (e.g. 150%)?
(6 answers)
Closed 4 years ago.
Afternoon all!
Ever since I switched to my new laptop with a High DPI display, I have noticed that when I make new Windows Forms projects, Text and Images appear blurry and sometimes the size of the form can get bigger.
I found a guide on how to fix this however, it is in C#.
I have changed all my forms 'AutoScaleMode' to DPI rather than font but that has not worked.
Is there any code that needs to be run to make the forms crisp?
Thanks! ProudAviatior
I had the same problem and i looked up everywhere before someone referred me to an answer and I changed the manifest code accoridngly and it works now.
so just open app.manifest and include <dpiAware>true</dpiAware> to make your application DPI-aware:
<?xml version="1.0" encoding="utf-8"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>
It will do your work.
Reference: https://stackoverflow.com/a/13228495
Related
After upload app to appstore, i have from apple email:
ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview).
Recomendation from this not works: https://cordova.apache.org/howto/2020/03/18/wkwebviewonly.html
Meteor 2.2
xcode 12.5
You should make sure you don't have any more plugins that reference UIWebView, check for any old plugins for that. Make sure you use a recent version of cordova-ios too and cordova.
You could test this in your config.xml:
<preference name="WKWebViewOnly" value="true" />
You may as well try https://www.npmjs.com/package/cordova-plugin-wkwebview-engine-v2 because https://www.npmjs.com/package/cordova-plugin-wkwebview-engine is deprecated.
Edit: the official cordova blog recommended two years ago:
<platform name="ios">
<preference name="WKWebViewOnly" value="true" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
</platform>
and to use https://www.npmjs.com/package/cordova-plugin-wkwebview-engine
I am working on 3 windows applications which are built in VB. Last week I got an OS (windows 10) update which updates the build (version 1909 Build 18363.1500) of the system. After this update the scroll bars of all 3 applications in the Datagrid got invisible.
I tried to upgrade the framework to higher version but still it is not working.
This is likely the result of Microsoft update KB5001337 being installed in Windows 10 1909. See April 13, 2021—KB5001337 (OS Build 18363.1500), the "Known issues in this update" portion of that page.
According to that 'known issue', "Microsoft is working on a resolution and will provide an update in an upcoming release."
Until Microsoft fixes this, from other reports on the 'net about this problem, uninstalling KB5001337 will restore the scroll bars.
Running a later Windows release (eg, 20H2) does not seem to incur the problem, so another option is to upgrade Windows.
Edit - Workaround
(credit to Jimi for pointing this out in a comment)
At least for Winform impacted applications, it appears that specifying the dependency on v6 of the Common Controls library will bring the scroll bars back.
In the application manifest, add (or uncomment) the dependency for Commmon Controls. Should look at least similar to this:
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
I have a PCL-based Xamarin Forms solution using Xamarin.Forms version 2.3.4.270.
When building the Xamarin android project in Visual Studio 2017, in the autogenerated "...\obj\Debug\android\AndroidManifest.xml" file of the android project there is a mysterious activity added that causes two app icons to be deployed when running the app on a phone:
<activity android:name="md54d0b3c92dfecf2a187a4c8b660786aba.MainActivityForCodeAnalysisBugWorkaroundPleaseIgnore">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
I made sure that none of the projects in the whole solution is marked with "Enable Code Analysis on Build" and I have only one main activity with "MainLauncher = true"...
When starting the first app icon, only a blank empty view is shown. When starting the second app icon, the real app is started.
How can I get rid of the aditional app icon on android?
EDIT:
This is the MainActivity:
[Activity(Label = "#string/app_name", Theme = "#style/MyTheme", ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
And this is the SplashScreen-Activity with MainLauncher=true:
[Activity(Theme = "#style/MyTheme.Splash", MainLauncher = true, NoHistory = true)]
public class SplashActivity : AppCompatActivity
I have used this approach in various other xamarin.forms applications with no issues yet.
Here is the Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="#string/package_name" android:versionCode="1" android:versionName="1.0" android:installLocation="auto">
<uses-sdk android:minSdkVersion="15" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:label="#string/app_name" android:icon="#drawable/icon"></application>
</manifest>
This issue was due to a pcl dependency that wanted to fix a code analysis issue by adding a new activity with MainLauncher = true.
See https://bugzilla.xamarin.com/show_bug.cgi?id=43553.
The Android implementation of the pcl library added an additional activity.
In the main xamarin android project, Visual Studio included this activity in the manifest file.
So all in all the solution for the code analysis issue for android pcl libraries as described in the link, causes two app icons.
To remove the second app icon, just set the "MainLauncher" of the pseudo activity property to false. This will still let you run the code analysis but will not add a second app icon.
how to run an android wear app in virtual devices? i want to learn android wear develop, but i do not have a watch, so i want to use a virtual devices.
i set up a virtual devices in eclipse, 4.4.2W, when i run the app, the virtual device do not occur in the select devices list
<uses-feature android:name="android.hardware.type.watch" />
<uses-sdk
android:minSdkVersion="20"
android:targetSdkVersion="20" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity android:name="com.example.helloword.MyActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
From the Android-SDK get the complete set of things installed for 4.4.2W, and launch an AVD with Android Wear Round...you will be good to go :)
My app is supposed to support tablets, I don't have any Honeycomb device at hand but I guess it should work there too.
PROBLEM: in the Android Market, I can see:
Android 2.2: 58.1% (14,994)
Android 2.1: 17.6% (4,533)
Android 2.3.3: 11.6% (3,003)
Android 1.6: 3.6% (922)
Android 1.5: 2.8% (721)
Android 2.3: 1.4% (362)
Android 2.0.1: 0.0% (10)
Android 1.0: 0.0% (9)
Android 2.0: 0.0% (5)
Android 1.1: 0.0% (2)
No Android 3.x anywhere to be seen. Does it mean my app is not visible on the Android Market for 3.x users?
In case it matters, I did declare support for large screens:
<uses-sdk android:minSdkVersion="3"
android:targetSdkVersion="11"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<supports-screens
android:resizeable="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>
EDIT: I just noticed that "All apps in my category" also does not list Honeycomb. I can't believe there are more Android 1.0 installs than Android 3.x installs for all apps in my category. Is it a problem with Market statistics?
Assuming that you're referring to Ankidroid, it does show up on the Xoom and installs just fine. Once your stats are updated, you should see at least one 3.1 download.
And yes, it seems like a great app! :-)
I think it's an issue with the statistics window..
My widget is mostly of interest for the Asus Transformer users (initial release with 3.0, upgraded globally to 3.1 most everywhere).. If i look at statistics (mine and the "in my category" ones), anything above SDK 10 is missing (so no Android 3.* devices)..
Funnily enough, the top entry there is Android 2.2 12.6% (187)
In the next graph, is a per-device statistics... first item? EeePad 76.2% (1,127)
If you look at the first pie chart, about 80% of the devices are in the "Other" category.. I think (read: hope) it's just the statistics interface that's not showing the data properly, but the data is logged correctly.. I hope so anyway
SOLVED: 3.x was still not visible yesterday, but starting from today (2011 Jul 12) it is visible!
They also performed some UI changes. The Honeycomb bug fix was probably part of the whole overhaul.
At first sight I would say they did log the correct data all along but just did not display correctly (until today).