2
In normal textview etc we can ellipsize the text by command:
android:ellipsize=""
I am customizing the android's soft keyboard. I want to know that is their a way to ellipsize the key of keyboard?
My code is:
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:horizontalGap="1px"
android:keyHeight="@dimen/key_height"
android:keyWidth="10%p"
android:verticalGap="-5%p" >
<!-- android:verticalGap="@dimen/verticalGap" > -->
<Row>
<Key
android:codes="555555"
android:horizontalGap="1.5%p"
android:isRepeatable="true"
android:keyEdgeFlags="left"
android:keyHeight="@dimen/mic_key_height"
android:keyIcon="@drawable/voice_input"
android:keyWidth="28.5%p" />
<Key
android:codes="111111"
android:ellipsize="end"
android:horizontalGap="2%p"
android:keyEdgeFlags="right"
android:keyHeight="@dimen/templates_key_height"
android:keyWidth="67%p" />
</Row>
<Row>
<Key
android:codes="222222"
android:ellipsize="end"
android:horizontalGap="32%p"
android:keyEdgeFlags="right"
android:keyHeight="@dimen/templates_key_height"
android:keyWidth="67%p" />
</Row>
<Row>
<Key
android:codes="333333"
android:ellipsize="end"
android:horizontalGap="32%p"
android:keyEdgeFlags="right"
android:keyHeight="@dimen/templates_key_height"
android:keyWidth="67%p" />
</Row>
<Row>
<Key
android:codes="777777"
android:ellipsize="end"
android:horizontalGap="32%p"
android:keyEdgeFlags="right"
android:keyHeight="@dimen/templates_key_height"
android:keyWidth="67%p" />
</Row>
<Row>
<Key
android:codes="666666"
android:horizontalGap="1.5%p"
android:isModifier="true"
android:keyEdgeFlags="left"
android:keyHeight="@dimen/templates_key_height"
android:keyIcon="@drawable/voice_keyboard_enable"
android:keyWidth="28.5%p"
android:verticalGap="1.5%p" />
<Key
android:codes="444444"
android:horizontalGap="1.7%p"
android:keyEdgeFlags="right"
android:keyHeight="@dimen/templates_key_height"
android:keyLabel="@string/more_templates"
android:keyWidth="67%p"
android:verticalGap="1%p" />
</Row>
</Keyboard>
我正在自定義android的軟鍵盤。我想知道這是他們的一種橢圓化鍵盤鍵的方法嗎?我將文本動態添加到鍵中,但文本流出關鍵邊界。 我想省略密鑰。Android:在軟鍵盤上橢圓化一個鍵的文本IME
幫助我。如果問題是不完整或一些信息缺失請讓我知道....... –