Re: [android-developers] Re: Changing the drop down MultiAutoCompleteTextView

2010-07-18 Thread prakash Ramachandran
 Kumar,

Thanks for your reply, The problem I am facing if when I use the
ResourceCursorAdapter and type some thing on the MultiAutoCompleteTextView
the dropdown dose not pop up searching the attached adapter.. Please find my
code below.
public class Collaboration extends Activity
{

 MyAdapter myContactAdapter;

 @Override
 protected void onCreate(Bundle savedInstanceState)
 {
  setContentView(R.layout.collaboration);

//This is my adapter which extends ResourceCursorAdapter and the db cursor
passed has columns FIRST_NAME,LAST_NAME,and LOGIN_ID

myContactAdapter = new MyAdapter(this,dbCursor);
 //Finding the MultiAutoCompleteTextView in my Main Layout
mSendTo = (MultiAutoCompleteTextView) findViewById(R.id.collab_send_to);

mSendTo.setAdapter(myContactAdapter);
mSendTo.getDropDownBackground().setAlpha(0);
mSendTo.setDropDownBackgroundResource(R.color.black_color);

//Setting the tokenizer as ','
mSendTo.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer());
}



private class MyAdapter extends ResourceCursorAdapter {

public MyAdapter(Context context, Cursor cur) {
super(context, *R.layout.contactheader*, cur);
}

@Override
public View newDropDownView(Context context, Cursor cur, ViewGroup
parent) {
LayoutInflater lInflator =
(LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
return lInflator.inflate(*R.layout.contactheader*, parent,
false);
}

@Override
public void bindView(View view, Context context, Cursor cur) {
TextView nameText =
(TextView)view.findViewById(R.id.contact_name);
TextView emailText =
(TextView)view.findViewById(R.id.contact_email);
CheckBox cbListCheck =
(CheckBox)view.findViewById(R.id.contact_chkbx);


 
nameText.setText(cur.getString(cur.getColumnIndex(FIRST_NAME))+,+cur.getString(cur.getColumnIndex(LAST_NAME)));

 emailText.setText(cur.getString(cur.getColumnIndex(LOGIN_ID)));
cbListCheck.setVisibility(View.GONE);
}
}
}

*R.layout.contactheader:*
*
*
*
?xml version=1.0 encoding=utf-8?

LinearLayout
  xmlns:android=http://schemas.android.com/apk/res/android;
  android:id=@+id/collab_msgheader
  android:orientation=vertical
  android:layout_width=fill_parent
  android:layout_height=fill_parent

  RelativeLayout
  android:layout_width=wrap_content
  android:layout_height=wrap_content
  
CheckBox android:id=@+id/contact_chkbx
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:focusable=false
 android:saveEnabled=true
 /
TextView android:id=@+id/contact_name
android:layout_toRightOf=@+id/contact_chkbx
android:layout_width=wrap_content
android:layout_height=wrap_content
android:textSize=15sp
android:textStyle=bold
android:textColor=#00
/
TextView android:id=@+id/contact_email
android:layout_below=@+id/contact_name
android:layout_toRightOf=@+id/contact_chkbx
android:layout_width=wrap_content
android:layout_height=wrap_content
android:textSize=10sp
android:textStyle=bold
android:textColor=#00
/
/RelativeLayout
/LinearLayout

I really appreciate your help, Thanks in advance.

Regards,
Prakash R
*

On Sat, Jul 17, 2010 at 4:03 PM, Kumar Bibek coomar@gmail.com wrote:

 What are the problems you are facing? It's pretty straight forward
 using the ResourceCursorAdapter. Please post your issues that you
 face, and may be some code snippets as well. That will help us
 understand your problems.

 Thanks and Regards,
 Kumar Bibek
 http://tech-droid.blogspot.com

 On Jul 17, 12:59 am, prakash Ramachandran
 prakashramachand...@gmail.com wrote:
  Dear Friends,
 
  I have a MultiAutoCompleteTextView  in my layout, I have attached an
  array adapter of email address to the MultiAutoCompleteTextView . Now
  when a user types any letters in this view it will show a drop down
  with the matching email address to the letter typed.
 
  I wanted to modify the the drop down in such a way it also display's
  the Full name and email address one below the other . I tried using
  the ResourceCursorAdapter but could not get it to work.
 
  Any help is highly appreciated.
 
  Thanks,
  Prakash R

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Changing the drop down MultiAutoCompleteTextView

2010-07-17 Thread Kumar Bibek
What are the problems you are facing? It's pretty straight forward
using the ResourceCursorAdapter. Please post your issues that you
face, and may be some code snippets as well. That will help us
understand your problems.

Thanks and Regards,
Kumar Bibek
http://tech-droid.blogspot.com

On Jul 17, 12:59 am, prakash Ramachandran
prakashramachand...@gmail.com wrote:
 Dear Friends,

 I have a MultiAutoCompleteTextView  in my layout, I have attached an
 array adapter of email address to the MultiAutoCompleteTextView . Now
 when a user types any letters in this view it will show a drop down
 with the matching email address to the letter typed.

 I wanted to modify the the drop down in such a way it also display's
 the Full name and email address one below the other . I tried using
 the ResourceCursorAdapter but could not get it to work.

 Any help is highly appreciated.

 Thanks,
 Prakash R

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en