This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// First you need to put .ttf of the font to Assets folder | |
// Let's say the font file name is: MyFont.ttf | |
// create typeface | |
var typeface = Typeface.CreateFromAsset(Assets, "MyFont.ttf"); | |
// find the TextView | |
var tvTitle = FindViewById<TextView>(Resource.Id.tvTitle); | |
// assign the typeface to the TextView |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.prototype.trimEnd = function(c) { | |
if (this.length == 0) return this; | |
c = c ? c : ' '; | |
var i = this.length - 1; | |
for (; i >= 0 && this.charAt(i) == c; i--); | |
return this.substring(0, i + 1); | |
} | |
// Example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.prototype.trimStart = function(c) { | |
if (this.length == 0) return this; | |
c = c ? c : ' '; | |
var i = 0; | |
for (; i < this.length && this.charAt(i) == c; i++); | |
return this.substring(i); | |
} | |
// Example |
NewerOlder