0
嘿,我想在我的應用程序中顯示供稿列表。我需要顯示視頻縮略圖,如facebook.Thumbnail和圖像中心的小視頻圖標。我該怎麼做?Android查看有小視頻圖標的縮略圖
我正在使用此代碼來獲取縮略圖
位圖拇指= ThumbnailUtils.createVideoThumbnail(路徑, MediaStore.Images.Thumbnails.MINI_KIND);
嘿,我想在我的應用程序中顯示供稿列表。我需要顯示視頻縮略圖,如facebook.Thumbnail和圖像中心的小視頻圖標。我該怎麼做?Android查看有小視頻圖標的縮略圖
我正在使用此代碼來獲取縮略圖
位圖拇指= ThumbnailUtils.createVideoThumbnail(路徑, MediaStore.Images.Thumbnails.MINI_KIND);
「我需要顯示視頻縮略圖像facebook.Thumbnail並在圖像的中心的小視頻圖標」
對於這一點,你可以用一個框架佈局。框架佈局中的孩子被繪製在另一個之上。所以,在你的情況: -
<FrameLayout
layout_width="match_parent"
gravity="center"
layout_height="match_parent">
<!-- This for video thumbnail-->
<Imageview
layout_width="wrap_content"
layout_height="wrap_content"/>
<!-- This for video icon in center-->
<Imageview
layout_width="50dp"
layout_height="50dp"/>
</FrameLayout>
我還沒有寫其他屬性,如id屬性。 我希望這是你所需要的
非常感謝你的答案。它真的幫了大忙。 – 2014-09-23 10:00:17