Ad
EditText Is Not Visible Inside TextInputLayout
I have EditText, and it is placed inside the TextInputLayout
. But the problem is EditText is not visible after deploying on the device. My code is below.
<TableRow
android:id="@+id/tableRow2"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_height="match_parent"
android:orientation="horizontal"
android:layout_width="0dp"
android:layout_weight="1">
<android.support.design.widget.TextInputLayout
android:id="@+id/textInputRFID"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:layout_marginBottom="3dp"
android:layout_weight=".70"
android:orientation="horizontal">
<EditText
android:id="@+id/txtRFID"
android:inputType="text"
android:layout_weight=".70"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:hint="TAG ID"
style="@style/textview_text" />
</android.support.design.widget.TextInputLayout>
<Button
android:text="Start"
android:id="@+id/BtnStartStop"
android:background="@drawable/styl_blue_button"
style="@style/textview_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".30" />
</LinearLayout>
</TableRow>
Ad
Answer
The reason is because you are setting layout_width
to 0.
Remove layout_weight
in editText
element and change the layout_width
to match_parent
.
<EditText
android:id="@+id/txtRFID"
android:inputType="text"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:hint="TAG ID"/>
Ad
source: stackoverflow.com
Related Questions
- → should I choose reactjs+f7 or f7+vue.js?
- → Phonegap Android write to sd card
- → Local reference jquery script in nanohttpd (Android)
- → Click to navigate on mobile devices
- → How to allow api access to android or ios app only(laravel)?
- → Access the Camera and CameraRoll on Android using React Native?
- → React native change listening port
- → What is the default unit of style in React Native?
- → Google play market autocomplete icon
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → Using Laravel with Genymotion
- → react native using like web-based ajax function
- → react native pdf View
Ad