美文网首页
自定义AlertDialog-EditText

自定义AlertDialog-EditText

作者: mimimomo | 来源:发表于2017-02-14 10:36 被阅读162次

    title: 自定义AlertDialog-EditText

    参考实例

    用到了接口的方法

    定义一个接口,通过该接口来实现获取到里面的内容

        public interface LoginInputListener {
            void onLoginInputComplete(String username, String password);
        }
    

    在主activity中去实现接口

    
        @Override
        public void onLoginInputComplete(String username, String password)
        {
            Toast.makeText(this, "帐号:" + username + ",  密码 :" + password,
                    Toast.LENGTH_SHORT).show();
        }
    

    Android 官方推荐 : DialogFragment 创建对话框

    Github

    相关文章

      网友评论

          本文标题:自定义AlertDialog-EditText

          本文链接:https://www.haomeiwen.com/subject/uerxwttx.html