@@ -20,7 +20,7 @@ struct PlotTemplate<'a> {
20
20
21
21
#[ derive( Template ) ]
22
22
#[ template( path = "static_plot.html" , escape = "none" ) ]
23
- #[ cfg( not( target_family = "wasm" ) ) ]
23
+ #[ cfg( all ( not( target_family = "wasm" ) , not ( target_os = "android" ) ) ) ]
24
24
struct StaticPlotTemplate < ' a > {
25
25
plot : & ' a Plot ,
26
26
format : ImageFormat ,
@@ -43,7 +43,7 @@ struct JupyterNotebookPlotTemplate<'a> {
43
43
plot_div_id : & ' a str ,
44
44
}
45
45
46
- #[ cfg( not( target_family = "wasm" ) ) ]
46
+ #[ cfg( all ( not( target_family = "wasm" ) , not ( target_os = "android" ) ) ) ]
47
47
const DEFAULT_HTML_APP_NOT_FOUND : & str = r#"Could not find default application for HTML files.
48
48
Consider using the `to_html` method obtain a string representation instead. If using the `kaleido` feature the
49
49
`write_image` method can be used to produce a static image in one of the following formats:
@@ -246,7 +246,7 @@ impl Plot {
246
246
///
247
247
/// The HTML file is saved in a temp file, from which it is read and
248
248
/// displayed by the browser.
249
- #[ cfg( not( target_family = "wasm" ) ) ]
249
+ #[ cfg( all ( not( target_family = "wasm" ) , not ( target_os = "android" ) ) ) ]
250
250
pub fn show ( & self ) {
251
251
use std:: env;
252
252
@@ -278,7 +278,7 @@ impl Plot {
278
278
/// The HTML file is generated and saved in the provided filename as long as
279
279
/// the path already exists, after the file is saved, it is read and
280
280
/// displayed by the browser.
281
- #[ cfg( not( target_family = "wasm" ) ) ]
281
+ #[ cfg( all ( not( target_family = "wasm" ) , not ( target_os = "android" ) ) ) ]
282
282
pub fn show_html < P : AsRef < Path > + std:: clone:: Clone > ( & self , filename : P ) {
283
283
let path = filename. as_ref ( ) . to_str ( ) . unwrap ( ) ;
284
284
self . write_html ( filename. clone ( ) ) ;
@@ -288,7 +288,7 @@ impl Plot {
288
288
289
289
/// Display the fully rendered `Plot` as a static image of the given format
290
290
/// in the default system browser.
291
- #[ cfg( not( target_family = "wasm" ) ) ]
291
+ #[ cfg( all ( not( target_family = "wasm" ) , not ( target_os = "android" ) ) ) ]
292
292
pub fn show_image ( & self , format : ImageFormat , width : usize , height : usize ) {
293
293
use std:: env;
294
294
@@ -471,7 +471,7 @@ impl Plot {
471
471
tmpl. render ( ) . unwrap ( )
472
472
}
473
473
474
- #[ cfg( not( target_family = "wasm" ) ) ]
474
+ #[ cfg( all ( not( target_family = "wasm" ) , not ( target_os = "android" ) ) ) ]
475
475
fn render_static ( & self , format : ImageFormat , width : usize , height : usize ) -> String {
476
476
let tmpl = StaticPlotTemplate {
477
477
plot : self ,
0 commit comments