Custom attributes in Android fragments
The Link for Support4Demos is changed or can be changed so posting the complete solution. Here it goes. Create attrs.xml file in res/values folder. Or add the below content if file already exists. <?xml version=”1.0″ encoding=”utf-8″?> <resources> <declare-styleable name=”MyFragment”> <attr name=”my_string” format=”string”/> <attr name=”my_integer” format=”integer”/> </declare-styleable> Override the onInflate delegate of fragment and read attributes … Read more