assets

read asset folder files of another package

非 Y 不嫁゛ 提交于 2019-12-30 15:42:28
问题 I have two android applications using the same android:sharedUserId Say Application A & Application B. Is there a way to read the contents of asset folder of B from A? 回答1: You should not need android:sharedUserId (and unless you really know what you're doing, using android:sharedUserId is risky). Last I checked, assets are world-readable; any app can read another app's assets. You should be able to call createPackageContext() to get a Context associated with the other app, then use getAssets

Rails 3.1 Asset Pipeline - Why should I use the Asset Helpers in a SCSS file?

为君一笑 提交于 2019-12-30 11:38:31
问题 I'm just getting into the Asset Pipeline; I'm using SASS/SCSS, but I'm not understanding why I should be using the Asset Helpers. For example, if I have some CSS/SCSS without using an Asset Helper: background-image: url('rails.png'); This will work fine because both my .SCSS file and image are in and accessible through the assets directory. What's the point of doing this?: background-image: asset-url("rails.png", image); I understand it will add "/assets/" to the url, but why should I be

Mp3 audio in the Android Assets folder fails to play from a signed and zip-aligned APK

拈花ヽ惹草 提交于 2019-12-30 11:10:49
问题 I am loading mp3 files to play in an Android game based on AndEngine. When I package my game as an APK, mp3 audio in the assets folder throws the error "can not be opened as a file descriptor; it is probably compressed." However, when I run the game using the run > button in Eclipse (MOTODEV Studio 3.0.2), the app is packaged, deployed to a device and the game has sound. Works perfectly on a device. If I package the app using "Export Android Application", which creates a signed APK ready to

How to get assets img url in Symfony controller

烈酒焚心 提交于 2019-12-30 05:53:13
问题 I'm using assets in Symfony 2.7.10 and I want to generate an image url in the controller. In the symfony config.yml file I have added the following setting: framework: assets: version: '311nk2' version_format: '%%s?v=%%s' base_path: /bundles/myBundleName In twig the generating of an url works ok, so with the following twig code: {{ asset('images/logo.png') }} It generates: /bundles/myBundleName/images/logo.png?v=311nk2 Now I want to generate the same url in a controller, how is this possible?

cell imageView in UITableView doesn't appear until selected

穿精又带淫゛_ 提交于 2019-12-29 14:08:50
问题 Here is a video of the problem: http://youtu.be/Jid0PO2HgcU I have a problem when trying to set the image for the [cell imageView] in a UITableView from the asset library. The image is loaded but it doesn't appear in the cell until I touch (select) that cell. Here is my code that sets the imageView of the cell: //Start loading the image using the image path NSString *path = [occasion imagePath]; if (path != nil && [path hasPrefix:@"ass"]) { NSLog(@"photo loaded from assets library"); /

cell imageView in UITableView doesn't appear until selected

回眸只為那壹抹淺笑 提交于 2019-12-29 14:07:36
问题 Here is a video of the problem: http://youtu.be/Jid0PO2HgcU I have a problem when trying to set the image for the [cell imageView] in a UITableView from the asset library. The image is loaded but it doesn't appear in the cell until I touch (select) that cell. Here is my code that sets the imageView of the cell: //Start loading the image using the image path NSString *path = [occasion imagePath]; if (path != nil && [path hasPrefix:@"ass"]) { NSLog(@"photo loaded from assets library"); /

Rails javascript asset missing after precompile

泪湿孤枕 提交于 2019-12-28 06:31:05
问题 the Rails Guides says: If there are missing precompiled files in production you will get an Sprockets::Helpers::RailsHelper::AssetPaths::AssetNotPrecompiledError exception indicating the name of the missing file(s). I do execute: bundle exec rake assets:precompile however I don't get any error, and my javascript file is missing in the manifest.yml . Also it's not appearing in public/assets , so the problem is only on production. I have in the application.js //= require formalize/jquery

Load an image from assets folder

烂漫一生 提交于 2019-12-28 01:51:09
问题 I am trying to load an image from the asset folder and then set it to an ImageView . I know it's much better if I use the R.id.* for this, but the premise is I don't know the id of the image. Basically, I'm trying to dynamically load the image via its filename. For example, I randomly retrieve an element in the database representing let's say a 'cow' , now what my application would do is to display an image of a 'cow' via the ImageView . This is also true for all element in the database .

Symfony2 - Assetic - load images in CSS

旧城冷巷雨未停 提交于 2019-12-28 01:45:12
问题 I have a CoreBundle that contains main css files and images. Now I have a problem when I load an image from css; the image isn't shown. background-image:url(../images/file.png) (with a full path it works) I installed the assets using the command: assets:install web and i can see the image and css files under web/bundles/cmtcore/(css|images) . Here's the file structure inside the core bundle: /CoreBundle /Resources /public /css /main.css /images /file.png And here's how I load the css file

Symfony2 - Assetic - load images in CSS

╄→гoц情女王★ 提交于 2019-12-28 01:44:08
问题 I have a CoreBundle that contains main css files and images. Now I have a problem when I load an image from css; the image isn't shown. background-image:url(../images/file.png) (with a full path it works) I installed the assets using the command: assets:install web and i can see the image and css files under web/bundles/cmtcore/(css|images) . Here's the file structure inside the core bundle: /CoreBundle /Resources /public /css /main.css /images /file.png And here's how I load the css file