0
我对android编程非常新,我希望你能帮我解决一些问题。我已经在xml文件中设置了背景,并且正在尝试将图像按钮对齐到我背景的特定区域。我曾尝试使用密度像素,但它不够精确,现在按钮覆盖了背景的一个区域,我希望可以看到它。任何想法如何我可以解决这个问题?对齐图像按钮与背景android
非常感谢,
亚历
我的代码如下:
<?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"
android:background="@drawable/home_background">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="93dp" >
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="341dp" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<ImageButton
android:id="@+id/imageButton1"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginLeft="30dp"
android:layout_marginTop="30dp"
android:background="@null"
android:scaleType="fitXY"
android:src="@drawable/workbench" />
</LinearLayout>
</ScrollView>
</LinearLayout>
</LinearLayout>
你知道我会怎么做吗? – user3407957 2014-10-26 19:10:56
你可以发布图片展示你想要实现的目标吗? – Philio 2014-10-26 19:32:34
http://postimg.org/image/o1taa8lvh/在这里查看我有一个比较的视图 – user3407957 2014-10-26 19:55:11