Android软件的意图

Android软件的意图,android,Android,这是一个代码说明 keyboardview或其扩展类之一。你没有分享你的亲戚,但我认为例外可能是因为你的亲戚有问题 您可以将一个按钮放在键盘右侧,如下所示(res/layout/input.xml):

这是一个代码说明
keyboardview或其扩展类之一。你没有分享你的亲戚,但我认为例外可能是因为你的亲戚有问题

您可以将一个按钮放在键盘右侧,如下所示(res/layout/input.xml):

键盘从底部弹出,您可以使用以下行定义清单中的行为
android:windowSoftInputMode

 <activity
        android:name=".NAME"
        android:label="@string/appName"
        android:launchMode="singleTop"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.HOLOorAnyThemeYouWant"
        android:windowSoftInputMode="stateAlwaysHidden" >

android:WindowsofInputMode 活动的主窗口如何与包含屏幕软键盘的窗口交互。此属性的设置会影响两件事: 当活动成为用户关注的焦点时,软键盘的状态(无论是隐藏的还是可见的)。 对“活动”主窗口所做的调整-是将其调整为更小的大小以为软键盘腾出空间,还是在软键盘覆盖部分窗口时,其内容平移以使当前焦点可见


您可以使用任何视图/视图组作为键盘布局,事实上,您甚至可以将键盘布局设置为不是keyboardview实例或其扩展类之一的视图。你没有分享你的亲戚,但我认为例外可能是因为你的亲戚有问题

您可以将一个按钮放在键盘右侧,如下所示(res/layout/input.xml):


@totzi10我不明白你面临的问题,你能提供更多信息吗。input是xml文件的名称,keyboardView是在其内部的布局中定义的。抱歉,现在开始!非常感谢你!
 <activity
        android:name=".NAME"
        android:label="@string/appName"
        android:launchMode="singleTop"
        android:screenOrientation="portrait"
        android:theme="@style/Theme.HOLOorAnyThemeYouWant"
        android:windowSoftInputMode="stateAlwaysHidden" >
<LinearLayout
 xmlns:android="http://schemas.android.com/apk/res/android"
 android:id="@+id/keyboardLayout"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
 >
 <android.inputmethodservice.KeyboardView 
     android:id="@+id/keyboardView"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     />
 <ImageView 
     android:id="@+id/imageView"
     android:layout_width="wrap_content"
     android:layout_height="fill_parent"
     android:background="@drawable/ic_launcher"/>
 public View onCreateInputView() {
    mInputView = (View)getLayoutInflater().inflate( R.layout.input, null);
    mKeyboardView = (KeyboardView)mInputView.findViewById(R.id.keyboardView);
    mKeyboardView.setOnKeyboardActionListener(this); 
    mKeyboardView.setKeyboard(mQwertyKeyboard);
    return mInputView; 
}