Comments (6)
Since Alloy doesn't seem to work, I tried the manual approach:
var avatar = require('ui').createView({
backgroundImage: Alloy.Globals.Profile.get('avatar'),
backgroundSize: "cover",
borderRadius: 45,
width: "106%",
height: "106%",
top: "-3%",
left: "-3%"
});
$.avatar.removeAllChildren();
$.avatar.add(avatar);
This also yields an error, although a different one.
[ERROR] [iphone, 8.4, 192.168.1.6] [UI] Could not write downloaded file to: file:///Users/Fabian/Library/Developer/CoreSimulator/Devices/9BA4D310-6A18-484B-A693-D9E098825FA9/data/Containers/Data/Application/43762E64-18BD-4AC4-9F0F-C8E60C4538EE/tmp/1f6ca17ecbc1b15cde12647104d1344091f3ecaa.com/696911963770382/picture
.
When I try to use /image/foo.png
, the other error appears.
from util.
Does the sample app work for you? I just ran that and it works fine with similar paths:
https://github.com/FokkeZB/UTiL/blob/master/app/views/ui.xml
from util.
Same issue.
Work great with remote url but fail with local image.
@fabdrol any workaround ?
from util.
Ok I found a solution.
Try to change the line 177 : originalFile = Ti.Filesystem.getFile(originalPath);
To : originalFile = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, originalPath);
from util.
Thanks @botmaster! Could you verify that works on both iOS and Android and send a PR?
from util.
That works on both iOS and Android.
PR send.
from util.
Related Issues (20)
- When share with facebook HOT 1
- add URL capability to ui.js backgroundImage HOT 4
- Ui.js use in a ListView ( multiple instances ) HOT 7
- Android Bug? TableView do not show inside NavigationWindow using XP.UI HOT 21
- update: add `maxrepeat` option
- update: add Google Play support
- Add `lookup` script to query Apple's lookup service and Google Play via regexp
- Label html dont works in runtime HOT 6
- About passing the data into facebook using facebook app dailog HOT 2
- xp.ui compile issue HOT 1
- Changing the image HOT 1
- html in iOS for links and other tags are hard to format HOT 2
- reporter module raise error: ActionBarView can only be used with android:layout_width="match_parent" (or fill_parent) HOT 2
- Window Slide animation in android not working when using xp.ui HOT 5
- xp.ui labels in listview itemtemplate HOT 1
- [ERROR] [UI] backgroundImage not found HOT 4
- Image URL without file extension fails HOT 2
- Tags or Alias not are set ! HOT 3
- Share with Instagram HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from util.