登录
首页 » Android » Android实现按回车确认键显示其它输入框的EditText

Android实现按回车确认键显示其它输入框的EditText

于 2022-03-26 发布 文件大小:25.82 kB
0 104
下载积分: 2 下载次数: 1

代码说明:

Android实现按回车确认键显示其它输入框的EditText,在正常状态下,其它部分的EditText是灰色的,当按下回车键后,高亮显示进入输入状态,相关代码可参考如下代码:   public void onCreate(Bundle savedInstanceState)   {    super.onCreate(savedInstanceState);    setContentView(R.layout.main);    editTexts[0] = (EditText) findViewById(R.id.edittext1);    editTexts[1] = (EditText) findViewById(R.id.edittext2);    editTexts[2] = (EditText) findViewById(R.id.edittext3);    for (int i = 0; i < editTexts.length; i++)    editTexts[i].setOnKeyListener(this);    buttons[0] = (Button) findViewById(R.id.button1);    buttons[1] = (Button) findViewById(R.id.button2);    buttons[2] = (Button) findViewById(R.id.button3);   }

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • Android 实现书籍翻页效果
    Android 实现书籍翻页效果。运用android对书籍进行翻页效果的设计。
    2022-06-12 08:08:51下载
    积分:1
  • chrome
    问道服务端,问道游戏说明,问道简体问道服务端,问道游戏说明,问道简体(Asked the server, asked the game instructions, and asked the simple)
    2018-01-25 02:45:02下载
    积分:1
  • 简单播放器,
    设计平面  ,多页面平面切换,数据接口为百度音乐 。音乐资源丰富。界面美化。处处亮点
    2022-01-31 08:08:41下载
    积分:1
  • android课程随书代码
    适合新手学习,有系统的说明注释,对androi d的讲解编程会有详细的把握,附件有整套代码,会对android有全面的了解,有一个体系的认识
    2022-02-14 05:07:38下载
    积分:1
  • WIFI2
    Android手机端通过WIFI获取WIFI ROBOT智能小车视频(MJPEG)源代码 (Android mobile client access via WIFI WIFI ROBOT smart car video (MJPEG) source code)
    2013-09-28 13:32:37下载
    积分:1
  • 视屏录制demo,可以支持usb
    android-eye =========== Change your android phone to a surveillance security camera. ## Download ## You can download binrary from Google Play:  https://play.google.com/store/apps/details?id=teaonly.droideye  ## Specifications ## * Streaming    * Build-in web service, you can see the video via browser in pc and another phone, a modem browser with HTML5 is reauired.   * H.264 video and G.726 audio   * Streaming via websocket between browser and android phone.   * Decoding H.264 and G.726 in pure Javascript * Smart   * Support motion detecting (doing)   * Support advanced vision algorithms (doing)   * Publishing alarm messages to SNS (not ready)     * Access over internet   * This app don"t support internet, you can try my another ap
    2022-11-06 02:50:03下载
    积分:1
  • websocket实现多人聊天
    环境:jdk1.8、MyEclipse8.6、tomcat7.0.47、编译环境为1jdk1.6、tomcat运行环境为1.8
    2022-06-26 13:48:22下载
    积分:1
  • AuthenticatorDescription
    A Parcelable value type that contains information about an account authenticator for Andriod.
    2013-10-21 16:23:50下载
    积分:1
  • 基于android studio开发的新闻资讯系统
    基于android studio开发的新闻资讯系统,完美兼容,界面优美,可参赛。 有代码,有报告册(包含实验截图,实验详解,实验功能描述,功能实现,数据库设计,系统框架,系统功能设计,以及需求分析等)一步到位,
    2020-06-16下载
    积分:1
  • android open gl 示例代码下载
    [实例简介]Open GL 入门级示例 [实例截图] [核心代码]package com.china.gltry;import javax.microedition.khronos.egl.EGL10;import javax.microedition.khronos.egl.EGL11;import javax.microedition.khronos.egl.EGLConfig;import javax.microedition.khronos.egl.EGLContext;import javax.microedition.khronos.egl.EGLDisplay;import javax.microedition.khronos.egl.EGLSurface;import javax.microedition.khronos.opengles.GL;import android.view.SurfaceHolder;/** * An EGL helper class. */public class EGLHelper{ public EGLHelper() { } /** * Initialize EGL for a given configuration spec. * @param configSpec */ public void start(int[] configSpec){ /* * Get an EGL instance */ mEgl = (EGL10) EGLContext.getEGL(); /* * Get to the default display. */ mEglDisplay = mEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY); /* * We can now initialize EGL for that display */ int[] version = new int[2]; mEgl.eglInitialize(mEglDisplay, version); EGLConfig[] configs = new EGLConfig[1]; int[] num_config = new int[1]; mEgl.eglChooseConfig(mEglDisplay, configSpec, configs, 1, num_config); mEglConfig = configs[0]; /* * Create an OpenGL ES context. This must be done only once, an * OpenGL context is a somewhat heavy object. */ mEglContext = mEgl.eglCreateContext(mEglDisplay, mEglConfig, EGL10.EGL_NO_CONTEXT, null); mEglSurface = null; } /* * Create and return an OpenGL surface */ public GL createSurface(SurfaceHolder holder) { /* * The window size has changed, so we need to create a new * surface. */ if (mEglSurface != null) { /* * Unbind and destroy the old EGL surface, if * there is one. */ mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT); mEgl.eglDestroySurface(mEglDisplay, mEglSurface); } /* * Create an EGL surface we can render into. */ mEglSurface = mEgl.eglCreateWindowSurface(mEglDisplay, mEglConfig, holder, null); /* * Before we can issue GL commands, we need to make sure * the context is current and bound to a surface. */ mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext); GL gl = mEglContext.getGL(); return gl; } /** * Display the current render surface. * @return false if the context has been lost. */ public boolean swap() { mEgl.eglSwapBuffers(mEglDisplay, mEglSurface); /* * Always check for EGL_CONTEXT_LOST, which means the context * and all associated data were lost (For instance because * the device went to sleep). We need to sleep until we * get a new surface. */ return mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST; } public void finish() { if (mEglSurface != null) { mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT); mEgl.eglDestroySurface(mEglDisplay, mEglSurface); mEglSurface = null; } if (mEglContext != null) { mEgl.eglDestroyContext(mEglDisplay, mEglContext); mEglContext = null; } if (mEglDisplay != null) { mEgl.eglTerminate(mEglDisplay); mEglDisplay = null; } } EGL10 mEgl; EGLDisplay mEglDisplay; EGLSurface mEglSurface; EGLConfig mEglConfig; EGLContext mEglContext;}
    2015-04-06下载
    积分:1
  • 696518资源总数
  • 105554会员总数
  • 2今日下载