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
// Output Android Icons.jsx | |
// 2012 Todd Linkner | |
// License: none (public domain) | |
// v1.0 - base file by Todd Linkner | |
// v1.1 - added support for XXHDPI, XXXHDPI and added PNG to the file selector | |
// | |
// This script is for Photoshop CS6. It outputs Android icons of the | |
// following sizes from a source PSD at least 512px x 512px | |
// | |
// store: |
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
namespace YourNamespace | |
{ | |
public interface ITextMeter | |
{ | |
double MeasureTextSize(string text, double width, double fontSize, string fontName = null); | |
} | |
} |
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
public class AndroidExternalStorageWriter : IAndroidExternalStorageWriter | |
{ | |
public string CreateFile(string filename, byte[] bytes) | |
{ | |
if (!Directory.Exists(Path.Combine(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath, "AccountMate"))) | |
Directory.CreateDirectory(Path.Combine(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath, "AccountMate")); | |
var path = Path.Combine(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath, "AccountMate", filename); | |
File.WriteAllBytes(path, bytes); |