Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 07/02/21 in all areas

  1. Dave Nottage

    Android 11 Support in 10.4.2?

    To clarify: Android 11 is supported. The distinction is in the value for targetSdkVersion that ends up in AndroidManifest.xml (currently, the value is set to 29, as opposed to 30). A targetSdkVersion of 30 is yet to be fully supported, as it requires changes to the support of accessing external storage (and possibly other aspects of API 30). This is what is being referred to with a statement of: They really should make the distinction if they are saying it like that. Also, targeting an API level (via targetSdkVersion) and building against an API level are 2 completely different things, so downloading platform API level 30 and changing the SDK settings to suit is not the same as changing the target.
  2. Martin Wienold

    Physically reduce jpeg image size??

    We use WIC Image Scaling in one of our applications. Some information with examples https://weblogs.asp.net/bleroy/resizing-images-from-the-server-using-wpf-wic-instead-of-gdi And an MSDN article https://docs.microsoft.com/en-us/windows/win32/wic/-wic-bitmapsources-howto-scale
  3. @Fabian1648 The adaptive icon is the way to have your icon full quality in all devices of all manufacturers. You did something wrong during the steps as it works on a blank project (you can test). Remembering that in some versions of android it is necessary to uninstall the old application for the icon to be updated. Also, on some androids (like LG's Android 10) when you click beyond uninstall, the android only disables the application, so you must go to Settings > Applications, and uninstall. Please provide more information, print the deployment and the manifest and the print also, after a Run, the generated files in the output folder, example: (project)\Android64\Release\(project)\res
  4. Alexander Sviridenkov

    Need suggestion on developing a custom component

    @Rollo62 thank you. Supported CSS properties for last version are listed there https://delphihtmlcomponents.com/css3.html For any version this list can be obtained by calling THtDocument.SupportedCSSProperties function CSS grids are not supported, but flex is supported since 4.4
  5. Adaptive Icon First of all, don’t uncheck the icons in deployment and don’t change the manifest. 1) Add your icons in .png format in Project Options normally. This is necessary to keep the compatibility with android 7.1 and oldest. 2) You need to create 3 files "ic_launcher.xml", "ic_launcher_background.xml" and "ic_launcher_foreground.xml" 3) ic_launcher.xml example: <?xml version="1.0" encoding="utf-8"?> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <background android:drawable="@drawable/ic_launcher_background" /> <foreground android:drawable="@drawable/ic_launcher_foreground" /> </adaptive-icon> Add it in deployment with remote path "res\drawable-anydpi-v26" 4) ic_background.xml example: <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="108dp" android:height="108dp" android:viewportWidth="108.0" android:viewportHeight="108.0"> <path android:name="square" android:fillColor="#ff3657f4" android:pathData="M0,0 L108,0 L108,108 L0,108 z" /> </vector> Note that I fixed a solid color (#ff3657f4), but you can put gradients in this xml or an image in place the background (not recomended). Add it in deployment with remote path "res\drawable" 5) ic_foreground.xml example: <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="108dp" android:height="108dp" android:viewportWidth="108.0" android:viewportHeight="108.0"> <path android:name="square" android:fillColor="#ffffffff" android:pathData="M 53.91,32.73 C 54.35,32.75 54.49,33.06 54.75,33.39 54.75,33.39 56.18,35.17 56.18,35.17 56.18,35.17 62.30,42.80 62.30,42.80 62.30,42.80 65.32,46.57 65.32,46.57 67.71,49.56 69.15,51.35 69.99,55.19 70.19,56.06 70.35,56.97 70.35,57.86 70.35,60.63 70.34,61.92 69.39,64.60 67.61,69.60 63.19,73.48 58.06,74.76 56.05,75.26 54.85,75.23 52.81,75.20 51.89,75.19 50.64,74.92 49.74,74.70 44.14,73.29 39.76,68.84 38.20,63.31 37.95,62.41 37.66,60.97 37.65,60.04 37.62,57.15 37.69,55.37 38.79,52.61 39.86,49.91 41.15,48.49 42.92,46.27 42.92,46.27 48.17,39.73 48.17,39.73 48.17,39.73 51.98,34.98 51.98,34.98 52.41,34.44 53.40,33.04 53.91,32.73 Z M 46.57,58.86 C 46.57,58.86 43.70,58.86 43.70,58.86 43.70,58.86 43.70,59.45 43.70,59.45 43.70,63.37 46.54,66.93 50.04,68.42 50.88,68.79 51.80,69.02 52.71,69.13 53.27,69.20 53.36,69.10 54.00,69.26 54.00,69.26 54.00,66.29 54.00,66.29 52.87,66.29 51.97,66.13 50.93,65.66 48.53,64.57 46.57,61.94 46.57,59.25 46.57,59.25 46.57,58.86 46.57,58.86 Z" /> </vector> You can change the white color (#ffffffff) and the pathData. Note: this pathData is the same path data inside the .svg. If you have your icon in .svg, just open it in notepad and copy the "d" field inside the "path" to the pathData of xml (only if the svg has size 108x108). Add it in deployment with remote path "res\drawable" Result (the low quality is due to the gif format) Extra You can do the same with the splash screen (vector splash screen). The vector splash screen works in all android versions supported by Delphi.
×