[android-developers] Re: the problem about click item in listview

2010-04-24 Thread Reiny Song
I should provide more detail about what I did,

my listview contains the MyAdapter( extends simpleAdapter )

I tried something (the followings are), but nothing helped me.

1. I set the listview setClickable,
setFocusableInTouchMode, setLongClickable  = true

2. set the convertView in getView at MyAdapter

setClickable, setFocusable ,setFocusableInTouchMode and setLongClickable
= true

But, when I "click" the item in listview, the item is still not selected.
(but... the item can be selected by scroll wheel...)


2010/4/25 Reiny 

> Dear all,
>
> I have a problem about the the listview.
>
> My activity runs in simulator, and I use mouse to control it.
>
> When I select the item in listview by turning scroll wheel, the
> background of item becomes orange.
>
> But, when I "click" the item in listview, the item does not response
> to my action.
>
> anyone knows the reason? thank you~

-- 
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] Re: the problem about click item in listview

2010-04-25 Thread Reiny Song
hello,

I try it, but there is no any response in listview.

When I clicked the item in listview by mouse,

the OnTouchListener, OnItemSelectedListener and OnTouchListener  of the
listview do not response to me.

But when I selected the item in listview by scroll wheel,

the OnItemSelectedListener showed the item was selected.

It confuses me a lots@@

2010/4/25 murali raju 

> did u try onItemClickListener
>
> On Sun, Apr 25, 2010 at 10:19 AM, Reiny Song  wrote:
>
>>
>> I should provide more detail about what I did,
>>
>> my listview contains the MyAdapter( extends simpleAdapter )
>>
>> I tried something (the followings are), but nothing helped me.
>>
>> 1. I set the listview setClickable,
>> setFocusableInTouchMode, setLongClickable  = true
>>
>> 2. set the convertView in getView at MyAdapter
>>
>> setClickable, setFocusable ,setFocusableInTouchMode and
>> setLongClickable = true
>>
>> But, when I "click" the item in listview, the item is still not selected.
>> (but... the item can be selected by scroll wheel...)
>>
>>
>> 2010/4/25 Reiny 
>>
>> Dear all,
>>>
>>> I have a problem about the the listview.
>>>
>>> My activity runs in simulator, and I use mouse to control it.
>>>
>>> When I select the item in listview by turning scroll wheel, the
>>> background of item becomes orange.
>>>
>>> But, when I "click" the item in listview, the item does not response
>>> to my action.
>>>
>>> anyone knows the reason? thank you~
>>
>>
>>  --
>> 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] Re: the problem about click item in listview

2010-04-25 Thread Reiny Song
sorry, I reply again, because of something lose.

hello,

I try it, but there is no any response in listview.

When I clicked the item in listview by mouse,

the OnTouchListener, OnItemSelectedListener,OnItemClickListener and
OnTouchListener  of the listview do not response to me.

But when I selected the item in listview by scroll wheel,

the OnItemSelectedListener showed the item was selected.

It confuses me a lots@@

2010/4/25 Reiny Song 

>
>
> 2010/4/25 murali raju 
>
> did u try onItemClickListener
>>
>> On Sun, Apr 25, 2010 at 10:19 AM, Reiny Song wrote:
>>
>>>
>>> I should provide more detail about what I did,
>>>
>>> my listview contains the MyAdapter( extends simpleAdapter )
>>>
>>> I tried something (the followings are), but nothing helped me.
>>>
>>> 1. I set the listview setClickable,
>>> setFocusableInTouchMode, setLongClickable  = true
>>>
>>> 2. set the convertView in getView at MyAdapter
>>>
>>> setClickable, setFocusable ,setFocusableInTouchMode and
>>> setLongClickable = true
>>>
>>> But, when I "click" the item in listview, the item is still not
>>> selected.
>>> (but... the item can be selected by scroll wheel...)
>>>
>>>
>>> 2010/4/25 Reiny 
>>>
>>> Dear all,
>>>>
>>>> I have a problem about the the listview.
>>>>
>>>> My activity runs in simulator, and I use mouse to control it.
>>>>
>>>> When I select the item in listview by turning scroll wheel, the
>>>> background of item becomes orange.
>>>>
>>>> But, when I "click" the item in listview, the item does not response
>>>> to my action.
>>>>
>>>> anyone knows the reason? thank you~
>>>
>>>
>>>  --
>>> 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] Re: the problem about click item in listview

2010-04-25 Thread Reiny Song
thank you~

