参考文章:http://www.cnblogs.com/TerryBlog/archive/2012/02/17/2355753.html
http://www.2cto.com/kf/201206/134987.html
http://xyzlmn.blog.51cto.com/2532390/817249
http://hi.baidu.com/miky%D1%EE_1987/blog/item/9d841ad3a8da322f32fa1cf3.html
MXF stands for Material eXchange Format and is a file used by digital audio and video media software. An MXF file is a container, or wrapper format file that describes data used by other files in a program. It specifies how different streams coexist. The Society of Motion Picture and Television Engineers defines the MXF standard.
-
MXF files were developed as a response to a growing need for computers to quickly and efficiently handle audio and video files. Several technology manufacturers developed proprietary standards for this file type, which led to incompatible formats and standards. The incompatibility prompted the SMPTE to ratify a universal MXF standard. The creation of this format as a wrapper allowed media software developers to inter-operate files created in different applications. The metadata in each file would specify how the MXF file as a whole worked, regardless of the platform.
-
MXF files contain two kinds of packages: file and material. File packages contain source material files, such as audio interviews and commentaries, or video highlights or news broadcasts. Material packages contain timeline information, such as when to play certain material files. For example, an MXF file may contain two file packages and one material package. The material package designates that the decoder first play a sports highlight file package, followed by an interview clip file package.
-
Several electronics and software applications can create and use MXF files. For example, high-end cameras record data using MXF so when the files are transferred to a video server, the software applications can import and use the files. MXF files can be used at any stage of development, including pre- and post-production of videos. When recording, an MXF file includes a timecode for each individual frame of a video, which helps you identify material in the recording.
-
MXF files can contain several kinds of media, including audio, video, data and metadata. The files can wrap several other file formats, such as MP3 and AVI, or uncompressed PCM files. When these files are wrapped in an MXF format, no conversion takes place. The original files do not lose quality. High-definition video and audio files with multiple soundtracks retain all data, and look and sound the same as if they were not part of an MXF package.
TextView tv = (TextView) findViewById(R.id.xx);
第1种:tv.setBackgroundColor(Color.argb(255, 0, 255, 0)); //背景透明度
tv.setTextColor(Color.argb(255, 0, 255, 0)); //文字透明度
第2种:tv.setTextColor(0xffff00ff);
0xffff00ff是int类型的数据,分组一下0x|ff|ff00ff,0x是代表颜色整数的标记,ff是表示透明度,ff00ff表示颜色,注意:这里ffff00ff必须是8个的颜色表示,不接受ff00ff这种6个的颜色表示。
颜色和不透明度 (alpha) 值以十六进制表示法表示。任何一种颜色的值范围都是 0 到 255(00 到 ff)。对于 alpha,00 表示完全透明,ff 表示完全不透明。表达式顺序是“aabbggrr”,其中“aa=alpha”(00 到 ff);“bb=blue”(00 到 ff);“gg=green”(00到ff);“rr=red”(00 到 ff)。例如,如果设置字体颜色的不透明度为 50% 的蓝色,则应指定以下值:7fff0000(如何把十进制的50换算成十六进制的50:十进制到其他进制用除,一直除到商为0,然后每次余数逆序排列就是结果,其他进制到十进制用乘,比如此处用到除法,80/16商5余0,再用前一次的商除16得商0余5,停止相除,逆序排列余数得到0x50)。
第3种:在xml文件中直接设置颜色值,同下。
Button或者ImageButton的背景设为透明或者半透明
xml文件
半透明<Button android:background="#e0000000" ... />
透明<Button android:background="#00000000" ... />
Java代码
View v = findViewById(R.id.xx);//找到你要设透明背景的layout 的id
v.getBackground().setAlpha(100);//0~255透明度值