I've just been playing around with this solution and it works, sort
of, but feels a little hacky.
I was wondering if this alternative might work:
1. Use a LinearLayout and set the background to be the same
StateListDrawable used by EditText - I can't get this to work, but
then again I'm a newbie
To answer my own question...
Use TextView.setCompoundDrawables(null, null, null, null) to hide the
cross.
Next thing is to detect when the cross is pressed on.
Currently I do this:
mEditText.setOnTouchListener(new OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
mjc147 wrote:
To answer my own question...
Use TextView.setCompoundDrawables(null, null, null, null) to hide the
cross.
Next thing is to detect when the cross is pressed on.
Currently I do this:
mEditText.setOnTouchListener(new OnTouchListener() {
public boolean onTouch(View
I'll refrain from saying Wow, thanks Mark! because you probably get
that all the time :)
I just looked at a bunch of apps that came with the Hero and the only
one other than the Market using this cross, is Google Maps. I couldn't
see anything like that in Internet, People, Mail, Google Talk or
mjc147 wrote:
I'll refrain from saying Wow, thanks Mark! because you probably get
that all the time :)
That depends on whether what I'm saying is what somebody wants to hear.
But, thanks!
I just looked at a bunch of apps that came with the Hero and the only
one other than the Market using
mjc147 wrote:
I want to build a very simple view which looks exactly like the top
section of the Android Market search activity (i.e. search EditText
view and search button). Ideally I'd like it to look EXACTLY the same.
Maybe there is some layout XML and/or code I can reuse?
The Android
Try:
Drawable x = getResources().getDrawable(R.drawable.x);
x.setBounds(0, 0, x.getIntrinsicWidth(), x.getIntrinsicHeight());
mEditText.setCompoundDrawables(null, null, x, null);
--
Jack Ha
Open Source Development Center
・T・ ・ ・Mobile・ stick together
The coverage you need at the
On Sep 27, 10:37 pm, Mark Murphy mmur...@commonsware.com wrote:
Could you perhaps post a screenshot somewhere?
Hi Mark - here is the screenshot (taken from my HTC Hero):
http://www.mediafire.com/?sharekey=e574c08de66edfe8c79b87b207592a1ce04e75f6e8ebb871
On Sep 28, 12:43 am, Jack Ha jack...@t-mobile.com wrote:
Drawable x = getResources().getDrawable(R.drawable.x);
x.setBounds(0, 0, x.getIntrinsicWidth(), x.getIntrinsicHeight());
mEditText.setCompoundDrawables(null, null, x, null);
Thanks Jack - visually, that works exactly as I
9 matches
Mail list logo