Hi everyone needs help here.
I don’t understand why my editText is not showing up. What Im so puzzled about is that I can see at my eclipse outline the editText.
Here are my codes:
activity_main.xml
<LinearLayout 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:orientation="horizontal" >
<Button
android:id="@+id/buttonTESTER1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/btnTester1_text"
/>
<EditText
android:id="@+id/editTextTESTER1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/editTextHINT1"
android:inputType="text"
/>
</LinearLayout>
strings.xml
<resources>
<string name="app_name">Android Tutorial</string>
<string name="hello_world">Hello world!</string>
<string name="menu_settings">Settings</string>
<string name="title_activity_main">MainActivity</string>
<string name="btnTester1_text">BUTTON TESTER</string>
<string name="editTextTester1_text">BUTTON TESTER</string>
<string name="editTextHINT1">Test</string>
</resources>
Im an absolute noob to android so please be patient. Please point out to me what Im doing wrong.
Because you have passed
android:layout_width="fill_parent"in your button and its taking whole width of your screen.Either change theandroid:orientation="horizontal"property ofLinearLayoutto vertical orandroid:layout_width="fill_parent"towrap_content.