Skip to content

Tag: android

How to add a badge above a button?

In my MainActivity class, I have this button: I now want to add a badge with the number 1, using Material Design (see the documentation). This is how I tried: but what I get is the error ‘attachBadgeDrawable(com.google.android.material.badge.BadgeDrawable, android.view.View, android.widget.FrameLayout)&…

Add fragments (not replacing) with animation problem

When I used fragment (.add) method and used “fade_in/fade_out” animation When moving between them. It is gives me this error “java.lang.IllegalStateException: commit already called”. I followed this tutorial to add fragments and this question to use animation. Her’s my code Answe…

How to Filter Data in RxJava in Android

This is the Json data that i need to filter. This my “ViewModel” Class I want to filter the data that i’m getting from json. I only what to display all the data that contains “Bắn cá 2021” using the “game_name” attribute. The “getTips” function that i made…

Issue in Native Ad Flutter using google_mobile_sdk

I want to monetise my Flutter app using google_mobile_ads library with Native ads. I am facing some issues while facing this documentation – https://developers.google.com/admob/flutter/native I am not sure where to put the my_native_ad.xml file so that it can be referred by the Kotlin Main Activity File…