删除edittext的内容

时间:2018-02-15 20:35:46

标签: java android android-edittext onclicklistener

我有9个edittext和一个按钮后面我看到当我们点击按钮后,所选的edittext的内容被删除请帮助我

back.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
        et1.addTextChangedListener(this);

        public void onTextChanged(CharSequence s, int start, int before, int count) {
            if (count == 0) {
                //text was deleted.
            }
        }
    }
});

1 个答案:

答案 0 :(得分:0)

public class MyClass
{
    public bool MyPredicate(MyClass myClass)
    {
        return true;
    }

    public static bool MyStaticPredicate(MyClass myClass)
    {
        return true;
    }
}

Func<MyClass, bool> predicate = new MyClass().MyPredicate;
Func<MyClass, bool> staticPredicate = MyClass.MyStaticPredicate;