Problem with my Extension


I created Extension aix to measure text width and height
I used : import java.awt.Font;
and create object fnt from class Font:
Font fnt = new Font(FontName, Font.BOLD, FontSize);

My code sure correct and run in java compiler and my Extension was build successful
But when i am using my extension in ai2 or AppyBuilder … error message appears

Runtime Error
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/awt/Font;

what is the problem ?



What are you useing this for?
Could you get away with just measuring the View?


I created this extension to improve responsive controls in any app


Could you get away with just measuring the View?


measuring the view ? what are your mean ?


You can measure the width and height of the View(TextView, EditText, etc…)


Ken … I need to measure text width and height as feature to any one not only for controls… may be there is another usage for this feature


Is there is another class can use fonts compatible with extension which is using with ai2 or others same platforms


I don’t understand what you are trying to do.

That being said maybe this will help, or maybe not.


this link not working



you asked me what is the benefit of this feature… for example if i want create rectangle in canvas in ai2
and put in the rectangle changeable text so rectangle must expand to contain the text



I am not sure but i will try to make some tests with android classes… thanks Ken