全て、
この問題が以前に提起されたスレッドを見つけることができないので、ばかげて簡単なことを見逃しているに違いありません. 私はアンドロイドが初めてで、inputmethod
. ロック画面用のすべての Android コードを取り出して、エミュレーターまたは Samsung Galaxy で表示すると、ボタンのフォントが完璧に見えます。しかし、HTC Sensation でそれらを見ると、すべてがひどくピクセル化されています。最初は問題はsym_keyboard_numX
画像ファイルにあると思っていましたが、そうではないことを確認するために 2 つのことをテストしました。
- 私は元々、これらの hdpi と mdpi の両方のイメージを持っていました。間違ったイメージが読み込まれないように、mdpi イメージを削除して hdpi だけを残しました。
- 数字の代わりに画像を使用してみ
keyLabel
ましたが、テキストはまだひどくピクセル化されています。
品質に影響を与える可能性のある値を探してすべてのコードを調べましたが、何も見つかりませんでした。どんな助けにも感謝します!
キーボードを定義する xml ファイルを次に示します。違いをテストするためにいくつかのボタンを使用してkeyLabels
、ほとんどのボタンで使用していることがわかります。keyIcons
私が言ったように、違いはありません。あなたに役立つ他のコードは知りません。
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2008, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="33.33%p"
android:horizontalGap="2px"
android:verticalGap="0px"
android:keyHeight="@dimen/password_keyboard_key_height"
>
<Row>
<Key android:codes="49" android:keyLabel="1" android:keyEdgeFlags="left"/>
<Key android:codes="50" android:keyLabel="2"/>
<Key android:codes="51" android:keyLabel="3"/>
</Row>
<Row>
<Key android:codes="52" android:keyLabel="4" android:keyEdgeFlags="left"/>
<Key android:codes="53" android:keyIcon="@drawable/sym_keyboard_num5"/>
<Key android:codes="54" android:keyLabel="6"/>
</Row>
<Row>
<Key android:codes="55" android:keyLabel="7" android:keyEdgeFlags="left"/>
<Key android:codes="56" android:keyLabel="8"/>
<Key android:codes="57" android:keyLabel="9"/>
</Row>
<Row android:rowEdgeFlags="bottom">
<Key android:codes="10" android:keyIcon="@drawable/sym_keyboard_ok"/>
<Key android:codes="48" android:keyLabel="0"/>
<Key android:codes="-5" android:keyIcon="@drawable/sym_keyboard_delete"
android:iconPreview="@drawable/sym_keyboard_feedback_delete"
android:isRepeatable="true" android:keyEdgeFlags="right"/>
</Row>
</Keyboard>