【发布时间】:2016-10-16 01:44:16
【问题描述】:
我需要制作一个面板,以便在我设计的不同自定义键盘视图之间切换。
类似的东西 My keypad with navigation panel and custom view of my Numeric keypad
【问题讨论】:
标签: android-studio android-custom-view navigationbar custom-keyboard
我需要制作一个面板,以便在我设计的不同自定义键盘视图之间切换。
类似的东西 My keypad with navigation panel and custom view of my Numeric keypad
【问题讨论】:
标签: android-studio android-custom-view navigationbar custom-keyboard
至少可以应用两种策略。
将您的自定义 KeyboardView 放在另一个 ViewGroup 中,例如:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
\>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Wazup?!"
/>
<org.dodroid.customime.CustomKeyboardView
android:id="@+id/keyboard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:keyBackground="@drawable/samplekeybackground"
android:keyPreviewLayout="@layout/preview"
android:popupLayout="@layout/keyboard_popup_keyboard"
/>
</LinearLayout>
TextView 可以是您的自定义面板。
【讨论】: