for some things i got it translated from
to
to be used in a wrapper...
But actually i want to translate this from using R to values set in the wrapper
The styles.xml will be in the res-folder of the b4a project and will have content
What do i need to do in java to load such an xml in the library (Eclipse; no res folder exists. Even R is not available.)? Or how do i create a
by code?
B4X:
mProgressDrawable = (GradientDrawable) getDrawable(R.drawable.rect_progress).mutate();
B4X:
int resID = getResources().getIdentifier("rect_progress", "drawable", mpkg);
mProgressDrawable = (GradientDrawable) getDrawable(resID).mutate();
But actually i want to translate this from using R to values set in the wrapper
B4X:
private void initAttributes(Context context, AttributeSet attributeSet) {
TypedArray attr = getTypedArray(context, attributeSet, R.styleable.ProcessButton);
The styles.xml will be in the res-folder of the b4a project and will have content
<resources>
<declare-styleable name="ProcessButton">
<attr name="pb_textProgress" format="string" />
<attr name="pb_textComplete" format="string" />
<attr name="pb_textError" format="string" />
<attr name="pb_colorProgress" format="color" />
<attr name="pb_colorComplete" format="color" />
<attr name="pb_colorError" format="color" />
</declare-styleable>
<declare-styleable name="FlatButton">
<attr name="pb_colorPressed" format="color" />
<attr name="pb_colorNormal" format="color" />
<attr name="pb_cornerRadius" format="dimension" />
</declare-styleable>
</resources>
What do i need to do in java to load such an xml in the library (Eclipse; no res folder exists. Even R is not available.)? Or how do i create a
B4X:
TypedArray attr