How to manage Angular2 “expression has changed after it was checked” exception when a component property depends on current datetime

My component has styles that depend on current datetime. In my component I’ve got the following function. private fontColor( dto : Dto ) : string { // date d’exécution du dto let dtoDate : Date = new Date( dto.LastExecution ); (…) let color = “hsl( ” + hue + “, 80%, ” + (maxLigness – … Read more

Valid values for android:fontFamily and what they map to?

In the answer to this question the user lists values for android:fontFamily and 12 variants (see below). Where do these values come from? The documentation for android:fontFamily does not list this information in any place (I checked here, and here). The strings are listed in the Android styles.xml file in various places, but how do … Read more

How to set TextView textStyle such as bold, italic

How to set TextView style (bold or italic) within Java and without using the XML layout? In other words, I need to write android:textStyle with Java. 27 s 27 textView.setTypeface(null, Typeface.BOLD_ITALIC); textView.setTypeface(null, Typeface.BOLD); textView.setTypeface(null, Typeface.ITALIC); textView.setTypeface(null, Typeface.NORMAL); To keep the previous typeface textView.setTypeface(textView.getTypeface(), Typeface.BOLD_ITALIC)