Những gì tôi nghĩ tốt nhất là thực sự sử dụng khái niệm Framelayout.
như vậy mà bố trí ban đầu trông giống như
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
.
.
.
</Linearlayout>
Nơi nó bên Framelayout như thế này.
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
.
.
.
</Linearlayout>
<!-- The Magic is here -->
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</FrameLayout>
Tại đây LinearLayout sẽ giữ tất cả Chế độ xem EditText của bạn. Cũng nhớ tạo nền của EditText View null.
Như thế này
<EditText
android:layout_width="fill_parent"
android:layout_height="50dp"
android:id="@+id/editInp"
android:hint="@string/hello_world"
android:background="@null"
android:singleLine="true"
android:inputType="textCapWords"/>
hoặc
<EditText
android:layout_width="fill_parent"
android:layout_height="50dp"
android:id="@+id/editInp"
android:hint="@string/hello_world"
android:background="@android:drawable/transparent"
android:singleLine="true"
android:inputType="textCapWords"/>
Nguồn
2016-09-07 17:27:56
@MarvinLabs: +1, ông đã nhanh hơn;) –