Reputation: 973
I mean something like this
public class ConditionalEditText extends EditText implements TextWatcher
{
TextView tv;
....
}
The TextView is supposed to be displayed only when the EditText satisfies some user specified condition.
I tried to do it like this
public class ConditionalEditText extends LinearLayout implements TextWatcher
{
EditText edt;
TextView tv;
....
}
but then I cannot specify different XML attributes for edt for different instances of the view in my main layout.
Upvotes: 0
Views: 550
Reputation: 973
Turns out there is a way to do this after all. You can anchor a PopupWindow containing any view(s) you want to another View, which is just what I wanted. I got the code to do so from this link and modified it for my needs.
http://code.google.com/p/simple-quickactions/
All thanks to Qberticus for making it!
Upvotes: 0