The danger of using getSimpleName() as TAG for Fragment

When we want to add a Fragment into a container of an Activity, we’ll normally use a TAG as it’s ID.

.add(containerResource, fragment, fragmentTAG).commit()

What’s a good TAG name we could use? It’s the class name itself. To simplify thing, maybe just use the simple name of the class, given we…




Sharing iOS, Android and relevant Mobile App Development Technology and Learning

Recommended from Medium

Call Stateful Contracts Consecutively via GUI

Geospatial indexing on Hilbert curves

Comparing various cloud computing platforms

Setup of Wordpress with MySQL using private and public subnets using Nat-Gateway by terraform

LeetCode Patterns Adventure 20— Average of Levels in Binary Tree

Hacking Scikit-Learn’s Vectorizers

Taming the Beast

Accessing AWS ElastiCache (Redis) from multiple AWS accounts via AWS PrivateLink

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Sharing Software Development Experience, focus on Mobile.

More from Medium

Setting UserAgent in Android Webview

How To Test Kotlin Coroutines?

People creating

Exploring Jetpack WindowManager for Foldable Devices

Jetpack DataStore in Modern Android Development