首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

问个imageview有关问题

2013-09-09 
问个imageview问题RelativeLayout xmlns:androidhttp://schemas.android.com/apk/res/androidxmlns:to

问个imageview问题
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:background="@drawable/gm"
    tools:context=".MainActivity" >

 <ImageView
     android:id="@+id/imageView"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
      android:src="@drawable/gg />

</RelativeLayout>
这是我的布局代码,效果图:
问个imageview有关问题
但我移动一下图中的时钟图片时,他就消失了,难道不可以直接拖到合适的位置的吗?就算我把它该小了拖都是不行,会消失,我该怎么做,上网查说我缺失代码,但我看不出,求教
问个imageview有关问题
问个imageview有关问题
问个imageview有关问题 imageview 图片 移动 布局 android
[解决办法]
直接操作确实很不方便,不如去xml里修改

你是relativelayout 一般加android:layout_alignParentTop = "true" 组合上margin就可以到对应位置了

热点排行