You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Maxim Solodovnik <so...@gmail.com> on 2014/11/26 19:48:00 UTC
SVG background image in mobile application
Hello All,
I'm trying to add background image to my mobile view using following methods
http://stackoverflow.com/questions/10429334/how-to-add-a-background-image-to-a-flex-android-app
http://stackoverflow.com/questions/13267481/adding-a-background-image-in-flex-4-6
seems to be almost the same
The image is displayed, BUT it is so huge and seems width/height/scale
settings has no effect on it
I'm using svg image created using Incscape
The image should be located on the bottom of the view
Is it possible? Do I need to convert it somehow
Thanks in advance!
--
WBR
Maxim aka solomax
Re: SVG background image in mobile application
Posted by Maxim Solodovnik <so...@gmail.com>.
was able to resolve it using:
<assets:logo_om_low_color percentWidth="70" x="{hostComponent.width * 0.15}"
y="{hostComponent.height - this.width * 0.18- 15}"/>
Thanks a lot for the help!
On Thu, Nov 27, 2014 at 10:38 AM, Maxim Solodovnik <so...@gmail.com>
wrote:
> Thanks a lot!
> Will definitely use this tool!
> Is using FXG is preferable to SVG?
>
> One more question:
> I would like to place this background images on the bottom of the view
> (centered)
>
> I tried to do it like this:
> <assets:logo_om_low_color percentWidth="70" x="{parent.width * 0.15}" y="{parent.height
> - height - 15}"/>
> percentWidth seems to work, but position doesn't :(
> What is the proper way to position asset based on view size
>
> On Thu, Nov 27, 2014 at 3:24 AM, OmPrakash Muppirala <bigosmallm@gmail.com
> > wrote:
>
>> The SVG seems pretty complicated for the Flex compiler to handle. So, I
>> converted the SVG to FXG using Sascha's tool [1]
>> Then, I was simply able to import the class in the skin and instantiate
>> it. I have sent you a pull request [2] See if this works.
>>
>> Thanks,
>> Om
>>
>> P.S. I think the converter did a great job. Nice job, Sascha!
>>
>> [1] http://www.realcreation.com/S2F_Converter/
>> [2] https://github.com/solomax/BgImageQuickStart/pull/1
>>
>> On Wed, Nov 26, 2014 at 11:23 AM, Maxim Solodovnik <so...@gmail.com>
>> wrote:
>>
>> > Thanks for the quick answer Om :)
>> >
>> > Here is the quickstart: https://github.com/solomax/BgImageQuickStart
>> >
>> >
>> > On Thu, Nov 27, 2014 at 12:53 AM, OmPrakash Muppirala <
>> > bigosmallm@gmail.com>
>> > wrote:
>> >
>> > > Can you post an example of what you are trying? I can try it out and
>> see
>> > > what's going on.
>> > >
>> > > Thanks,
>> > > Om
>> > >
>> > > On Wed, Nov 26, 2014 at 10:48 AM, Maxim Solodovnik <
>> solomax666@gmail.com
>> > >
>> > > wrote:
>> > >
>> > > > Hello All,
>> > > >
>> > > > I'm trying to add background image to my mobile view using following
>> > > > methods
>> > > >
>> > > >
>> > >
>> >
>> http://stackoverflow.com/questions/10429334/how-to-add-a-background-image-to-a-flex-android-app
>> > > >
>> > > >
>> > >
>> >
>> http://stackoverflow.com/questions/13267481/adding-a-background-image-in-flex-4-6
>> > > > seems to be almost the same
>> > > >
>> > > > The image is displayed, BUT it is so huge and seems
>> width/height/scale
>> > > > settings has no effect on it
>> > > >
>> > > > I'm using svg image created using Incscape
>> > > > The image should be located on the bottom of the view
>> > > > Is it possible? Do I need to convert it somehow
>> > > >
>> > > > Thanks in advance!
>> > > >
>> > > > --
>> > > > WBR
>> > > > Maxim aka solomax
>> > > >
>> > >
>> >
>> >
>> >
>> > --
>> > WBR
>> > Maxim aka solomax
>> >
>>
>
>
>
> --
> WBR
> Maxim aka solomax
>
--
WBR
Maxim aka solomax
Re: SVG background image in mobile application
Posted by Maxim Solodovnik <so...@gmail.com>.
Thanks a lot!
Will definitely use this tool!
Is using FXG is preferable to SVG?
One more question:
I would like to place this background images on the bottom of the view
(centered)
I tried to do it like this:
<assets:logo_om_low_color percentWidth="70" x="{parent.width * 0.15}"
y="{parent.height
- height - 15}"/>
percentWidth seems to work, but position doesn't :(
What is the proper way to position asset based on view size
On Thu, Nov 27, 2014 at 3:24 AM, OmPrakash Muppirala <bi...@gmail.com>
wrote:
> The SVG seems pretty complicated for the Flex compiler to handle. So, I
> converted the SVG to FXG using Sascha's tool [1]
> Then, I was simply able to import the class in the skin and instantiate
> it. I have sent you a pull request [2] See if this works.
>
> Thanks,
> Om
>
> P.S. I think the converter did a great job. Nice job, Sascha!
>
> [1] http://www.realcreation.com/S2F_Converter/
> [2] https://github.com/solomax/BgImageQuickStart/pull/1
>
> On Wed, Nov 26, 2014 at 11:23 AM, Maxim Solodovnik <so...@gmail.com>
> wrote:
>
> > Thanks for the quick answer Om :)
> >
> > Here is the quickstart: https://github.com/solomax/BgImageQuickStart
> >
> >
> > On Thu, Nov 27, 2014 at 12:53 AM, OmPrakash Muppirala <
> > bigosmallm@gmail.com>
> > wrote:
> >
> > > Can you post an example of what you are trying? I can try it out and
> see
> > > what's going on.
> > >
> > > Thanks,
> > > Om
> > >
> > > On Wed, Nov 26, 2014 at 10:48 AM, Maxim Solodovnik <
> solomax666@gmail.com
> > >
> > > wrote:
> > >
> > > > Hello All,
> > > >
> > > > I'm trying to add background image to my mobile view using following
> > > > methods
> > > >
> > > >
> > >
> >
> http://stackoverflow.com/questions/10429334/how-to-add-a-background-image-to-a-flex-android-app
> > > >
> > > >
> > >
> >
> http://stackoverflow.com/questions/13267481/adding-a-background-image-in-flex-4-6
> > > > seems to be almost the same
> > > >
> > > > The image is displayed, BUT it is so huge and seems
> width/height/scale
> > > > settings has no effect on it
> > > >
> > > > I'm using svg image created using Incscape
> > > > The image should be located on the bottom of the view
> > > > Is it possible? Do I need to convert it somehow
> > > >
> > > > Thanks in advance!
> > > >
> > > > --
> > > > WBR
> > > > Maxim aka solomax
> > > >
> > >
> >
> >
> >
> > --
> > WBR
> > Maxim aka solomax
> >
>
--
WBR
Maxim aka solomax
Re: SVG background image in mobile application
Posted by OmPrakash Muppirala <bi...@gmail.com>.
The SVG seems pretty complicated for the Flex compiler to handle. So, I
converted the SVG to FXG using Sascha's tool [1]
Then, I was simply able to import the class in the skin and instantiate
it. I have sent you a pull request [2] See if this works.
Thanks,
Om
P.S. I think the converter did a great job. Nice job, Sascha!
[1] http://www.realcreation.com/S2F_Converter/
[2] https://github.com/solomax/BgImageQuickStart/pull/1
On Wed, Nov 26, 2014 at 11:23 AM, Maxim Solodovnik <so...@gmail.com>
wrote:
> Thanks for the quick answer Om :)
>
> Here is the quickstart: https://github.com/solomax/BgImageQuickStart
>
>
> On Thu, Nov 27, 2014 at 12:53 AM, OmPrakash Muppirala <
> bigosmallm@gmail.com>
> wrote:
>
> > Can you post an example of what you are trying? I can try it out and see
> > what's going on.
> >
> > Thanks,
> > Om
> >
> > On Wed, Nov 26, 2014 at 10:48 AM, Maxim Solodovnik <solomax666@gmail.com
> >
> > wrote:
> >
> > > Hello All,
> > >
> > > I'm trying to add background image to my mobile view using following
> > > methods
> > >
> > >
> >
> http://stackoverflow.com/questions/10429334/how-to-add-a-background-image-to-a-flex-android-app
> > >
> > >
> >
> http://stackoverflow.com/questions/13267481/adding-a-background-image-in-flex-4-6
> > > seems to be almost the same
> > >
> > > The image is displayed, BUT it is so huge and seems width/height/scale
> > > settings has no effect on it
> > >
> > > I'm using svg image created using Incscape
> > > The image should be located on the bottom of the view
> > > Is it possible? Do I need to convert it somehow
> > >
> > > Thanks in advance!
> > >
> > > --
> > > WBR
> > > Maxim aka solomax
> > >
> >
>
>
>
> --
> WBR
> Maxim aka solomax
>
Re: SVG background image in mobile application
Posted by Maxim Solodovnik <so...@gmail.com>.
Thanks for the quick answer Om :)
Here is the quickstart: https://github.com/solomax/BgImageQuickStart
On Thu, Nov 27, 2014 at 12:53 AM, OmPrakash Muppirala <bi...@gmail.com>
wrote:
> Can you post an example of what you are trying? I can try it out and see
> what's going on.
>
> Thanks,
> Om
>
> On Wed, Nov 26, 2014 at 10:48 AM, Maxim Solodovnik <so...@gmail.com>
> wrote:
>
> > Hello All,
> >
> > I'm trying to add background image to my mobile view using following
> > methods
> >
> >
> http://stackoverflow.com/questions/10429334/how-to-add-a-background-image-to-a-flex-android-app
> >
> >
> http://stackoverflow.com/questions/13267481/adding-a-background-image-in-flex-4-6
> > seems to be almost the same
> >
> > The image is displayed, BUT it is so huge and seems width/height/scale
> > settings has no effect on it
> >
> > I'm using svg image created using Incscape
> > The image should be located on the bottom of the view
> > Is it possible? Do I need to convert it somehow
> >
> > Thanks in advance!
> >
> > --
> > WBR
> > Maxim aka solomax
> >
>
--
WBR
Maxim aka solomax
Re: SVG background image in mobile application
Posted by OmPrakash Muppirala <bi...@gmail.com>.
Can you post an example of what you are trying? I can try it out and see
what's going on.
Thanks,
Om
On Wed, Nov 26, 2014 at 10:48 AM, Maxim Solodovnik <so...@gmail.com>
wrote:
> Hello All,
>
> I'm trying to add background image to my mobile view using following
> methods
>
> http://stackoverflow.com/questions/10429334/how-to-add-a-background-image-to-a-flex-android-app
>
> http://stackoverflow.com/questions/13267481/adding-a-background-image-in-flex-4-6
> seems to be almost the same
>
> The image is displayed, BUT it is so huge and seems width/height/scale
> settings has no effect on it
>
> I'm using svg image created using Incscape
> The image should be located on the bottom of the view
> Is it possible? Do I need to convert it somehow
>
> Thanks in advance!
>
> --
> WBR
> Maxim aka solomax
>