But I do not know how to try your recommend.

the sample code are following:

ListView   layout_list = (ListView)inflate.inflate(R.layout.main_list,null);
MyAdapter adapter  = new MyAdapter(.)
layout_list.setAdapter(listAdapter);

I can not get the AdapterView from my listview,

could you please give me some direction.



2010/4/25 Paweł Zięba 

> Try methods from AdapterView instead of View:
>
> final AdapterView.OnItemClickListenergetOnItemClickListener()
> final AdapterView.OnItemLongClickListener
> getOnItemLongClickListener()
> final AdapterView.OnItemSelectedListener
> getOnItemSelectedListener()
>
>
>
> On 25 Kwi, 13:08, Reiny Song  wrote:
> > hello,
> >
> > I try it, but there is no any response in listview.
> >
> > When I clicked the item in listview by mouse,
> >
> > the OnTouchListener, OnItemSelectedListener and OnTouchListener  of the
> > listview do not response to me.
> >
> > But when I selected the item in listview by scroll wheel,
> >
> > the OnItemSelectedListener showed the item was selected.
> >
> > It confuses me a lots@@
> >
> > 2010/4/25 murali raju 
> >
> >
> >
> >
> >
> > > did u try onItemClickListener
> >
> > > On Sun, Apr 25, 2010 at 10:19 AM, Reiny Song 
> wrote:
> >
> > >> I should provide more detail about what I did,
> >
> > >> my listview contains the MyAdapter( extends simpleAdapter )
> >
> > >> I tried something (the followings are), but nothing helped me.
> >
> > >> 1. I set the listview setClickable,
> > >> setFocusableInTouchMode, setLongClickable  = true
> >
> > >> 2. set the convertView in getView at MyAdapter
> >
> > >> setClickable, setFocusable ,setFocusableInTouchMode and
> > >> setLongClickable = true
> >
> > >> But, when I "click" the item in listview, the item is still not
> selected.
> > >> (but... the item can be selected by scroll wheel...)
> >
> > >> 2010/4/25 Reiny 
> >
> > >> Dear all,
> >
> > >>> I have a problem about the the listview.
> >
> > >>> My activity runs in simulator, and I use mouse to control it.
> >
> > >>> When I select the item in listview by turning scroll wheel, the
> > >>> background of item becomes orange.
> >
> > >>> But, when I "click" the item in listview, the item does not response
> > >>> to my action.
> >
> > >>> anyone knows the reason? thank you~
> >
> > >>  --
> > >> 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 cr...@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 cr...@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 athttp://
> 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] Re: the problem about click item in listview

2010-04-26 Thread Reiny Song
Dear Jose,

Hello, thank you for your recommand

Actually, there are some controls in my adapter (one checkbox, one
imagebutton and three textviews ).

But, after turning checkbox and imagebutton focusability  off, I still can
not "select" the items by my mouse left click.

Dear Pawel,

thank you for your code,

after adding the code (onitemclicklistener) into my activity, the listview
does not have any response (no matter by mouse left click or by mouse scroll
wheel)

But, when I select item by mouse scroll wheel, the onitemselectedlistener
shows the item is selected.


However,

I still tried other ways,

when I put a onTouchListener in my getView method in adapter, the followings
are sample code,

public MyAdapter()
{
  //do something
}

public getView(int position, View convertView, ViewGroup parent )
{
   View returnView = super.getView(position,convertView,parent);
   returnView.set
   returnView.setOnTouchListener (new OnTouchListener(
{
 returnView.setSelected(true);
}
   ));
}

then...

after "click"(by mouse left click) the item in listview,  the item looks
like "the selected item"

but the color of the words in textview become greyish black, and the
item background color is still black.

It is different from the item are selected by mouse scroll wheel. (the item
background color become orange)

I still can not find the answer.

2010/4/26 Jose Gomez 

