Вставить картинку после контента

Интерфейс, диалоги, темы, стили, меню
Ответить
xsen
Сообщения: 1
Зарегистрирован: 18 май 2012, 14:53

Вставить картинку после контента

Сообщение xsen » 18 май 2012, 14:59

Использую HTML5WebView, нужно сделать что бы полсе контента была картинка, так же контента может совсем и не быть, только картинка. Как правильно прижать ее к низу?

Код: Выделить всё

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android">
    <FrameLayout android:id="@+id/fullscreen_custom_content"
                 android:visibility="gone"
                 android:background="@color/white"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
            />
    <LinearLayout android:orientation="vertical"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent">
        <include layout="@layout/title_header"/>

        <LinearLayout android:id="@+id/error_console"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                />

        <RelativeLayout android:id="@+id/main_content"
                        android:background="@color/white"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent">
        </RelativeLayout>
        <RelativeLayout android:id="@+id/main_content1"
                        android:background="@color/white"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent">
            <ImageView
                    android:id="@+id/videoImg"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:onClick="imageClick"
                    android:layout_centerHorizontal="true"
                    android:src="@drawable/default_video_poster"/>
            />
        </RelativeLayout>
    </LinearLayout>
</FrameLayout>

Аватара пользователя
damager82
Администратор
Сообщения: 1383
Зарегистрирован: 07 янв 2012, 11:32
Контактная информация:

Re: Вставить картинку после контента

Сообщение damager82 » 21 май 2012, 11:30

Как вариант можно так. Я лишнее поубирал и корневым поставил LinearLayout вертикальный.

Код: Выделить всё

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <FrameLayout
        android:id="@+id/fullscreen_custom_content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical" >

        <RelativeLayout
            android:id="@+id/main_content1"
            android:layout_width="match_parent"
            android:layout_height="match_parent" >

            <ImageView
                android:id="@+id/videoImg"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerHorizontal="true"
                android:onClick="imageClick"
                android:src="@drawable/icon" />
            />
        </RelativeLayout>
    </LinearLayout>

</LinearLayout>
Добро пожаловать на форум сайта StartAndroid
ИзображениеИзображение

Ответить