svg-android

Why won't my SVG image display on my Galaxy Nexus?

こ雲淡風輕ζ 提交于 2020-01-17 01:37:13
问题 I'm trying to have one image be a background for another, using the svg-android library. When I view the image on my Samsung Galaxy Nexus (4.3, Sprint), the background image doesn't display. When I view it on the emulator, it's there correctly. I've even removed the foreground, and this stays the same. Here's the key parts of the XML layout: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:ads="http://schemas

Scaling SVGs in Android?

ⅰ亾dé卋堺 提交于 2019-12-24 10:41:34
问题 I'm trying to use this library http://code.google.com/p/svg-android/ to get SVGs into android. Here's my code so far: public class main extends Activity { /** Called when the activity is first created. */ ImageView iv; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); iv = (ImageView)findViewById(R.id.imageView1); SVG svg = SVGParser.getSVGFromResource(getResources(), R.raw.android); iv.setImageDrawable(svg

Canvas is not Showing Image/Drawable

て烟熏妆下的殇ゞ 提交于 2019-12-13 12:46:37
问题 I am doing a work on SVG Paths and Image. I have loaded SVG file and get an image and try to set thi image on canvas . But canvas is not showing image. I check the height and width and null check of this image/picture and it is not null so i am unable to understand that why canvas is not showing image. any help My code: public class MainActivity extends Activity{ Context c; @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); c=getApplicationContext()

SVG Android Exception

自闭症网瘾萝莉.ら 提交于 2019-12-13 04:37:00
问题 I have met problems dealing with the SVG-android library. In my main activity I want to display the SVG object on the imageview however, i am facing this error. java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.androidsvgdemo/com.example.androidsvgdemo.MainActivity}: com.larvalabs.svgandroid.SVGParseException: org.apache.harmony.xml.ExpatParser$ParseException: At line 1, column 0: not well-formed (invalid token) My codes are as follows: package com.example

svg image files android

有些话、适合烂在心里 提交于 2019-12-11 02:29:59
问题 I am using the below code to render svg images to imageview in my android application ImageView imageView = new ImageView(this); final SVG svg = SVGParser.getSVGFromAsset(getAssets(), "start_4_480.svg"); imageView.setImageDrawable(svg.createPictureDrawable()); link : http://code.google.com/p/svg-android/wiki/Tutorial Its working fine. But the size of an image is 2 MB(the same image is just few kbs in png format). I have lot of images of this kind. This increases the memory of my application.

Zoomable SVG with clickable areas - Android

只愿长相守 提交于 2019-12-06 09:42:01
问题 I'm making very simple application. It needs to show one SVG containing generalised world map. By clicking on city's name (svg rectangle), I need to show another SVG that corresponds to that city. Also, all SVGs must support zooming and panning. I managed to make SVGs support zooming and panning and that works perfect. For that purpose, I'm using svg-android library for rendering SVGs and customized TouchImageView for panning, zooming and capturing scale and touch events. But, it seems to be

Zoomable SVG with clickable areas - Android

半世苍凉 提交于 2019-12-04 15:40:11
I'm making very simple application. It needs to show one SVG containing generalised world map. By clicking on city's name (svg rectangle), I need to show another SVG that corresponds to that city. Also, all SVGs must support zooming and panning. I managed to make SVGs support zooming and panning and that works perfect. For that purpose, I'm using svg-android library for rendering SVGs and customized TouchImageView for panning, zooming and capturing scale and touch events. But, it seems to be impossible to make clickable regions on SVGs in Android. I tried brute force, to recalculate position

How do I tint this PictureDrawable?

好久不见. 提交于 2019-12-01 02:25:15
问题 I am using svgandroid to generate PictureDrawable s from SVG raw resources. However, I can't seem to be able to apply a color filter on a drawable created this way. The old code using PNGs icon = getResources().getDrawable(R.drawable.ic_braille); icon.setColorFilter(0x88880000, Mode.MULTIPLY); ((ImageView)v.findViewById(R.id.icon)).setImageDrawable(icon); works, but icon = SVGParser.getSVGFromResource(getResources(), R.raw.ic_braille).createPictureDrawable(); icon.setColorFilter(0x88880000,

android:load svg file from web and show it on image view

孤者浪人 提交于 2019-11-26 10:35:41
问题 I want to load a svg file from the web and show this file in an ImageView. For non vector images I use the Picasso library. Is it possible to use this library for svg files as well? Is there any way to load svg files from the web and show it in an ImageView? I use the svg-android library to show svg files but i don\'t know how to get svg images from the web all the examples for this library use local files. 回答1: Please refer to Having issue on Real Device using vector image in android. SVG