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…
Tag: android
How to remove the underline under TextInputLayout in Android Material Design?
I was trying to remove the underline from a material design component named TextInputLayout. I have tried several different answers from SO which didn’t work out for me so I decided to ask my own question. How can I remove this underline? XML: Answer As stated in the material design guideline, this is a…
how I can get data from the firebase database without repeat
I am developing a android app work with the firebase database , when the user add item to the database the app display it at the Realtime and that what I want , but the problem it is that same item show more than one time in the RecyclerView this is the code that I try But it does not
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…
How to filter data in FirebaseRecyclerOptions by spinner?
I’m using Firebase Database to show data in RecyclerView. Now I want to add a filter option by using an Android spinner. When I try to use different queries code doesn’t work. How can I use the spinner to show data for only 1 query and refresh this by changing the spinner item? This code now works…
How can I retreive values from firebase (one to many relationship)?
I can’t access name, imageurl and other properties because snapshot.getvalue returns true How can I retreive values from firebase having one to many relationship? Answer You’re trying to read the name, description and other properties from the “item01”: true node. That won’t work…
Show data from Firebase in Recyclerview, filtered on username – How to?
With the following line of code I’m able to show the data under “results” of the User “Hendrik”. But what I want, is to show the data under “results” according to which user is logged in. I think I’m supposed to work with FirebaseAuth to check which user is curr…
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…