Skip to content

Instantly share code, notes, and snippets.

View andrea-ale-sbarra's full-sized avatar
🎯
Focusing

Andrea Sbarra andrea-ale-sbarra

🎯
Focusing
View GitHub Profile
@andrea-ale-sbarra
andrea-ale-sbarra / Sepia
Created July 9, 2014 07:27
Rgb code for sepia color
Background: 245 239 220 alpha:1.0f
Text: 63 42 24 alpha:1.0f
@andrea-ale-sbarra
andrea-ale-sbarra / gist:f8277f49f6047ad47c57
Created April 30, 2014 07:51
Html5 support for a wordpress theme
/*
* Switches default core markup for search form, comment form,
* and comments to output valid HTML5.
*/
add_theme_support( 'html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption') );
@andrea-ale-sbarra
andrea-ale-sbarra / Custom font in WebView
Last active December 8, 2021 09:29
How to add custom font in Android WebView.
//View container..
View rootView = inflater.inflate(R.layout.fragment1, container, false);
//Global WebView
mWebView = (WebView) rootView.findViewById(R.id.enter_text);
//Font must be placed in assets/fonts folder
String text = "<html><style type='text/css'>@font-face { font-family: spqr; src: url('fonts/spqr.ttf'); } body p {font-family: spqr;}</style>"
+ "<body >" + "<p align=\"justify\" style=\"font-size: 22px; font-family: spqr;\">" + getString(R.string.enter_text) + "</p> "+ "</body></html>";