0
我是android開發新手。 我在main.xml中添加了一些控件,但是它們無法顯示在模擬器上。 請告訴我我做錯了什麼。 這是我的xml;在onCreate方法模擬器不顯示任何控件,需要幫助!
setContentView(R.layout.main);
您的活動:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:gravity="center">
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center" android:text="@string/app_name"
android:textSize="30dp"/>
<EditText android:id="@+id/editable"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android.Text="Text goes here " android:layout_weight="1" android:hint="@string/display"/>
<Button android:id="@+id/button"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:text="@string/mainPageButton"
android:textSize="25dp"/>
</LinearLayout>