forked from inloop/svg2android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
158 lines (134 loc) · 6.54 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="Convert SVG to Android VectorDrawable">
<meta name="keywords" content="android,svg,convert,vectordrawable,drawable,lollipop">
<meta name="author" content="Juraj Novák">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Android SVG to VectorDrawable</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/ribbons.min.css" rel="stylesheet">
<link href="css/main.css" rel="stylesheet">
<link rel="image_src" href="img/icon.png"/>
<link rel="icon" type="image/png" href="img/icon.png"/>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<img src="img/icon.png" style="display: none;"/>
<div id="main-container" class="container">
<div id="header">
<img src="img/logo.svg" class="img-responsive pull-left" style="margin-right: 16px;" />
<h3>Android SVG to VectorDrawable</h3>
<p>...one VectorDrawable to rule all screen densities</p>
<span id="last-update" class="small">Last update: <span></span></span>
</div>
<div id="compat-error" class="alert alert-danger" style="display: none">
<div class="clearfix">
<img src="img/seriously.png" class="img-responsive pull-left"/>
<p>Sorry but your browser does not support some of new HTML5 features! Try using latest version of Google Chrome or
Firefox.</p>
</div>
</div>
<div class="panel panel-info" id="dropzone" onclick="dropzoneClick(this)">
<div class="panel-body">
<b>Drop file here</b> (or multiple files) to load content or click on this box to open file dialog.<br/>
<div class="nouploadinfo small">No file will be uploaded - uses only JavaScript HTML5 FileReader.<br /><br /></div>
<div class="nouploadinfo small alert alert-info" style="display: inline-block">
This tool has been deprecated. Use official <a href="https://developer.android.com/studio/write/vector-asset-studio#svg" id="deprecation-text"><b>Vector Asset Studio</b></a> instead.<br/>
</div>
</div>
</div>
<div id="output-box">
<div id="button-box" class="btn-group">
<button type="button" class="btn btn-primary btn-sm" onclick="download(this)">Download
</button>
<button type="button" class="btn btn-default btn-sm" onclick="selectAll(this)">Select all
</button>
</div>
<pre class="pre-scrollable" id="output-code"></pre>
</div>
<div class="alert alert-danger box" style="display: none"></div>
<div class="alert alert-warning box" style="display: none"></div>
<div class="alert alert-info box" style="display: none"></div>
<div class="alert alert-success box" id="success-box" style="display: none">
<b>Success:</b> create xml file and copy all contents into res/drawable directory
<div id="settings-area">
<div class="checkbox">
<label>
<input type="checkbox" class="opt-id-as-name" onchange="useIdAsName(this);">Import IDs from SVG as name
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="clear-groups" onchange="clearGroups(this);">Remove empty groups without attributes
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="wordwrap-pathdata" onchange="enableWordWrapPathData(this);">Word-wrap pathData
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="bake-transforms" onchange="bakeTransforms(this);"><i>Bake transforms into path (experimental)</i>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" class="enable-clippaths" onchange="enableClipPaths(this);"><i>Enable support for clip-path (work in progress)</i>
</label>
</div>
Android Support Library 23.2 has added support for VectorDrawable on Android API 7+ <a href="http://android-developers.blogspot.sk/2016/02/android-support-library-232.html" target="_blank">(more info)</a>
</div>
</div>
</div>
<div id="dlg-files" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">Multiple SVG files (<span id="files-count"></span> files)</h4>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary">Export</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div class="container">
<footer>
© 2020, Juraj Novák<br>
<small>| <a href="http://inloop.github.io/">other projects</a> |</small>
</footer>
</div>
<input type="file" id="dropzone-dialog" style="opacity: 0;display:none">
<div class="ribbon right grey hidden-xs">
<a href="https://github.com/inloop/svg2android">Fork me on GitHub</a>
</div>
<script src="js/jquery-3.1.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/cssjson.js"></script>
<script src='js/filereader.js'></script>
<script src='js/filesaver.min.js'></script>
<script src='js/colors.min.js'></script>
<script src="js/svg_shape_converter.js"></script>
<script src="js/flatten.js?v=1"></script>
<script src="js/jszip.min.js"></script>
<script src="js/main.js?v=34"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-56146020-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>