How to create header and footer image in my media player?
I wish to create header and footer image in my media player. Now the media player is working fine for me.
If I click media player its display video thumbnails in center of the screen(layout). If I click that thumbnails the video will play.
My doubt is how to create header and footer images from video thumbnails showing page.
Give me your suggestion please, I am new with android applications.
Element description;
a. Header image, a stretched background image. The location of this external image comes from the application xml.
b. Footer image, a stretched background image. The location of this external image comes from the application xml.
xml source:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="ht开发者_运维知识库tp://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Gallery xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/videoGrdVw"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</FrameLayout>
I think you should use LinearLayout for header and footer inside RelativeLayout. Set both LinearLayot's orientation to Horizontal. You can also use DroidDraw. I use it sometime whenever i stuck with android layouts.
My suggestion to you is to use RelativeLayout when laying down elements on your application page. Good starting point for this layout is in this page. Also, this layout allows you to do exactly what you want, using ALIGN_PARENT_TOP and ALIGN_PARENT_BOTTOM attributes for your images. One more advantage of this layout is that it will easily adjust to any screen size. On the other side, only disadvantage of this layout is that it can be sometimes tricky to fully understand it's behavior.
精彩评论