in my ui.xml, i have style like below
<ui:style src="../teststyle.css" />
if i want to programmatically use the style inside java file rather than ui.xml, in my widget how to call .setStyleName(..) as the css is obfuscated
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to do the following steps to use the styles in your view class:
CssResourcein your view classtypeattribute to your<ui:style>element (the type must match the interface of step 1):For each of the css classes you want to access in your view class you need to add a method to the
Styleinterface (as done withmyStyle())You can now access the style via the
stylefield (style.myStyle())Hope that helps.