Posts

How to use Palette API to extract colors from Image or Vector drawable Image Fully detailed tutorial

Image
The usages example of Palette API - Android Studio Hello Guys, Today I going to share an amazing tutorial on Palette API, The API is very easy to implement and has many useful features, but today I going to share the only the process of how we can use Palette to get Color from regular Image, Or from vector drawbles. The old constructor instances: Bitmap bmp; //(Keep In mind that, You need decode the bitmap or vector first to get its color from palette, and this is just an example) Palette palette = Palette.generate(bmp); is deprecated from android API 29, So app target SDK 29 or Minimum SDK 29 we need an alternative version of this constructor. Don't worry, I am here to help! The Palette.generate(Bitmap) deprecated,The alternative code is here! Now time to write the right code for palette.generate(Bitmap) & for color extraction The Code: //Starts the code from here! //decode the bitmap so that palette can use this bitmap

Load intent:// url in WebView

Image
handle Intent type url in WebView Programmatically! Probably, you may be looking for Url's that starts with this suffix >>> intent://... and you may confused, how you can control this type of Url , Okay don't worry, i am here to fix your problem, as well as discuss and customize its behaviour. To contorl this Url we must implement WebViewClient in our WebView Activity Like this >>> C:\Users\Nurujjaman Pollob\Documents\NetBeansProjects\Nurujjaman Pollob\src\nurujjaman\pollob\Package.java 1 /* 2 * Copyright 2020 Nurujjaman Pollob. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the