Re: [android-developers] Get Data from Database of selected Item

2011-09-19 Thread Bishan
thanx  Krishna

On 9/19/11, Krishna Prasad  wrote:
> Use Simple cursor adapter insted of array adapter...
>
> Check
> http://thinkandroid.wordpress.com/2010/01/09/simplecursoradapters-and-listviews/
>
> On Mon, Sep 19, 2011 at 4:54 PM, Bishan  wrote:
>
>> Got  java.lang.ClassCastException: java.lang.String in line 78
>>
>> (code in line 78 is cursor = (Cursor) parent.getItemAtPosition(position);)
>>
>> what is the issue ?
>> file attached.
>>
>> On Mon, Sep 19, 2011 at 11:42 AM, Krishna Prasad <
>> krishnaprasadrs.1...@gmail.com> wrote:
>>
>>> did u get your values from db correctly?
>>>
>>>
>>> On Mon, Sep 19, 2011 at 11:21 AM, Bishan  wrote:
>>>
 i got this exception,

 java.lang.ClassCastException: android.widget.ArrayAdapter

 for below code.

 SimpleCursorAdapter simpleCursorAdapter = (SimpleCursorAdapter)
 parent.getAdapter();

 On 9/19/11, Bishan  wrote:
 > thanx Krishna. i'll check this.
 >
 > On 9/19/11, Krishna Prasad  wrote:
 >> final int id = cursor.getint(idColIndex );
 >>
 >> just check the value using logcat whether it is getting or not
 >>
 >> On Mon, Sep 19, 2011 at 10:57 AM, Krishna Prasad <
 >> krishnaprasadrs.1...@gmail.com> wrote:
 >>
 >>> id means the String variable where u save the cursor.colum value.
 >>>
 >>>
 >>> On Mon, Sep 19, 2011 at 10:53 AM, Bishan  wrote:
 >>>
  bundle.putString("any name",Id);
 
  what is the " Id " in above code ?
 
  On 9/19/11, Krishna Prasad  wrote:
  > welcome..
  >
  > On Mon, Sep 19, 2011 at 10:33 AM, Bishan 
 wrote:
  >
  >> thanx Krishna :)
  >>
  >> On 9/19/11, Krishna Prasad 
 wrote:
  >> > @Override
  >> > public void onItemClick(AdapterView parent,
  >> > View
  >> > arg1,
  >> > int
  >> i,
  >> > long l) {
  >> > try {
  >> >
  >> > SimpleCursorAdapter simpleCursorAdapter =
  >> > (SimpleCursorAdapter) parent
  >> > .getAdapter();
  >> > final Cursor cursor =
  >> simpleCursorAdapter.getCursor();
  >> >
  >> > final int idColIndex =
  cursor.getColumnIndex("_id");
  >> >
  >> > Save the value in a variable  and use bundles
  >> >
  >> >
  >> > Bundle bundle = new Bundle();
  >> > bundle.putString("any name",Id);
  >> >
  >> > Intent intent = new Intent(first
  >> > activity.this,
  >> > second activity.class);
  >> > intent.putExtras(bundle);
  >> > startActivity(intent);
  >> >
  >> > On Mon, Sep 19, 2011 at 10:27 AM, Bishan 
  >> > wrote:
  >> >
  >> >> I have wrote a program to get students names from database
  >> >> and
  display
  >> >> them, using ListActivity. and used OnItemClickListener to
 click
  >> >> on
  >> >> each items.
  >> >>
  >> >> now i want to do, when i click on a student name, display
 other
  >> >> information of student (age, sex, address) on another screen.
  >> >>
  >> >> how could i do this?
  >> >>
  >> >>  pls guide me.
  >> >>
  >> >> --
  >> >> 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
  >> >
  >> > --
  >> > 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
  >>
  >> --
  >> 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-deve

Re: [android-developers] Get Data from Database of selected Item

2011-09-19 Thread Krishna Prasad
Use Simple cursor adapter insted of array adapter...

Check
http://thinkandroid.wordpress.com/2010/01/09/simplecursoradapters-and-listviews/

On Mon, Sep 19, 2011 at 4:54 PM, Bishan  wrote:

> Got  java.lang.ClassCastException: java.lang.String in line 78
>
> (code in line 78 is cursor = (Cursor) parent.getItemAtPosition(position);)
>
> what is the issue ?
> file attached.
>
> On Mon, Sep 19, 2011 at 11:42 AM, Krishna Prasad <
> krishnaprasadrs.1...@gmail.com> wrote:
>
>> did u get your values from db correctly?
>>
>>
>> On Mon, Sep 19, 2011 at 11:21 AM, Bishan  wrote:
>>
>>> i got this exception,
>>>
>>> java.lang.ClassCastException: android.widget.ArrayAdapter
>>>
>>> for below code.
>>>
>>> SimpleCursorAdapter simpleCursorAdapter = (SimpleCursorAdapter)
>>> parent.getAdapter();
>>>
>>> On 9/19/11, Bishan  wrote:
>>> > thanx Krishna. i'll check this.
>>> >
>>> > On 9/19/11, Krishna Prasad  wrote:
>>> >> final int id = cursor.getint(idColIndex );
>>> >>
>>> >> just check the value using logcat whether it is getting or not
>>> >>
>>> >> On Mon, Sep 19, 2011 at 10:57 AM, Krishna Prasad <
>>> >> krishnaprasadrs.1...@gmail.com> wrote:
>>> >>
>>> >>> id means the String variable where u save the cursor.colum value.
>>> >>>
>>> >>>
>>> >>> On Mon, Sep 19, 2011 at 10:53 AM, Bishan  wrote:
>>> >>>
>>>  bundle.putString("any name",Id);
>>> 
>>>  what is the " Id " in above code ?
>>> 
>>>  On 9/19/11, Krishna Prasad  wrote:
>>>  > welcome..
>>>  >
>>>  > On Mon, Sep 19, 2011 at 10:33 AM, Bishan 
>>> wrote:
>>>  >
>>>  >> thanx Krishna :)
>>>  >>
>>>  >> On 9/19/11, Krishna Prasad 
>>> wrote:
>>>  >> > @Override
>>>  >> > public void onItemClick(AdapterView parent, View
>>>  >> > arg1,
>>>  >> > int
>>>  >> i,
>>>  >> > long l) {
>>>  >> > try {
>>>  >> >
>>>  >> > SimpleCursorAdapter simpleCursorAdapter =
>>>  >> > (SimpleCursorAdapter) parent
>>>  >> > .getAdapter();
>>>  >> > final Cursor cursor =
>>>  >> simpleCursorAdapter.getCursor();
>>>  >> >
>>>  >> > final int idColIndex =
>>>  cursor.getColumnIndex("_id");
>>>  >> >
>>>  >> > Save the value in a variable  and use bundles
>>>  >> >
>>>  >> >
>>>  >> > Bundle bundle = new Bundle();
>>>  >> > bundle.putString("any name",Id);
>>>  >> >
>>>  >> > Intent intent = new Intent(first
>>>  >> > activity.this,
>>>  >> > second activity.class);
>>>  >> > intent.putExtras(bundle);
>>>  >> > startActivity(intent);
>>>  >> >
>>>  >> > On Mon, Sep 19, 2011 at 10:27 AM, Bishan 
>>>  >> > wrote:
>>>  >> >
>>>  >> >> I have wrote a program to get students names from database and
>>>  display
>>>  >> >> them, using ListActivity. and used OnItemClickListener to
>>> click
>>>  >> >> on
>>>  >> >> each items.
>>>  >> >>
>>>  >> >> now i want to do, when i click on a student name, display
>>> other
>>>  >> >> information of student (age, sex, address) on another screen.
>>>  >> >>
>>>  >> >> how could i do this?
>>>  >> >>
>>>  >> >>  pls guide me.
>>>  >> >>
>>>  >> >> --
>>>  >> >> 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
>>>  >> >
>>>  >> > --
>>>  >> > 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
>>>  >>
>>>  >> --
>>>  >> 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
>>>  >>
>>>  >
>>>  > --
>>>  > You received this mess

Re: [android-developers] Get Data from Database of selected Item

2011-09-19 Thread Bishan
Got  java.lang.ClassCastException: java.lang.String in line 78

(code in line 78 is cursor = (Cursor) parent.getItemAtPosition(position);)

what is the issue ?
file attached.

On Mon, Sep 19, 2011 at 11:42 AM, Krishna Prasad <
krishnaprasadrs.1...@gmail.com> wrote:

> did u get your values from db correctly?
>
>
> On Mon, Sep 19, 2011 at 11:21 AM, Bishan  wrote:
>
>> i got this exception,
>>
>> java.lang.ClassCastException: android.widget.ArrayAdapter
>>
>> for below code.
>>
>> SimpleCursorAdapter simpleCursorAdapter = (SimpleCursorAdapter)
>> parent.getAdapter();
>>
>> On 9/19/11, Bishan  wrote:
>> > thanx Krishna. i'll check this.
>> >
>> > On 9/19/11, Krishna Prasad  wrote:
>> >> final int id = cursor.getint(idColIndex );
>> >>
>> >> just check the value using logcat whether it is getting or not
>> >>
>> >> On Mon, Sep 19, 2011 at 10:57 AM, Krishna Prasad <
>> >> krishnaprasadrs.1...@gmail.com> wrote:
>> >>
>> >>> id means the String variable where u save the cursor.colum value.
>> >>>
>> >>>
>> >>> On Mon, Sep 19, 2011 at 10:53 AM, Bishan  wrote:
>> >>>
>>  bundle.putString("any name",Id);
>> 
>>  what is the " Id " in above code ?
>> 
>>  On 9/19/11, Krishna Prasad  wrote:
>>  > welcome..
>>  >
>>  > On Mon, Sep 19, 2011 at 10:33 AM, Bishan 
>> wrote:
>>  >
>>  >> thanx Krishna :)
>>  >>
>>  >> On 9/19/11, Krishna Prasad 
>> wrote:
>>  >> > @Override
>>  >> > public void onItemClick(AdapterView parent, View
>>  >> > arg1,
>>  >> > int
>>  >> i,
>>  >> > long l) {
>>  >> > try {
>>  >> >
>>  >> > SimpleCursorAdapter simpleCursorAdapter =
>>  >> > (SimpleCursorAdapter) parent
>>  >> > .getAdapter();
>>  >> > final Cursor cursor =
>>  >> simpleCursorAdapter.getCursor();
>>  >> >
>>  >> > final int idColIndex =
>>  cursor.getColumnIndex("_id");
>>  >> >
>>  >> > Save the value in a variable  and use bundles
>>  >> >
>>  >> >
>>  >> > Bundle bundle = new Bundle();
>>  >> > bundle.putString("any name",Id);
>>  >> >
>>  >> > Intent intent = new Intent(first
>>  >> > activity.this,
>>  >> > second activity.class);
>>  >> > intent.putExtras(bundle);
>>  >> > startActivity(intent);
>>  >> >
>>  >> > On Mon, Sep 19, 2011 at 10:27 AM, Bishan 
>>  >> > wrote:
>>  >> >
>>  >> >> I have wrote a program to get students names from database and
>>  display
>>  >> >> them, using ListActivity. and used OnItemClickListener to click
>>  >> >> on
>>  >> >> each items.
>>  >> >>
>>  >> >> now i want to do, when i click on a student name, display other
>>  >> >> information of student (age, sex, address) on another screen.
>>  >> >>
>>  >> >> how could i do this?
>>  >> >>
>>  >> >>  pls guide me.
>>  >> >>
>>  >> >> --
>>  >> >> 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
>>  >> >
>>  >> > --
>>  >> > 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
>>  >>
>>  >> --
>>  >> 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
>>  >>
>>  >
>>  > --
>>  > 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

Re: [android-developers] Get Data from Database of selected Item

2011-09-18 Thread Krishna Prasad
did u get your values from db correctly?

On Mon, Sep 19, 2011 at 11:21 AM, Bishan  wrote:

> i got this exception,
>
> java.lang.ClassCastException: android.widget.ArrayAdapter
>
> for below code.
>
> SimpleCursorAdapter simpleCursorAdapter = (SimpleCursorAdapter)
> parent.getAdapter();
>
> On 9/19/11, Bishan  wrote:
> > thanx Krishna. i'll check this.
> >
> > On 9/19/11, Krishna Prasad  wrote:
> >> final int id = cursor.getint(idColIndex );
> >>
> >> just check the value using logcat whether it is getting or not
> >>
> >> On Mon, Sep 19, 2011 at 10:57 AM, Krishna Prasad <
> >> krishnaprasadrs.1...@gmail.com> wrote:
> >>
> >>> id means the String variable where u save the cursor.colum value.
> >>>
> >>>
> >>> On Mon, Sep 19, 2011 at 10:53 AM, Bishan  wrote:
> >>>
>  bundle.putString("any name",Id);
> 
>  what is the " Id " in above code ?
> 
>  On 9/19/11, Krishna Prasad  wrote:
>  > welcome..
>  >
>  > On Mon, Sep 19, 2011 at 10:33 AM, Bishan 
> wrote:
>  >
>  >> thanx Krishna :)
>  >>
>  >> On 9/19/11, Krishna Prasad  wrote:
>  >> > @Override
>  >> > public void onItemClick(AdapterView parent, View
>  >> > arg1,
>  >> > int
>  >> i,
>  >> > long l) {
>  >> > try {
>  >> >
>  >> > SimpleCursorAdapter simpleCursorAdapter =
>  >> > (SimpleCursorAdapter) parent
>  >> > .getAdapter();
>  >> > final Cursor cursor =
>  >> simpleCursorAdapter.getCursor();
>  >> >
>  >> > final int idColIndex =
>  cursor.getColumnIndex("_id");
>  >> >
>  >> > Save the value in a variable  and use bundles
>  >> >
>  >> >
>  >> > Bundle bundle = new Bundle();
>  >> > bundle.putString("any name",Id);
>  >> >
>  >> > Intent intent = new Intent(first
>  >> > activity.this,
>  >> > second activity.class);
>  >> > intent.putExtras(bundle);
>  >> > startActivity(intent);
>  >> >
>  >> > On Mon, Sep 19, 2011 at 10:27 AM, Bishan 
>  >> > wrote:
>  >> >
>  >> >> I have wrote a program to get students names from database and
>  display
>  >> >> them, using ListActivity. and used OnItemClickListener to click
>  >> >> on
>  >> >> each items.
>  >> >>
>  >> >> now i want to do, when i click on a student name, display other
>  >> >> information of student (age, sex, address) on another screen.
>  >> >>
>  >> >> how could i do this?
>  >> >>
>  >> >>  pls guide me.
>  >> >>
>  >> >> --
>  >> >> 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
>  >> >
>  >> > --
>  >> > 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
>  >>
>  >> --
>  >> 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
>  >>
>  >
>  > --
>  > 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
> 
>  --
>  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
>  Fo

Re: [android-developers] Get Data from Database of selected Item

2011-09-18 Thread Bishan
i got this exception,

java.lang.ClassCastException: android.widget.ArrayAdapter

for below code.

SimpleCursorAdapter simpleCursorAdapter = (SimpleCursorAdapter)
parent.getAdapter();

On 9/19/11, Bishan  wrote:
> thanx Krishna. i'll check this.
>
> On 9/19/11, Krishna Prasad  wrote:
>> final int id = cursor.getint(idColIndex );
>>
>> just check the value using logcat whether it is getting or not
>>
>> On Mon, Sep 19, 2011 at 10:57 AM, Krishna Prasad <
>> krishnaprasadrs.1...@gmail.com> wrote:
>>
>>> id means the String variable where u save the cursor.colum value.
>>>
>>>
>>> On Mon, Sep 19, 2011 at 10:53 AM, Bishan  wrote:
>>>
 bundle.putString("any name",Id);

 what is the " Id " in above code ?

 On 9/19/11, Krishna Prasad  wrote:
 > welcome..
 >
 > On Mon, Sep 19, 2011 at 10:33 AM, Bishan  wrote:
 >
 >> thanx Krishna :)
 >>
 >> On 9/19/11, Krishna Prasad  wrote:
 >> > @Override
 >> > public void onItemClick(AdapterView parent, View
 >> > arg1,
 >> > int
 >> i,
 >> > long l) {
 >> > try {
 >> >
 >> > SimpleCursorAdapter simpleCursorAdapter =
 >> > (SimpleCursorAdapter) parent
 >> > .getAdapter();
 >> > final Cursor cursor =
 >> simpleCursorAdapter.getCursor();
 >> >
 >> > final int idColIndex =
 cursor.getColumnIndex("_id");
 >> >
 >> > Save the value in a variable  and use bundles
 >> >
 >> >
 >> > Bundle bundle = new Bundle();
 >> > bundle.putString("any name",Id);
 >> >
 >> > Intent intent = new Intent(first
 >> > activity.this,
 >> > second activity.class);
 >> > intent.putExtras(bundle);
 >> > startActivity(intent);
 >> >
 >> > On Mon, Sep 19, 2011 at 10:27 AM, Bishan 
 >> > wrote:
 >> >
 >> >> I have wrote a program to get students names from database and
 display
 >> >> them, using ListActivity. and used OnItemClickListener to click
 >> >> on
 >> >> each items.
 >> >>
 >> >> now i want to do, when i click on a student name, display other
 >> >> information of student (age, sex, address) on another screen.
 >> >>
 >> >> how could i do this?
 >> >>
 >> >>  pls guide me.
 >> >>
 >> >> --
 >> >> 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
 >> >
 >> > --
 >> > 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
 >>
 >> --
 >> 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
 >>
 >
 > --
 > 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

 --
 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

>>>
>>>
>>
>> --
>> 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
>> a

Re: [android-developers] Get Data from Database of selected Item

2011-09-18 Thread Bishan
thanx Krishna. i'll check this.

On 9/19/11, Krishna Prasad  wrote:
> final int id = cursor.getint(idColIndex );
>
> just check the value using logcat whether it is getting or not
>
> On Mon, Sep 19, 2011 at 10:57 AM, Krishna Prasad <
> krishnaprasadrs.1...@gmail.com> wrote:
>
>> id means the String variable where u save the cursor.colum value.
>>
>>
>> On Mon, Sep 19, 2011 at 10:53 AM, Bishan  wrote:
>>
>>> bundle.putString("any name",Id);
>>>
>>> what is the " Id " in above code ?
>>>
>>> On 9/19/11, Krishna Prasad  wrote:
>>> > welcome..
>>> >
>>> > On Mon, Sep 19, 2011 at 10:33 AM, Bishan  wrote:
>>> >
>>> >> thanx Krishna :)
>>> >>
>>> >> On 9/19/11, Krishna Prasad  wrote:
>>> >> > @Override
>>> >> > public void onItemClick(AdapterView parent, View
>>> >> > arg1,
>>> >> > int
>>> >> i,
>>> >> > long l) {
>>> >> > try {
>>> >> >
>>> >> > SimpleCursorAdapter simpleCursorAdapter =
>>> >> > (SimpleCursorAdapter) parent
>>> >> > .getAdapter();
>>> >> > final Cursor cursor =
>>> >> simpleCursorAdapter.getCursor();
>>> >> >
>>> >> > final int idColIndex =
>>> cursor.getColumnIndex("_id");
>>> >> >
>>> >> > Save the value in a variable  and use bundles
>>> >> >
>>> >> >
>>> >> > Bundle bundle = new Bundle();
>>> >> > bundle.putString("any name",Id);
>>> >> >
>>> >> > Intent intent = new Intent(first activity.this,
>>> >> > second activity.class);
>>> >> > intent.putExtras(bundle);
>>> >> > startActivity(intent);
>>> >> >
>>> >> > On Mon, Sep 19, 2011 at 10:27 AM, Bishan  wrote:
>>> >> >
>>> >> >> I have wrote a program to get students names from database and
>>> display
>>> >> >> them, using ListActivity. and used OnItemClickListener to click on
>>> >> >> each items.
>>> >> >>
>>> >> >> now i want to do, when i click on a student name, display other
>>> >> >> information of student (age, sex, address) on another screen.
>>> >> >>
>>> >> >> how could i do this?
>>> >> >>
>>> >> >>  pls guide me.
>>> >> >>
>>> >> >> --
>>> >> >> 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
>>> >> >
>>> >> > --
>>> >> > 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
>>> >>
>>> >> --
>>> >> 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
>>> >>
>>> >
>>> > --
>>> > 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
>>>
>>> --
>>> 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
>>>
>>
>>
>
> --
> 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

-- 
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

Re: [android-developers] Get Data from Database of selected Item

2011-09-18 Thread Krishna Prasad
final int id = cursor.getint(idColIndex );

just check the value using logcat whether it is getting or not

On Mon, Sep 19, 2011 at 10:57 AM, Krishna Prasad <
krishnaprasadrs.1...@gmail.com> wrote:

> id means the String variable where u save the cursor.colum value.
>
>
> On Mon, Sep 19, 2011 at 10:53 AM, Bishan  wrote:
>
>> bundle.putString("any name",Id);
>>
>> what is the " Id " in above code ?
>>
>> On 9/19/11, Krishna Prasad  wrote:
>> > welcome..
>> >
>> > On Mon, Sep 19, 2011 at 10:33 AM, Bishan  wrote:
>> >
>> >> thanx Krishna :)
>> >>
>> >> On 9/19/11, Krishna Prasad  wrote:
>> >> > @Override
>> >> > public void onItemClick(AdapterView parent, View arg1,
>> >> > int
>> >> i,
>> >> > long l) {
>> >> > try {
>> >> >
>> >> > SimpleCursorAdapter simpleCursorAdapter =
>> >> > (SimpleCursorAdapter) parent
>> >> > .getAdapter();
>> >> > final Cursor cursor =
>> >> simpleCursorAdapter.getCursor();
>> >> >
>> >> > final int idColIndex =
>> cursor.getColumnIndex("_id");
>> >> >
>> >> > Save the value in a variable  and use bundles
>> >> >
>> >> >
>> >> > Bundle bundle = new Bundle();
>> >> > bundle.putString("any name",Id);
>> >> >
>> >> > Intent intent = new Intent(first activity.this,
>> >> > second activity.class);
>> >> > intent.putExtras(bundle);
>> >> > startActivity(intent);
>> >> >
>> >> > On Mon, Sep 19, 2011 at 10:27 AM, Bishan  wrote:
>> >> >
>> >> >> I have wrote a program to get students names from database and
>> display
>> >> >> them, using ListActivity. and used OnItemClickListener to click on
>> >> >> each items.
>> >> >>
>> >> >> now i want to do, when i click on a student name, display other
>> >> >> information of student (age, sex, address) on another screen.
>> >> >>
>> >> >> how could i do this?
>> >> >>
>> >> >>  pls guide me.
>> >> >>
>> >> >> --
>> >> >> 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
>> >> >
>> >> > --
>> >> > 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
>> >>
>> >> --
>> >> 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
>> >>
>> >
>> > --
>> > 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
>>
>> --
>> 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
>>
>
>

-- 
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

Re: [android-developers] Get Data from Database of selected Item

2011-09-18 Thread Krishna Prasad
id means the String variable where u save the cursor.colum value.

On Mon, Sep 19, 2011 at 10:53 AM, Bishan  wrote:

> bundle.putString("any name",Id);
>
> what is the " Id " in above code ?
>
> On 9/19/11, Krishna Prasad  wrote:
> > welcome..
> >
> > On Mon, Sep 19, 2011 at 10:33 AM, Bishan  wrote:
> >
> >> thanx Krishna :)
> >>
> >> On 9/19/11, Krishna Prasad  wrote:
> >> > @Override
> >> > public void onItemClick(AdapterView parent, View arg1,
> >> > int
> >> i,
> >> > long l) {
> >> > try {
> >> >
> >> > SimpleCursorAdapter simpleCursorAdapter =
> >> > (SimpleCursorAdapter) parent
> >> > .getAdapter();
> >> > final Cursor cursor =
> >> simpleCursorAdapter.getCursor();
> >> >
> >> > final int idColIndex =
> cursor.getColumnIndex("_id");
> >> >
> >> > Save the value in a variable  and use bundles
> >> >
> >> >
> >> > Bundle bundle = new Bundle();
> >> > bundle.putString("any name",Id);
> >> >
> >> > Intent intent = new Intent(first activity.this,
> >> > second activity.class);
> >> > intent.putExtras(bundle);
> >> > startActivity(intent);
> >> >
> >> > On Mon, Sep 19, 2011 at 10:27 AM, Bishan  wrote:
> >> >
> >> >> I have wrote a program to get students names from database and
> display
> >> >> them, using ListActivity. and used OnItemClickListener to click on
> >> >> each items.
> >> >>
> >> >> now i want to do, when i click on a student name, display other
> >> >> information of student (age, sex, address) on another screen.
> >> >>
> >> >> how could i do this?
> >> >>
> >> >>  pls guide me.
> >> >>
> >> >> --
> >> >> 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
> >> >
> >> > --
> >> > 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
> >>
> >> --
> >> 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
> >>
> >
> > --
> > 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
>
> --
> 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
>

-- 
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

Re: [android-developers] Get Data from Database of selected Item

2011-09-18 Thread Bishan
bundle.putString("any name",Id);

what is the " Id " in above code ?

On 9/19/11, Krishna Prasad  wrote:
> welcome..
>
> On Mon, Sep 19, 2011 at 10:33 AM, Bishan  wrote:
>
>> thanx Krishna :)
>>
>> On 9/19/11, Krishna Prasad  wrote:
>> > @Override
>> > public void onItemClick(AdapterView parent, View arg1,
>> > int
>> i,
>> > long l) {
>> > try {
>> >
>> > SimpleCursorAdapter simpleCursorAdapter =
>> > (SimpleCursorAdapter) parent
>> > .getAdapter();
>> > final Cursor cursor =
>> simpleCursorAdapter.getCursor();
>> >
>> > final int idColIndex = cursor.getColumnIndex("_id");
>> >
>> > Save the value in a variable  and use bundles
>> >
>> >
>> > Bundle bundle = new Bundle();
>> > bundle.putString("any name",Id);
>> >
>> > Intent intent = new Intent(first activity.this,
>> > second activity.class);
>> > intent.putExtras(bundle);
>> > startActivity(intent);
>> >
>> > On Mon, Sep 19, 2011 at 10:27 AM, Bishan  wrote:
>> >
>> >> I have wrote a program to get students names from database and display
>> >> them, using ListActivity. and used OnItemClickListener to click on
>> >> each items.
>> >>
>> >> now i want to do, when i click on a student name, display other
>> >> information of student (age, sex, address) on another screen.
>> >>
>> >> how could i do this?
>> >>
>> >>  pls guide me.
>> >>
>> >> --
>> >> 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
>> >
>> > --
>> > 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
>>
>> --
>> 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
>>
>
> --
> 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

-- 
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


Re: [android-developers] Get Data from Database of selected Item

2011-09-18 Thread Krishna Prasad
welcome..

On Mon, Sep 19, 2011 at 10:33 AM, Bishan  wrote:

> thanx Krishna :)
>
> On 9/19/11, Krishna Prasad  wrote:
> > @Override
> > public void onItemClick(AdapterView parent, View arg1, int
> i,
> > long l) {
> > try {
> >
> > SimpleCursorAdapter simpleCursorAdapter =
> > (SimpleCursorAdapter) parent
> > .getAdapter();
> > final Cursor cursor =
> simpleCursorAdapter.getCursor();
> >
> > final int idColIndex = cursor.getColumnIndex("_id");
> >
> > Save the value in a variable  and use bundles
> >
> >
> > Bundle bundle = new Bundle();
> > bundle.putString("any name",Id);
> >
> > Intent intent = new Intent(first activity.this,
> > second activity.class);
> > intent.putExtras(bundle);
> > startActivity(intent);
> >
> > On Mon, Sep 19, 2011 at 10:27 AM, Bishan  wrote:
> >
> >> I have wrote a program to get students names from database and display
> >> them, using ListActivity. and used OnItemClickListener to click on
> >> each items.
> >>
> >> now i want to do, when i click on a student name, display other
> >> information of student (age, sex, address) on another screen.
> >>
> >> how could i do this?
> >>
> >>  pls guide me.
> >>
> >> --
> >> 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
> >
> > --
> > 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
>
> --
> 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
>

-- 
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

Re: [android-developers] Get Data from Database of selected Item

2011-09-18 Thread Bishan
thanx Krishna :)

On 9/19/11, Krishna Prasad  wrote:
> @Override
> public void onItemClick(AdapterView parent, View arg1, int i,
> long l) {
> try {
>
> SimpleCursorAdapter simpleCursorAdapter =
> (SimpleCursorAdapter) parent
> .getAdapter();
> final Cursor cursor = simpleCursorAdapter.getCursor();
>
> final int idColIndex = cursor.getColumnIndex("_id");
>
> Save the value in a variable  and use bundles
>
>
> Bundle bundle = new Bundle();
> bundle.putString("any name",Id);
>
> Intent intent = new Intent(first activity.this,
> second activity.class);
> intent.putExtras(bundle);
> startActivity(intent);
>
> On Mon, Sep 19, 2011 at 10:27 AM, Bishan  wrote:
>
>> I have wrote a program to get students names from database and display
>> them, using ListActivity. and used OnItemClickListener to click on
>> each items.
>>
>> now i want to do, when i click on a student name, display other
>> information of student (age, sex, address) on another screen.
>>
>> how could i do this?
>>
>>  pls guide me.
>>
>> --
>> 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
>
> --
> 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

-- 
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


Re: [android-developers] Get Data from Database of selected Item

2011-09-18 Thread Krishna Prasad
i think ,you got it..

On Mon, Sep 19, 2011 at 10:32 AM, Krishna Prasad <
krishnaprasadrs.1...@gmail.com> wrote:

>
> @Override
> public void onItemClick(AdapterView parent, View arg1, int
> i,
> long l) {
> try {
>
> SimpleCursorAdapter simpleCursorAdapter =
> (SimpleCursorAdapter) parent
> .getAdapter();
> final Cursor cursor = simpleCursorAdapter.getCursor();
>
> final int idColIndex = cursor.getColumnIndex("_id");
>
> Save the value in a variable  and use bundles
>
>
> Bundle bundle = new Bundle();
> bundle.putString("any name",Id);
>
> Intent intent = new Intent(first activity.this,
> second activity.class);
> intent.putExtras(bundle);
> startActivity(intent);
>
>
> On Mon, Sep 19, 2011 at 10:27 AM, Bishan  wrote:
>
>> I have wrote a program to get students names from database and display
>> them, using ListActivity. and used OnItemClickListener to click on
>> each items.
>>
>> now i want to do, when i click on a student name, display other
>> information of student (age, sex, address) on another screen.
>>
>> how could i do this?
>>
>>  pls guide me.
>>
>> --
>> 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
>
>
>

-- 
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

Re: [android-developers] Get Data from Database of selected Item

2011-09-18 Thread Krishna Prasad
@Override
public void onItemClick(AdapterView parent, View arg1, int i,
long l) {
try {

SimpleCursorAdapter simpleCursorAdapter =
(SimpleCursorAdapter) parent
.getAdapter();
final Cursor cursor = simpleCursorAdapter.getCursor();

final int idColIndex = cursor.getColumnIndex("_id");

Save the value in a variable  and use bundles


Bundle bundle = new Bundle();
bundle.putString("any name",Id);

Intent intent = new Intent(first activity.this,
second activity.class);
intent.putExtras(bundle);
startActivity(intent);

On Mon, Sep 19, 2011 at 10:27 AM, Bishan  wrote:

> I have wrote a program to get students names from database and display
> them, using ListActivity. and used OnItemClickListener to click on
> each items.
>
> now i want to do, when i click on a student name, display other
> information of student (age, sex, address) on another screen.
>
> how could i do this?
>
>  pls guide me.
>
> --
> 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

-- 
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