> By any chance does your list item adapter have a control in it that can be
> focused? If so that is your problem (checkbox, edit text, button) if any of
> these are in your listItem you have to turn their focusability off in order
> for the click and hold to register with the list.
>
> Sincerely
> Jose C Gomez
>
> http://www.josecgomez.com
>
>
>
> On Sun, Apr 25, 2010 at 7:44 AM, Paweł Zięba  wrote:
>
>> ListView is subclass of AdapterView.
>>
>> In your case try this code, paste it into onCreate method
>>
>> layout_list.setOnItemClickListener(new OnItemClickListener() {
>> @Override
>>public void onItemClick(AdapterView parent, View v, int
>> position, long id) {
>>Toast.makeText(MainView.this, "Id: " + id + ", pos: "
>> + position, Toast.LENGTH_SHORT).show();
>>}
>> });
>>
>> layout_list.setOnItemLongClickListener(new OnItemClickListener() {
>> @Override
>>public void onItemClick(AdapterView parent, View v, int
>> position, long id) {
>>    Toast.makeText(MainView.this, "Id: " + id + ", pos: "
>> + position, Toast.LENGTH_SHORT).show();
>>}
>> });
>>
>> where MainView is your activity
>>
>>
>>
>> On 25 Kwi, 13:49, Reiny Song  wrote:
>> > thank you~
>> >
>> > But I do not know how to try your recommend.
>> >
>> > the sample code are following:
>> >
>> > ListView   layout_list =
>> (ListView)inflate.inflate(R.layout.main_list,null);
>> > MyAdapter adapter  = new MyAdapter(.)
>> > layout_list.setAdapter(listAdapter);
>> >
>> > I can not get the AdapterView from my listview,
>> >
>> > could you please give me some direction.
>> >
>> > 2010/4/25 Paweł Zięba 
>> >
>> >
>> >
>> >
>> >
>> > > Try methods from AdapterView instead of View:
>> >
>> > > final AdapterView.OnItemClickListenergetOnItemClickListener()
>> > > final AdapterView.OnItemLongClickListener
>> > > getOnItemLongClickListener()
>> > > final AdapterView.OnItemSelectedListener
>> > > getOnItemSelectedListener()
>> >
>> > > On 25 Kwi, 13:08, Reiny Song  wrote:
>> > > > hello,
>> >
>> > > > I try it, but there is no any response in listview.
>> >
>> > > > When I clicked the item in listview by mouse,
>> >
>> > > > the OnTouchListener, OnItemSelectedListener and OnTouchListener  of
>> the
>> > > > listview do not response to me.
>> >
>> > > > But when I selected the item in listview by scroll wheel,
>> >
>> > > > the OnItemSelectedListener showed the item was selected.
>> >
>> > > > It confuses me a lots@@
>> >
>> > > > 2010/4/25 murali raju 
>> >
>> > > > > did u try onItemClickListener
>> >
>> > > > > On Sun, Apr 25, 2010 at 10:19 AM, Reiny Song <
>> reiny.s...@gmail.com>
>> > > wrote:
>> >
>> > > > >> I should provide more det

Re: [android-developers] Re: the problem about click item in listview

2010-04-28 Thread Reiny Song
well,

I think I find the solution~

when I use the Button instead of the ImageButton,

the items in ListView could be selected by "clicking".

But I still have no idea about the reason.


2010/4/26 Reiny Song 

