Android Question Java Code Error

Marcos Alves

Well-Known Member
Licensed User
Longtime User
Hello,

I'm trying to compile an app with the code:
B4X:
#If Java

    public static String toHtml(TextView sourceText) {
       
        String returnString = Html.toHtml(sourceText);
        return returnString;
       
    }
   
    public static TextView fromHtml(String htmlString) {
   
         TextView returnView = Html.fromHtml(htmlString);
        return returnView;
    }
   
#End If

But getting the error:

src\com\texttest\main.java:454: error: cannot find symbol
public static String toHtml(TextView sourceText) {
^
symbol: class TextView
location: class main

What's wrong? I really don't have practice to build java code in B4A... could anybody help?

Thanks!
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…