Skip to content

Tag: android

Android – default dark mode

I want to implement in my app Dark mode. In default I wish it been following by the system, so in Main Activity I’ve placed: It works fine, but I if user wants to change its mind and select certain option in my app menu to toggle off/on dark mode, activity is restarting and app’s still following s…

I get the wrong output during the collection process

I made an order application. When I mark the radio buttons, it adds like this, I want it to write normal numbers Screen output like this I don’t want it like this I want it to collect made the sum wrong Answer If your goal is to get the sum of pizza.getPizza_size_price(), pizza.getIcecek() and pizza.get…

Deprecation of Drawable.getOpacity()

I am getting a deprecation warning for Drawable.getOpacity(). This class (MaterialProgressDrawable) extends Drawable and implements Animatable. Since getOpacity() is abstract in the parent class (@Deprecated public abstract @PixelFormat.Opacity int getOpacity();) I can’t remove this method altogether ei…

How to ignore pixels when merging bitmaps?

It’s my merging code how it works But I want to merge it without overlay black pixels. P.S. qr-code image is not transparent, green image not visible behind qr Answer The easiest way is to use a Paint when drawing the overlay (green) Bitmap, but I’m not sure which parameter to use as PorterDuff.Mo…

AAPT: error: not well-formed (invalid token)

I am working on an application, with following XML. This the XML of my Sign In Fragment. But when I try to clean/build my project the following error occurs: error: Error parsing XML: not well-formed (invalid token) What does it possibly mean? what i have done wrong? I’m really worried about this. i hav…