English 中文(简体)
设置套件布局 xml 和机器人
原标题:set Layout xml in android
  • 时间:2012-05-25 10:52:58
  •  标签:
  • layout

`` `

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/round" />

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:background="@drawable/round" />

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:background="@drawable/round" />
</RelativeLayout>

`` `当我通过布局_alignParrentRight在透明图像(在相对布局中定义)的右侧设置图像时,图像被放在移动屏幕右侧,但如果我给出图像的实际大小,那么第二张图像就位于图像的末尾,但我不想硬码图像宽度。

最佳回答

您应该将您的布局图像链接起来, 以便更好地了解您的问题 。

问题回答

在第一个图像视图中

SET android:layout_aliginparentleft="true"

我希望问题能解决





相关问题
Very basic WPF layout question

How do I get this listbox to be maxiumum size, i.e. fill the group box its in. I ve tried width="auto" Height="auto", width="stretch" Height="stretch" annoyingly at the moment, it dynamicly sizes to ...

How to align the text to top of TextView?

How to align the text to top of a TextView? Equivalent Android API for Swings setInsets()? that is top of text should start be in (0,0) of TextView <?xml version="1.0" encoding="utf-8"?> <...

Centring a flow in Shoes

Can I center the contents of a flow in Shoes? I know that a paragraph can be centred like: para Centred paragrpah , :align=> center However, this does not work with flows: flow(:align=> ...

Overlaying with CSS

I want to load a website in an iframe, and overlay the website with some hints about the website that is shown. However, i got stuck at the point that the website has a variable passive white space at ...

How do you normally make a program look beautiful? [closed]

How can I make an Application look nice and not like an amateur pulled it together? I mean graphic-wise. Is there some sort of book you can read regarding beautiful program layouts, etc? I put this ...

热门标签