Skip to content

Instantly share code, notes, and snippets.

@sephiroth74
Created July 3, 2019 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sephiroth74/d666b251049008b8cf0f70b0a3ce67c8 to your computer and use it in GitHub Desktop.
Save sephiroth74/d666b251049008b8cf0f70b0a3ce67c8 to your computer and use it in GitHub Desktop.
Android find unused layouts
for f in `find . -iname "*.xml" | grep src/main/res/layout`; do echo $f ; git grep --count -e "R\.layout\.$(basename $f .xml)\W" --or -e "@layout/$(basename $f .xml)\W" | wc -l ; done | grep -B1 "0$"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment