Get started Start by creating your first app. Go deeper with our training courses or explore app development on your own.
Setting your SurfaceView layout to wrap_content will not size a video to play at the proper aspect ratio. A SurfaceView is an optimized drawing surface A video is drawn to a SurfaceView, not contained within it wrap_content is synonymous with fill_parent for a SurfaceView. What you want to do is get the dimensions of your video from the MediaPlayer object. You can then set the aspect ratio of the
æ¨æ¥ã®éæã¦ã£ã³ãã¦ã¯SurfaceViewã使ã£ãããæ¹ã§ãªãã¨ãã¹ãã¼ãã§ãªãã£ãã ããã§ä»ã®ããæ¹ãæ¢ãã¦ããAPIDemosã®ä¸ã«ã¾ãã«éæã¦ã£ã³ãã¦ã®ãµã³ãã«ãè¦ã¤ããã Translucentã¨Translucent Fancyã¦ãã¤ãéæã¨ãããåéæã ãã©æ°ã«ããªãã ããã§æ©éã½ã¼ã¹ãè¦ã¦ã¿ãã¨æ®éã®æåã表示ãããã½ã¼ã¹ã¨ãªããå¤ãããªãã 試ãã«ã³ãããã¦ã¿ããã©ãã£ã±ãã¦ã£ã³ãã¦ã¯éæã«ãªããªãã ããã§å¨è¾ºã®ãã¡ã¤ã«ã調ã¹ã¦ã¿ãã¨styles.xmlã¨AndroidManifest.xmlã«ç§å¯ããããã¨ãããã£ãã styles.xmlå ã§ãã¤ã³ãã¨ãªãã®ã¯æ¬¡ã®äºè¡ã #44ff0000 @drawable/translucent_background ä¸è¡ç®ã§èæ¯ã¨ãªãdrawableãä½ã£ã¦ãããè²ã®æå®ã¯#aarrggbbã§è¡ã£ã¦ããã®ã§åãäºã¤ã®å¤ã§é
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}