Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/217.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android EditText中未显示其他小数位数。安卓工作室+;戴眼镜_Android_Android Edittext_Wear Os - Fatal编程技术网

Android EditText中未显示其他小数位数。安卓工作室+;戴眼镜

Android EditText中未显示其他小数位数。安卓工作室+;戴眼镜,android,android-edittext,wear-os,Android,Android Edittext,Wear Os,摘要 我有一个Wear OS应用程序,需要通过文本输入框获取用户的IP地址。我遇到的问题是,一旦输入完成,用户在键盘上的输入与框中的文本不匹配。因此,在键入过程中,不会显示额外的小数。一旦选中该复选标记,键盘将被关闭,输入框中的文本将具有这些小数。如果这不合理,请参阅下面的gif AVD配置 Name: Wear_OS_Round_API_28 CPU/ABI: Wear OS Intel Atom (x86) Path: C:\Users\user\.android\avd\Wear_

摘要

我有一个Wear OS应用程序,需要通过文本输入框获取用户的IP地址。我遇到的问题是,一旦输入完成,用户在键盘上的输入与框中的文本不匹配。因此,在键入过程中,不会显示额外的小数。一旦选中该复选标记,键盘将被关闭,输入框中的文本将具有这些小数。如果这不合理,请参阅下面的gif

AVD配置



Name: Wear_OS_Round_API_28

CPU/ABI: Wear OS Intel Atom (x86)

Path: C:\Users\user\.android\avd\Wear_OS_Round_API_28_1.avd

Target: android-wear [Wear OS] (API level 28)

Skin: AndroidWearRound360x360

SD Card: 512M

fastboot.chosenSnapshotFile: 

runtime.network.speed: full

hw.accelerometer: yes

hw.device.name: wear_round_360

hw.lcd.width: 360

hw.rotaryInput: yes

hw.initialOrientation: Portrait

image.androidVersion.api: 28

tag.id: android-wear

hw.mainKeys: yes

hw.camera.front: emulated

avd.ini.displayname: Wear OS Round API 28

hw.gpu.mode: auto

hw.ramSize: 512

PlayStore.enabled: true

fastboot.forceColdBoot: no

hw.cpu.ncore: 4

hw.keyboard: yes

hw.sensors.proximity: yes

hw.dPad: no

hw.lcd.height: 360

vm.heapSize: 32

skin.dynamic: yes

hw.device.manufacturer: Google

hw.gps: yes

hw.audioInput: yes

image.sysdir.1: system-images\android-28\android-wear\x86\

hw.keyboard.lid: yes

showDeviceFrame: yes

hw.camera.back: virtualscene

AvdId: Wear_OS_Round_API_28

hw.lcd.density: 240

hw.arc: false

hw.device.hash2: MD5:964d285643de951626a3e8ed7682a058

fastboot.forceChosenSnapshotBoot: no

fastboot.forceFastBoot: yes

hw.trackBall: no

hw.battery: yes

hw.sdCard: yes

tag.display: Wear OS

runtime.network.latency: none

disk.dataPartition.size: 2G

hw.sensors.orientation: yes

avd.ini.encoding: UTF-8

hw.gpu.enabled: yes
        <EditText
            android:id="@+id/editText"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentStart="true"
            android:layout_alignParentTop="true"
            android:layout_alignParentEnd="true"
            android:layout_alignParentBottom="true"
            android:layout_marginStart="0dp"
            android:layout_marginTop="20dp"
            android:layout_marginEnd="5dp"
            android:layout_marginBottom="75dp"
            android:ems="10"
            android:hint="IP Address"
            android:inputType="numberSigned|numberDecimal"
            android:digits="0123456789."
            />
编辑文本XML配置



Name: Wear_OS_Round_API_28

CPU/ABI: Wear OS Intel Atom (x86)

Path: C:\Users\user\.android\avd\Wear_OS_Round_API_28_1.avd

Target: android-wear [Wear OS] (API level 28)

Skin: AndroidWearRound360x360

SD Card: 512M

fastboot.chosenSnapshotFile: 

runtime.network.speed: full

hw.accelerometer: yes

hw.device.name: wear_round_360

hw.lcd.width: 360

hw.rotaryInput: yes

hw.initialOrientation: Portrait

image.androidVersion.api: 28

tag.id: android-wear

hw.mainKeys: yes

hw.camera.front: emulated

avd.ini.displayname: Wear OS Round API 28

hw.gpu.mode: auto

hw.ramSize: 512

PlayStore.enabled: true

fastboot.forceColdBoot: no

hw.cpu.ncore: 4

hw.keyboard: yes

hw.sensors.proximity: yes

hw.dPad: no

hw.lcd.height: 360

vm.heapSize: 32

skin.dynamic: yes

hw.device.manufacturer: Google

hw.gps: yes

hw.audioInput: yes

image.sysdir.1: system-images\android-28\android-wear\x86\

hw.keyboard.lid: yes

showDeviceFrame: yes

hw.camera.back: virtualscene

AvdId: Wear_OS_Round_API_28

hw.lcd.density: 240

hw.arc: false

hw.device.hash2: MD5:964d285643de951626a3e8ed7682a058

fastboot.forceChosenSnapshotBoot: no

fastboot.forceFastBoot: yes

hw.trackBall: no

hw.battery: yes

hw.sdCard: yes

tag.display: Wear OS

runtime.network.latency: none

disk.dataPartition.size: 2G

hw.sensors.orientation: yes

avd.ini.encoding: UTF-8

hw.gpu.enabled: yes
        <EditText
            android:id="@+id/editText"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentStart="true"
            android:layout_alignParentTop="true"
            android:layout_alignParentEnd="true"
            android:layout_alignParentBottom="true"
            android:layout_marginStart="0dp"
            android:layout_marginTop="20dp"
            android:layout_marginEnd="5dp"
            android:layout_marginBottom="75dp"
            android:ems="10"
            android:hint="IP Address"
            android:inputType="numberSigned|numberDecimal"
            android:digits="0123456789."
            />


数字输入类型只有一个小数点。您将不得不使用文本和写/或使用一个处理IP地址输入的库。我假设这只是一个显示额外的错误,然后呢?似乎有点倒退,它不显示,然后显示它。另外,使用您建议的方法,是否可以保留数字键盘布局?作为一款wear os应用程序,使用普通键盘布局会非常麻烦。关于watch UI/UX,这是一个很好的观点。可能需要检查现有的Android WearOS bug。