How to use android custom component dynamic attr
I made a custom component, piechart and in the GraphicalView.class
, I set this in this class
Value=attrs.getAttributeIntValue(null, "GO", 80);
So now, I can add a component by put these code in xml
<view
class="org.piechart.GraphicalView"
android:id="@+id/piechart"
GO="48"
/>
but in this situation, i have to dynamic modify the piechart value in Activity, i hope i can use
View view1= (View)findViewById(R.id.开发者_JAVA百科piechart); view1.set ????
but i have no idea how to modify the value
i have to use xml to put a component to layout,and i have to dynamic modify the the component value
精彩评论