Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

<TextImageRow /> icon display is not working

ANSWERED

Hi, 

after trying dozens of different urls for my icon to be displayed in <TextImageRow /> ( it is shown in the simulator but not in the proper build on my phone) i tried the url provided in the doc from the settings API :

still it does not work : is it because of my phone? is there a way to make it work?

illustrationUrlProblem.jpg

 

par avance Merci !!!

 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

@Slumberlander wrote:

thank you @morningReign ,

it gives me a good clue, if by chance you remember the import statment it would be GREAT!!!

i have already tried everyone I know...

thank you


To do local addressing, you need to import the file so it will be loaded with the app:

 

import sun from "./01d.png"

 

And use brackets to access the variable:

 

<TextImageRow
  label="Big Label"
  sublabel="Small label"
  icon={sun}
/>

 

Load the file into the 'settings' directory; the './' points to the directory the JSX file is in.

View best answer in original post

Best Answer
8 REPLIES 8

Not sure this is the problem you're describing,  but I had a similar issue,...

 

I recall I had to include an import statement for the image at the head of the jsx file so it would be available for use.

Best Answer

thank you @morningReign ,

it gives me a good clue, if by chance you remember the import statment it would be GREAT!!!

i have already tried everyone I know...

thank you

Best Answer
0 Votes

Currently at my second job (the one that pays me); can dig back later, but not currently at my workstation.

 

However, I think it should look like

 

import myImage from './myImage.jpg';

 

Then use myImage as the url

Best Answer

Could the original problem have something to do with URL security? The sim isn't all that fussy, but the Fitbit app requires https (not http) for most addresses.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

@Gondwana wrote:

Could the original problem have something to do with URL security? The sim isn't all that fussy, but the Fitbit app requires https (not http) for most addresses.


Too true, I've run into that too with web page access. from the settings page.

Best Answer
0 Votes

@Slumberlander wrote:

thank you @morningReign ,

it gives me a good clue, if by chance you remember the import statment it would be GREAT!!!

i have already tried everyone I know...

thank you


To do local addressing, you need to import the file so it will be loaded with the app:

 

import sun from "./01d.png"

 

And use brackets to access the variable:

 

<TextImageRow
  label="Big Label"
  sublabel="Small label"
  icon={sun}
/>

 

Load the file into the 'settings' directory; the './' points to the directory the JSX file is in.

Best Answer

Fantastic! Thank uou!

Best Answer
0 Votes

@Slumberlander wrote:

Fantastic! Thank uou!



Vous êtes les bienvenus

Best Answer
0 Votes