i try create custom view.
attrs.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <declare-styleable name="clickedview"> <attr name="clicked" format="boolean" /> </declare-styleable> </resources>
clickedview.java
public class clickedview extends view { public clickedview(context context, @nullable attributeset attrs) { super(context, attrs); } }
inside layout of choise -
<clickedview android:layout_width="match_parent" android:layout_height="match_parent" app:clicked="true"/>
the problem cant use attribute defined - clicked, since 'app' unexpected namespace. should overcome problem?
Comments
Post a Comment