键盘don';无法在android中打开EditBox
我有这样的布局:键盘don';无法在android中打开EditBox,android,Android,我有这样的布局: <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" android:paddingBottom="@dimen/activity_vert
<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"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".ReceitaOnlineUI"
android:background="@color/color1">
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Spinner
android:id="@+id/spinner_busca_receita_online"
android:layout_width="212dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:entries="@array/opcao_busca_receita" />
<Button
android:id="@+id/btnTeste"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Button" />
</LinearLayout>
<FrameLayout
android:id="@+id/myfirstfragment"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</FrameLayout>
</LinearLayout>
</RelativeLayout>
当我点击编辑文本时,键盘不会出现!在android的工具栏中,我看到它打开了它,因为键盘上的图标在那里…但我在屏幕上看不到它
有人知道我需要做什么,来展示
编辑:似乎编辑文本需要失去焦点,键盘显示…您是在实际设备上还是在模拟器上进行测试?在我的设备和模拟器中=/您如何使用id
myfirstfragment
将第二个布局添加到FrameLayout
?你能帮我发一下密码吗?是的!已经发布了!我不知道为什么,但在我的设备中,它似乎正在工作。。。。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/searchbyname_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<EditText
android:id="@+id/txtSearchByName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:hint="@string/dica_search_by_name" >
</EditText>
<Button
android:id="@+id/btnFindOnLine"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
</LinearLayout>
getSupportFragmentManager().beginTransaction().add(R.id.myfirstfragment, myFragment, FRAGMENT_TAG_STRING)
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE)
.commit();