Используйте два изображения в рамке - PullRequest
0 голосов
/ 06 января 2012

У меня есть два просмотра изображения здесь в рамке.Как я могу использовать второй вид изображения, а именно + id / CompositeImageViewTextj с выбором ширины в качестве fillparent, а также одновременно использовать первый вид изображения 'id / CompositeImageViewj'.

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"     android:id="@+id/framel">

<Button
    android:id="@+id/ChoosePictureButton1j"
    android:layout_width="fill_parent"
    android:layout_height="60dp"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:background="@drawable/color"
    android:text="CHOOSE PICTURE" >
</Button>
<ImageView android:layout_width="fill_parent"android:layout_height="wrap_content"        android:id="@+id/CompositeImageViewj" android:paddingTop="100dip"></ImageView>

<ImageView android:layout_width="fill_parent" android:layout_height="fill_parent"   android:id="@+id/CompositeImageViewTextj"  android:paddingTop="100dip"></ImageView>

<EditText
    android:id="@+id/edtextj"
    android:layout_width="172dp"
    android:layout_height="62dp"
    android:layout_gravity="bottom"
    android:hint="Enter Caption" >

  <Button
      android:id="@+id/okj"
      android:layout_width="63dp"
      android:layout_height="56dp"
      android:layout_gravity="bottom"
      android:layout_marginBottom=" 5dip"
      android:layout_marginLeft=" 175dip"
      android:background="@drawable/tick" />

  <Button
      android:id="@+id/savej"
      android:layout_width="match_parent"
      android:layout_height="62dp"
      android:layout_gravity="bottom"
      android:layout_marginLeft=" 235dip"
      android:text="SAVE" />

Ответы [ 2 ]

1 голос
/ 05 февраля 2016

Полагаю, вам нужны оба изображения в одно и то же время.

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/framel"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
     >

    <Button
        android:id="@+id/ChoosePictureButton1j"
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:background="#d3d3d3"
        android:text="CHOOSE PICTURE" 
        >
    </Button>

    <ImageView
        android:id="@+id/CompositeImageViewj"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/truck"
        android:layout_marginTop="50dp"
        >
    </ImageView>

    <ImageView
        android:id="@+id/CompositeImageViewTextj"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/ic_launcher"
        android:layout_marginTop="50dp"
        >
    </ImageView>

    <EditText
        android:id="@+id/edtextj"
        android:layout_width="172dp"
        android:layout_height="62dp"
        android:layout_gravity="bottom"
        android:hint="Enter Caption" />

        <Button
            android:id="@+id/okj"
            android:layout_width="63dp"
            android:layout_height="56dp"
            android:layout_gravity="bottom"
            android:layout_marginBottom=" 5dip"
            android:layout_marginLeft=" 175dip"
            android:background="@drawable/truck" />

        <Button
            android:id="@+id/savej"
            android:layout_width="match_parent"
            android:layout_height="62dp"
            android:layout_gravity="bottom"
            android:layout_marginLeft=" 235dip"
            android:text="SAVE" />
</FrameLayout>
0 голосов
/ 06 января 2012

Вы хотели использовать LinearLayout?Вы пытаетесь использовать Android: Ориентация = "вертикальный" - который, конечно, не существует в FrameLayout.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...