Not works, not also image from assets
It only works for storage files.
I am adding new blocks for the dominant color. trying…
Hi @Rahan_Sarang I haven’t found any solution yet. If you want instant solution than you should use this extension for image url :
Nice man
Smart MiniTools
Version
New Blocks :
Color Picker 🤡
// Used Code : https://github.com/christophesmet/colorpicker/blob/master/library/src/main/java/com/christophesmet/android/views/colorpicker/ColorPickerView.java
private void getColor(ImageView imageView, float x, float y){
Log.d("color picker", "touch x: " + x + " y: " + y);
Matrix invertMatrix = new Matrix();
imageView.getImageMatrix().invert(invertMatrix);
float[] mappedPoints = new float[]{x, y};
Log.d("color picker", "mapped touch x: " + mappedPoints[0] + " y: " + mappedPoints[1]);
invertMatrix.mapPoints(mappedPoints);
if (imageView.getDrawable() != null && imageView.getDrawable() instanceof BitmapDrawable &&
mappedPoints[0] > 0 && mappedPoints[1] > 0 &&
mappedPoints[0] < imageView.getDrawable().getIntrinsicWidth() && mappedPoints[1] < imageView.getDrawable().getIntrinsicHeight()) {
int color= ((BitmapDrawable) imageView.getDrawable()).getBitmap().getPixel((int) mappedPoints[0], (int) mappedPoints[1]);
ColorChanged(color, x, y);
}else {
ColorChanged(0, x, y);
}
}
Other Tools 🤔
Used code for these two blocks
New Property 😍
Changed Blocks :
Dominant Color blocks :
Now supports image url, image path and asset by these blocks.
Use of color picker 🤡
Video :
Download 👉
How can I do this with these blocks please can you show me ?
And also can the color name be written below it like it’s real name not the hex code
Download Color Picker aia.
This post was flagged by the community and is temporarily hidden.
OMG how is this the first time I see this
yeah but the keyboard is now overlapping on top of everything
You should give screenshots.
I’ll take a video of it in a sec
but simply the normal behavior of android is when the keyboard is shown the usable screen space shrinks and you can scroll to the last pixel in vertical scroll arrangement for example
but after full screen is triggered now the keyboard just shows as an overlay and the content behind it is not accessible… it doesn’t scroll to make the text field be at the top of the keyboard or any of the normal activities that should happen…
BTW this happens with all the ways to make the status bar invisible that I’ve tried in the last like two years
I’d hope that we have the ability to just make the status and navigation bars invisible without being in full screen mode that’s all (as I think full screen mode is the reason for this behavior but I’m not sure about it).
I am also confused how can I help you?
Code for this block -
@SimpleFunction(description = "Set fully transparent status bar and navigation bar. Required api level should be greater than or equal to KITKAT.")
public void SetFullScreen(){
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
Window w = activity.getWindow();
w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
w.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
}
}
}
May it will help and i am preparing for my exam. But i will try to help soon.
Best of luck
look up this simple fix I think it will fix this issue
and can this be set with activity starter? if so it would be amazing I’ve been trying to do it with no luck
@Taifun maybe you know
hey I was trying to make the extension myself but I’m stuck on getting the activity which I believe should be the main activity but how to do it?
private final Activity activity;
activity= container.$context();
thank you…
I tried my best nothing seems to actually fix the issue
now I got something like this which doesn’t keep the app stuck in fullscreen in the companion even if the block is removed as before… anyway it didn’t satisfy me
@SimpleFunction
public void SetFull() {
Window w = activity.getWindow();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
w.clearFlags(LayoutParams.FLAG_TRANSLUCENT_STATUS
| LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
w.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
}
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
w.addFlags(LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
w.setStatusBarColor(Color.TRANSPARENT);
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
w.setNavigationBarColor(Color.TRANSPARENT);
}
}