Я не знаю почему, но я не могу набирать/писать на EditText, когда я пытаюсь это сделать. Курсор EditText не отображается, и клавиатура, если отображается, не является числовой. У меня есть следующая часть кода:Android: не могу набрать EditText
<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:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.android.asminhasdespesas.Meta_1Activity">
<TextView android:text="Test:"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TableLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TableRow>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number"
android:textColor="#000000"
android:cursorVisible="true"
android:ems="10"
android:id="@+id/editTextMeta"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:focusable="true"
android:focusableInTouchMode="true" />
<TextView
android:text="€"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
<TableRow>
<Button
android:id="@+id/buttonNaoColocar"
android:text="Cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="onClick"/>
<Button
android:id="@+id/buttonOk"
android:text="Ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="onClick"/>
</TableRow>
</TableLayout>
</LinearLayout>
Я пытался решить эту ситуацию с "Android: cursorVisible =" истинный» или даже "Android: TextColor =" # 000000", я также пытался «андроид: фокусируемый =» истинный» „андроид:.? focusableInTouchMode =“истинный„“, но проблема не исчезла, я не могу печатать на EditText
можете ли вы мне помочь
Код, который вы указали, должен быть в порядке. Это может быть вызвано чем-то выше ... –
Вы что-нибудь делаете с ним в своих файлах Java? – mkorcha
Я думаю, что размер текста редактирования слишком мал, чтобы нажимать. Он не имеет текстового содержимого и имеет параметр wrap_content для ширины и высоты. Для тестирования, попробуйте установить ширину и высоту текста редактирования на 100dp и посмотреть, не по-прежнему ли он работает. – CurlyCorvus