Это activity_main.xml
:
<?xml version="1.0" encoding="utf-8"?>
<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"
>
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Text:"
/>
<EditText
android:layout_toRightOf="@id/label"
android:layout_toEndOf="@id/label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:hint="type ur text here"
android:layout_alignBaseline="@id/label"
/>
</RelativeLayout>
В Design на Android Studio можно увидеть как TextView
, так и EditText
, но после компиляции только TextView
видимый.
Почему?
Скриншоты
Дизайн:
Apk:
Спасибо
Styles.xml:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
</resources>