我刚刚下载了androio,我有2个issues.At,首先它显示了"hello“文本,当我尝试按下一个按钮时,它显示了这个(这个视图不是constraint.it有设计时位置,所以它将在运行时跳转到(0,0),除非添加约束)。
有人能帮忙吗?
发布于 2018-06-13 08:28:51
将约束布局转换为相对/线性布局--初学者最好从相对/线性布局开始
复制此代码并用activity_main.xml中的旧代码替换
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!" />
</RelativeLayout>https://stackoverflow.com/questions/50831558
复制相似问题