assets

how to export video asset via AVAssetExportSession in portrait mode

て烟熏妆下的殇ゞ 提交于 2020-01-27 06:38:04
问题 when i export a video asset via AVAssetExportSession the result file is in landspace mode. (file grabbed via itune->apps->file sharing->my app). how can i export the video asset in portrait mode (rotate it)? 回答1: The video coming from the iPhone capture device are always landscape orientated whatever the device orientation is when capturing. If you want to rotate your video, the 'simple' solution is to assign a transform to the video track of the exported session. Create 2 mutable tracks in

Context being passed into method for getAssets() is null

你离开我真会死。 提交于 2020-01-25 11:34:10
问题 In the code below, the getPieceTextFile() method takes an Activity context parameter, however when used, the context passed in appears to be null and leads to a NPE. Any suggestions why would be greatly appreciated. The LogCat output and code listing are shown below. LogCat 01-03 13:48:47.223: I/dalvikvm(571): threadid=3: reacting to signal 3 01-03 13:48:47.233: I/dalvikvm(571): Wrote stack traces to '/data/anr/traces.txt' 01-03 13:49:30.073: I/System.out(571): Asset Manager/IS not work. 01

Unity3D Editor: How can I find all usages of a given asset?

只愿长相守 提交于 2020-01-23 12:25:31
问题 The very useful feauture "Find usages" exists in Visual Studio and Resharper, but I can't find the same in Unity3D Editor. I see only "Select dependencies" in Unity3d, but I need the opposite one. Does it exist? 回答1: Unfortunately, Unity Editor allows you to find usages of an asset in Scene only. Moreover, what you get is selected list of assets using it, so after changing the mouse focus you'll lose your selection There's a solution on Asset Store that does: Find all usages of an asset, both

Unity3D Editor: How can I find all usages of a given asset?

☆樱花仙子☆ 提交于 2020-01-23 12:25:06
问题 The very useful feauture "Find usages" exists in Visual Studio and Resharper, but I can't find the same in Unity3D Editor. I see only "Select dependencies" in Unity3d, but I need the opposite one. Does it exist? 回答1: Unfortunately, Unity Editor allows you to find usages of an asset in Scene only. Moreover, what you get is selected list of assets using it, so after changing the mouse focus you'll lose your selection There's a solution on Asset Store that does: Find all usages of an asset, both

How to create Named colors in Interface Builder?

試著忘記壹切 提交于 2020-01-22 13:37:30
问题 How do I setup & use custom named colors in Interface Builder? 回答1: In Xcode9 you can add "New Color Set" to .xcassets files, where you can set rgba values or use IB's color picker. Then you can use that newly defined color from Interface Builder's color picker, it appears under the Named Colors section. Or you can use it from code like UIColor(named:"customColorName") . As for now, Xcode9 beta 1 does not support using string literal color names as UIColor (like it works with UIImages), but I

How to create Named colors in Interface Builder?

允我心安 提交于 2020-01-22 13:37:25
问题 How do I setup & use custom named colors in Interface Builder? 回答1: In Xcode9 you can add "New Color Set" to .xcassets files, where you can set rgba values or use IB's color picker. Then you can use that newly defined color from Interface Builder's color picker, it appears under the Named Colors section. Or you can use it from code like UIColor(named:"customColorName") . As for now, Xcode9 beta 1 does not support using string literal color names as UIColor (like it works with UIImages), but I

How to create Named colors in Interface Builder?

做~自己de王妃 提交于 2020-01-22 13:37:21
问题 How do I setup & use custom named colors in Interface Builder? 回答1: In Xcode9 you can add "New Color Set" to .xcassets files, where you can set rgba values or use IB's color picker. Then you can use that newly defined color from Interface Builder's color picker, it appears under the Named Colors section. Or you can use it from code like UIColor(named:"customColorName") . As for now, Xcode9 beta 1 does not support using string literal color names as UIColor (like it works with UIImages), but I

Sqlite database not copied from asset folder Android

北慕城南 提交于 2020-01-20 08:37:16
问题 I am trying to copy a database named "adinpect" from the asset folder to the application databases folder, but it is not working... Code (in main activity onCreate(), just for testing): try { String destPath = "/data/data/" + getPackageName() + "/databases"; File f = new File(destPath); if (!f.exists()) { f.mkdirs(); f.createNewFile(); //---copy the db from the assets folder into the databases folder--- CopyDB(getBaseContext().getAssets().open("adinspect"), new FileOutputStream(destPath + "

How to change texture format to RGBA4444 for Sprite Atlas created in assets.xassets

孤街浪徒 提交于 2020-01-17 03:01:29
问题 So this is my first app and I am stuck and for almost a week I can't find a solution. I've created a lot of animations for different characters and found out that my game' memory usage is about 200 mb. Before I didn't worry about this because, as many beginners I thought that after I'll compress my png textures this size will decrease also. But that didn't happen. So I started to search what I can do about it and found out that changing the texture format from default RGBA8888 to RGBA4444 can

Error Loading image from asset folder through Implicit Intent by using Phone's Image viewer

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-16 18:34:20
问题 I am trying to display different London Tube maps through mobile's camera image viewer app by using implicit Intent. I had tube_map.gif image file in asset folder but when i try to load this file, app displays unable to find item . I think the file path i am specifying is not correct. I have followed the following video. the only difference is that in video, image file is stored on phone's SD Card while in my case, it is stored in asset folder. Video can be seen by this link. My code is as