> Dear Jose,
>
> Hello, thank you for your recommand
>
> Actually, there are some controls in my adapter (one checkbox, one
> imagebutton and three textviews ).
>
> But, after turning checkbox and imagebutton focusability  off, I still can
> not "select" the items by my mouse left click.
>
> Dear Pawel,
>
> thank you for your code,
>
> after adding the code (onitemclicklistener) into my activity, the listview
> does not have any response (no matter by mouse left click or by mouse scroll
> wheel)
>
> But, when I select item by mouse scroll wheel, the onitemselectedlistener
> shows the item is selected.
>
>
> However,
>
> I still tried other ways,
>
> when I put a onTouchListener in my getView method in adapter, the
> followings are sample code,
>
> public MyAdapter()
> {
>   //do something
> }
>
> public getView(int position, View convertView, ViewGroup parent )
> {
>View returnView = super.getView(position,convertView,parent);
>returnView.set
>returnView.setOnTouchListener (new OnTouchListener(
> {
>  returnView.setSelected(true);
> }
>));
> }
>
> then...
>
> after "click"(by mouse left click) the item in listview,  the item looks
> like "the selected item"
>
> but the color of the words in textview become greyish black, and the
> item background color is still black.
>
> It is different from the item are selected by mouse scroll wheel. (the item
> background color become orange)
>
> I still can not find the answer.
>
> 2010/4/26 Jose Gomez 
>
> By any chance does your list item adapter have a control in it that can be
>> focused? If so that is your problem (checkbox, edit text, button) if any of
>> these are in your listItem you have to turn their focusability off in order
>> for the click and hold to register with the list.
>>
>> Sincerely
>> Jose C Gomez
>>
>> http://www.josecgomez.com
>>
>>
>>
>> On Sun, Apr 25, 2010 at 7:44 AM, Paweł Zięba  wrote:
>>
>>> ListView is subclass of AdapterView.
>>>
>>> In your case try this code, paste it into onCreate method
>>>
>>> layout_list.setOnItemClickListener(new OnItemClickListener() {
>>> @Override
>>>public void onItemClick(AdapterView parent, View v, int
>>> position, long id) {
>>>Toast.makeText(MainView.this, "Id: " + id + ", pos: "
>>> + position, Toast.LENGTH_SHORT).show();
>>>    }
>>> });
>>>
>>> layout_list.setOnItemLongClickListener(new OnItemClickListener() {
>>> @Override
>>>public void onItemClick(AdapterView parent, View v, int
>>> position, long id) {
>>>Toast.makeText(MainView.this, "Id: " + id + ", pos: "
>>> + position, Toast.LENGTH_SHORT).show();
>>>}
>>> });
>>>
>>> where MainView is your activity
>>>
>>>
>>>
>>> On 25 Kwi, 13:49, Reiny Song  wrote:
>>> > thank you~
>>> >
>>> > But I do not know how to try your recommend.
>>> >
>>> > the sample code are following:
>>> >
>>> > ListView   layout_list =
>>> (ListView)inflate.inflate(R.layout.main_list,null);
>>> > MyAdapter adapter  = new MyAdapter(.)
>>> > layout_list.setAdapter(listAdapter);
>>> >
>>> > I can not get the AdapterView from my listview,
>>> >
>>> > could you please give me some direction.
>>> >
>>> > 2010/4/25 Paweł Zięba 
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > > Try methods from AdapterView instead of View:
>>> >
>>> > > final AdapterView.OnItemClickListenergetOnItemClickListener()
>>> > > final AdapterView.OnItemLongClickListener
>>> > > getOnItemLongClickListener()
>>> > > final AdapterView.OnItemSelectedListener
>>> > > getOnItemSelectedListener()
>>> >
>>> > > On 25 Kwi, 13:08, Reiny Song  wrote:
>>> > > > hello,
>>> >
>>> > > > I try it, but there is no any response in listview.
>>> >
>>> > > > When I cl

[android-developers] MapView does not work in HTC Hero

2010-04-30 Thread Reiny Song
Hello,

I have a MapView (in MapActivity), and it works in my simulator.

The google map and the overlay I made are showed in simulator screen

After installing in HTC Hero,

the overlay is showed in phone screen, but google map is not showed in phone
screen.

I have no idea about the reason.

could anyone answer me?

thank you

-- 
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] Re: MapView does not work in HTC Hero

2010-05-03 Thread Reiny Song
thank you for your reply,

I am sure that I exported the signed application.

I have checked the application with the jarsigner in command line (Windows
XP),

and the result is "jar verified"

I have no idea about my problem so far...



2010/5/1 javame_android 

> Hi,
>
> Did you signed your application?
>
> MapView won't even display in another simulator on other system if its
> not signed in the release mode.
>
> I am not sure but please make sure that it is signed and check whether
> it helps.
>
>
>
> Regards
> Sunil
>
> --
> 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] Re: MapView does not work in HTC Hero

2010-05-05 Thread Reiny Song
Dear Albion and Turchenko,

Thank you for your recommand,

and the mapview works well after changing the api-key.

Reiny


2010/5/4 Paul Turchenko 

> Make sure you use different mapApi keys for emulator and real device
> because it seems that you've obtained certificatie for debug keystore
> only.
>
> On May 1, 7:17 am, Reiny Song  wrote:
> > Hello,
> >
> > I have a MapView (in MapActivity), and it works in my simulator.
> >
> > The google map and the overlay I made are showed in simulator screen
> >
> > After installing in HTC Hero,
> >
> > the overlay is showed in phone screen, but google map is not showed in
> phone
> > screen.
> >
> > I have no idea about the reason.
> >
> > could anyone answer me?
> >
> > thank you
> >
> > --
> > 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 athttp://
> 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

[android-developers] the android calendar api question

2010-06-07 Thread Reiny Song
Dear all,

I want add events to user's calendar in my app,

and I search some information about how to manipulate the calendar.

I found that

Google has not provided the offical API to manipulate the calendar in the
android phone so far.

Dose anyone has the advice ? or

Someone who has developed the app with calendar function could give me some
suggestion?

thanks you for any response.

Reiny.

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