mardi 12 mai 2015

changing ui for and android app

I am making a video app and on the screen I want to have an image review and play button and some description text. I want to make the image full width of the screen and the play button in the middle of the image. Then the text should be under the button and image.

enter image description here

my layout

 <ScrollView xmlns:android="http://ift.tt/nIICcg"
        android:id="@+id/scrollView1"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="@color/black">


<RelativeLayout 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">

    <RelativeLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true" 
        android:background="@color/list_second_white"
        android:id="@+id/relative_header">

        <TextView
            android:id="@+id/text_category"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:padding="5dp"
            android:text=""
            android:textAppearance="?android:attr/textAppearanceMedium" />

         <TextView
            android:id="@+id/second"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_alignParentTop="true"
            android:padding="5dp"
            android:text=""
            android:textAppearance="?android:attr/textAppearanceMedium" />

    </RelativeLayout>

    <ImageView
        android:id="@+id/picture"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/relative_header"
        android:layout_centerHorizontal="true"
        android:contentDescription="@string/desc"
        android:src="@drawable/ic_launcher" />

    <ImageView 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@+id/picture"
        android:layout_marginTop="60dp"
        android:layout_centerHorizontal="true"
        android:contentDescription="@string/desc"
        android:src="@drawable/video_thumb_small"
        />


    <TextView
        android:id="@+id/text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/picture"
        android:layout_centerHorizontal="true"
        android:text=""
        android:textStyle="bold"
        android:textColor="@color/list_second_white"
        android:textAppearance="?android:attr/textAppearanceMedium" />

    <TextView
        android:id="@+id/text_desc"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/text"
        android:padding="10dp"
        android:textColor="@color/blue"
        android:text=""
        android:textAppearance="?android:attr/textAppearanceMedium" />

</RelativeLayout>

 </ScrollView>

Aucun commentaire:

Enregistrer un commentaire