为了账号安全,请及时绑定邮箱和手机立即绑定

新人提问一下

56f2e3c1000186dc02970177.jpg


为什么我的所有控件都不能拖到边缘,http://img1.sycdn.imooc.com//56f2e408000183df02480136.jpg,就算拖到这里,也会自动弹到原来的位置。http://img1.sycdn.imooc.com//56f2e43a0001d23102150099.jpg

正在回答

2 回答

<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:gravity="top"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"//删除这段代码
    android:paddingRight="@dimen/activity_horizontal_margin"//删除这段代码
    android:paddingTop="@dimen/activity_vertical_margin"//删除这段代码
    tools:context="com.example.radiogroup.MainActivity" >

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:paddingLeft="0px"//添加这段代码
        android:paddingTop="0px"//添加这段代码
        android:text="TextView" />
   
</RelativeLayout>


0 回复 有任何疑惑可以回复我~
#1

tongtongstudio 提问者

谢谢了,非常感谢
2016-05-25 回复 有任何疑惑可以回复我~

查看你的视图padding 和margin  ,两个都必须为0 或者两个都删除

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
Android攻城狮的第一门课(入门篇)
  • 参与学习       312506    人
  • 解答问题       4931    个

想快速掌握Android应用开发基础,选择学习这门课程就对了。

进入课程

新人提问一下

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号