【发布时间】:2016-03-06 03:54:37
【问题描述】:
我刚开始在 mac 上进行 Android 开发。我只是在 content_main.xml 中编写了这段代码。这里的代码是重叠的。
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter Your Name"
android:layout_marginBottom="8dp"
android:id="@+id/activity_main_name" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Confirm Name"
android:onClick="confirmName"/>
寻求真诚的帮助。在此先感谢:)
【问题讨论】:
-
你附上图片了吗?看不到。
-
你确定你有 (View v) 作为你在点击时调用的方法的参数吗?
-
@Mohammad - 我想我知道问题所在,但我们需要查看图像。它没有正确连接。
-
@Mohammad 也发布您的 activity_main.xml 文件
标签: android xml android-studio android-linearlayout