¡@

Home 

2014/10/16 ¤W¤È 08:20:35

android Programming Glossary: notification_text_color

Custom notification layouts and text colors

http://stackoverflow.com/questions/4867338/custom-notification-layouts-and-text-colors

. Here's the code that extracts the default text color and text size in scaled density pixels sp . private Integer notification_text_color null private float notification_text_size 11 private final String COLOR_SEARCH_RECURSE_TIP SOME_SAMPLE_TEXT private boolean.. text TextView gp.getChildAt i final String szText text.getText .toString if COLOR_SEARCH_RECURSE_TIP.equals szText notification_text_color text.getTextColors .getDefaultColor notification_text_size text.getTextSize DisplayMetrics metrics new DisplayMetrics.. i instanceof ViewGroup return recurseGroup ViewGroup gp.getChildAt i return false private void extractColors if notification_text_color null return try Notification ntf new Notification ntf.setLatestEventInfo this COLOR_SEARCH_RECURSE_TIP Utest null LinearLayout..