I want to create a layout for an Android app that has a numeric keypad and takes four digits to determine if it matches a preset passcode value.

我想为具有数字小键盘的Android应用程序创建布局,并使用四位数来确定它是否与预设的密码值匹配。

I have seen a few applications use this, so I would have thought that it was a high level widget of some description.

我已经看到一些应用程序使用它,所以我认为它是一些描述的高级小部件。

The only thing I can find that's remotely close to what I want is this:

我能找到的唯一一件与我想要的东西非常接近的是:

<EditText
    android:id="@+id/editText1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:ems="10"
    android:inputType="numberPassword" >

    <requestFocus />
</EditText>

But this isn't really what I'm looking for.

但这并不是我想要的。

Any input would be awesome and thanks in advance.

任何输入都会很棒,并提前感谢。

EDIT: Here's an image of the iOS dropbox app start screen that I'd like:

编辑:这是我想要的iOS保管箱应用程序启动屏幕的图像:

4 个解决方案

#1


4

Did you try adding this:

你尝试添加这个:

android:maxLength="4"
android:password="true"

This results in a more password like way.

这样可以产生更多密码。

Update: I'd implement four EditText and make them each maxLength="1". If you align them horizontally this should work :)

更新:我将实现四个EditText,并使每个maxLength =“1”。如果你水平对齐它们应该工作:)

更多相关文章

  1. 为什么我们应该将XMPP而不是JSON用于简单(仅文本)消息传递应用程序
  2. Android - 在一个应用程序中启动另外一个已经安装的应用程序或系
  3. Android混合应用程序:JQueryMobile ajax不支持https,但可以使用htt
  4. 第三部分:Android 应用程序接口指南---第二节:UI---第六章 对话框
  5. 如何将本机应用程序(android)与phonegap应用程序集成
  6. 为什么我的Android应用程序偶尔可以非常快地耗尽电池?
  7. 如何在android 5.0(L)中运行应用程序活动名称?
  8. Android应用程序启动过程上
  9. Java Android套接字连接。错误的IP地址导致应用程序停止响应

随机推荐

  1. Cocos2d-x移植android加入震动效果
  2. Android自用-----Intent 介绍
  3. Android(安卓)OKHTTP 网络请求出错重连--
  4. Android中shape使用
  5. [android][利用JNI技术在Android中调用、
  6. Android(安卓)Neon
  7. android通过代码来开启和关闭移动网络
  8. webservice android
  9. android主线程和子线程的区别
  10. Android 菜单简析01(OptionsMenu)