[android-developers] Re: Could title bar of activity listen to click event?

2009-04-23 Thread Dianne Hackborn
Implement your own custom title bar.  You will need to make this taller than
the regular title bar anyway for a decent user experience (especially if you
want DOUBLE tap...), so just bit the bullet and do your own thing.

2009/4/22 UJ ujhu...@gmail.com


 Dear Dianne,

 Generally speaking, I agree your opinion.

 But, there are some speical cases, such as:

 If I want to implement double tap address bar on browser to enter
 web address as iPhone,
 I must let the address bar can listen the click event.
 Unfortunately the address bar seems be implemented by title bar so it
 can not meet this requirement.

 Can you give some tips for this achievement?

 Thank you very much.
 UJ


 On 4月21日, 上午10時20分, Dianne Hackborn hack...@android.com wrote:
  As I said, the title bar is short to save space on the screen, and with
 it
  right up against the status bar and being short like that it is just a
  really crummy hit target.  This isn't really worthwhile to do on a touch
  display, in my opinion.
 
  2009/4/20 milton min.hsiung.hu...@gmail.com
 
 
 
 
 
 
 
   Hi Joe, Dianne
 
   Appreciate all your suggestions.
 
   I had tried to put a textview and add an onclicklistener to it.
   It works fine, but I still think it's better that I could use the
   title bar.
   To trigger the action from menu is ok too, but user have to do two
   actions to achieve one result.
   menu-action-result
   If I could use title bar, than I could let user do what he/she want in
   one action.
   title bar - result
   No matter it's onclick or long press or something else.
   But it looks like current framework doesn't support such behaviors. :-
   (
 
   Regards
   Milton
 
   On Apr 21, 1:00 am, Dianne Hackborn hack...@android.com wrote:
You can put an on click listener on a text view (this is a basic
 feature
   of
view), but please don't go digging through the view hierarchy for the
   title
bar text view; this is an implementation detail of the window
   decorations.
 
If you want a special title bar, I would recommend just doing your
 own
custom title bar.  Alternatively, you can also supply your own custom
   view
for the title area, but I think there is padding above and below the
 view
   so
it would be even harder to hit.
 
2009/4/20 Joe LaPenna jlape...@gmail.com
 
 Miloh,
 
 For a simple solution, you could request the no titlebar window
 deature
   and
 place a textview at the top of your layout.
 
 I'm not sure off the top of my head if you can attach a
 onclicklistener
   to
 a text view thouhgh. Probably not in which case for usability
 testing
 putting a button there would help you realize if that feature is
 discoverable or perhaps if a classic menu button is more
 discoverable.
 
 On Apr 20, 2009 2:13 AM, milton min.hsiung.hu...@gmail.com
 wrote:
 
 Hi Dianne
 
 Thanks for your comment.
 But is there any possible way to hack current title bar to try it ?
 (Ignoring the title bar height issue)
 
 Thanks again.
 
 Regards
 Milton
 
 On 4月20日, 下午4時19分, Dianne Hackborn hack...@android.com wrote: 
 This
 probably isn't going to be t...
 
  On Sun, Apr 19, 2009 at 8:38 PM, milton 
 min.hsiung.hu...@gmail.com
 wrote:Hi allI w...
  hack...@android.com
 
   Note: please don't send private questions to me, as I don't
 have
   time
 to  provide private suppo...
  answer them.- 隱藏被引用文字 -
 
  - 顯示被引用文字 -
 
--
Dianne Hackborn
Android framework engineer
hack...@android.com
 
Note: please don't send private questions to me, as I don't have time
 to
provide private support, and so won't reply to such e-mails.  All
 such
questions should be posted on public forums, where I and others can
 see
   and
answer them.
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see
 and
  answer them.- 隱藏被引用文字 -
 
  - 顯示被引用文字 -
 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
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: Could title bar of activity listen to click event?

2009-04-22 Thread UJ

Dear Dianne,

Generally speaking, I agree your opinion.

But, there are some speical cases, such as:

If I want to implement double tap address bar on browser to enter
web address as iPhone,
I must let the address bar can listen the click event.
Unfortunately the address bar seems be implemented by title bar so it
can not meet this requirement.

Can you give some tips for this achievement?

Thank you very much.
UJ


On 4月21日, 上午10時20分, Dianne Hackborn hack...@android.com wrote:
 As I said, the title bar is short to save space on the screen, and with it
 right up against the status bar and being short like that it is just a
 really crummy hit target.  This isn't really worthwhile to do on a touch
 display, in my opinion.

 2009/4/20 milton min.hsiung.hu...@gmail.com







  Hi Joe, Dianne

  Appreciate all your suggestions.

  I had tried to put a textview and add an onclicklistener to it.
  It works fine, but I still think it's better that I could use the
  title bar.
  To trigger the action from menu is ok too, but user have to do two
  actions to achieve one result.
  menu-action-result
  If I could use title bar, than I could let user do what he/she want in
  one action.
  title bar - result
  No matter it's onclick or long press or something else.
  But it looks like current framework doesn't support such behaviors. :-
  (

  Regards
  Milton

  On Apr 21, 1:00 am, Dianne Hackborn hack...@android.com wrote:
   You can put an on click listener on a text view (this is a basic feature
  of
   view), but please don't go digging through the view hierarchy for the
  title
   bar text view; this is an implementation detail of the window
  decorations.

   If you want a special title bar, I would recommend just doing your own
   custom title bar.  Alternatively, you can also supply your own custom
  view
   for the title area, but I think there is padding above and below the view
  so
   it would be even harder to hit.

   2009/4/20 Joe LaPenna jlape...@gmail.com

Miloh,

For a simple solution, you could request the no titlebar window deature
  and
place a textview at the top of your layout.

I'm not sure off the top of my head if you can attach a onclicklistener
  to
a text view thouhgh. Probably not in which case for usability testing
putting a button there would help you realize if that feature is
discoverable or perhaps if a classic menu button is more discoverable.

On Apr 20, 2009 2:13 AM, milton min.hsiung.hu...@gmail.com wrote:

Hi Dianne

Thanks for your comment.
But is there any possible way to hack current title bar to try it ?
(Ignoring the title bar height issue)

Thanks again.

Regards
Milton

On 4月20日, 下午4時19分, Dianne Hackborn hack...@android.com wrote:  This
probably isn't going to be t...

 On Sun, Apr 19, 2009 at 8:38 PM, milton min.hsiung.hu...@gmail.com
wrote:Hi allI w...
 hack...@android.com

  Note: please don't send private questions to me, as I don't have
  time
to  provide private suppo...
 answer them.- 隱藏被引用文字 -

 - 顯示被引用文字 -

   --
   Dianne Hackborn
   Android framework engineer
   hack...@android.com

   Note: please don't send private questions to me, as I don't have time to
   provide private support, and so won't reply to such e-mails.  All such
   questions should be posted on public forums, where I and others can see
  and
   answer them.

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.- 隱藏被引用文字 -

 - 顯示被引用文字 -
--~--~-~--~~~---~--~~
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: Could title bar of activity listen to click event?

2009-04-20 Thread Dianne Hackborn
This probably isn't going to be too useful -- the title bar takes advantage
of not being touchable by making itself less tall.  Trying to touch that
title bar, with the active status bar already right above it, would be not
too easy.  So if you do want to have a touchable title bar, you probably
want yours to be taller than the normal title bar, so you might just want to
make your own custom title bar.

On Sun, Apr 19, 2009 at 8:38 PM, milton min.hsiung.hu...@gmail.com wrote:


 Hi all

 I would like to make my activity do something when user clicked the
 title bar.
 But I could not find any information about how to manipulate the title
 bar.
 Please kindly give me some advices.

 Thanks in advance.

 Regards
 Milton
 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
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: Could title bar of activity listen to click event?

2009-04-20 Thread milton

Hi Dianne

Thanks for your comment.
But is there any possible way to hack current title bar to try it ?
(Ignoring the title bar height issue)

Thanks again.

Regards
Milton

On 4月20日, 下午4時19分, Dianne Hackborn hack...@android.com wrote:
 This probably isn't going to be too useful -- the title bar takes advantage
 of not being touchable by making itself less tall.  Trying to touch that
 title bar, with the active status bar already right above it, would be not
 too easy.  So if you do want to have a touchable title bar, you probably
 want yours to be taller than the normal title bar, so you might just want to
 make your own custom title bar.





 On Sun, Apr 19, 2009 at 8:38 PM, milton min.hsiung.hu...@gmail.com wrote:

  Hi all

  I would like to make my activity do something when user clicked the
  title bar.
  But I could not find any information about how to manipulate the title
  bar.
  Please kindly give me some advices.

  Thanks in advance.

  Regards
  Milton

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.- 隱藏被引用文字 -

 - 顯示被引用文字 -
--~--~-~--~~~---~--~~
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: Could title bar of activity listen to click event?

2009-04-20 Thread Dianne Hackborn
You can put an on click listener on a text view (this is a basic feature of
view), but please don't go digging through the view hierarchy for the title
bar text view; this is an implementation detail of the window decorations.

If you want a special title bar, I would recommend just doing your own
custom title bar.  Alternatively, you can also supply your own custom view
for the title area, but I think there is padding above and below the view so
it would be even harder to hit.

2009/4/20 Joe LaPenna jlape...@gmail.com

 Miloh,

 For a simple solution, you could request the no titlebar window deature and
 place a textview at the top of your layout.

 I'm not sure off the top of my head if you can attach a onclicklistener to
 a text view thouhgh. Probably not in which case for usability testing
 putting a button there would help you realize if that feature is
 discoverable or perhaps if a classic menu button is more discoverable.

 On Apr 20, 2009 2:13 AM, milton min.hsiung.hu...@gmail.com wrote:


 Hi Dianne

 Thanks for your comment.
 But is there any possible way to hack current title bar to try it ?
 (Ignoring the title bar height issue)

 Thanks again.

 Regards
 Milton

 On 4月20日, 下午4時19分, Dianne Hackborn hack...@android.com wrote:  This
 probably isn't going to be t...

  On Sun, Apr 19, 2009 at 8:38 PM, milton min.hsiung.hu...@gmail.com
 wrote:Hi allI w...
  hack...@android.com

   Note: please don't send private questions to me, as I don't have time
 to  provide private suppo...
  answer them.- 隱藏被引用文字 -
 
  - 顯示被引用文字 -

 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
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: Could title bar of activity listen to click event?

2009-04-20 Thread milton

Hi Joe, Dianne

Appreciate all your suggestions.

I had tried to put a textview and add an onclicklistener to it.
It works fine, but I still think it's better that I could use the
title bar.
To trigger the action from menu is ok too, but user have to do two
actions to achieve one result.
menu-action-result
If I could use title bar, than I could let user do what he/she want in
one action.
title bar - result
No matter it's onclick or long press or something else.
But it looks like current framework doesn't support such behaviors. :-
(

Regards
Milton

On Apr 21, 1:00 am, Dianne Hackborn hack...@android.com wrote:
 You can put an on click listener on a text view (this is a basic feature of
 view), but please don't go digging through the view hierarchy for the title
 bar text view; this is an implementation detail of the window decorations.

 If you want a special title bar, I would recommend just doing your own
 custom title bar.  Alternatively, you can also supply your own custom view
 for the title area, but I think there is padding above and below the view so
 it would be even harder to hit.

 2009/4/20 Joe LaPenna jlape...@gmail.com



  Miloh,

  For a simple solution, you could request the no titlebar window deature and
  place a textview at the top of your layout.

  I'm not sure off the top of my head if you can attach a onclicklistener to
  a text view thouhgh. Probably not in which case for usability testing
  putting a button there would help you realize if that feature is
  discoverable or perhaps if a classic menu button is more discoverable.

  On Apr 20, 2009 2:13 AM, milton min.hsiung.hu...@gmail.com wrote:

  Hi Dianne

  Thanks for your comment.
  But is there any possible way to hack current title bar to try it ?
  (Ignoring the title bar height issue)

  Thanks again.

  Regards
  Milton

  On 4月20日, 下午4時19分, Dianne Hackborn hack...@android.com wrote:  This
  probably isn't going to be t...

   On Sun, Apr 19, 2009 at 8:38 PM, milton min.hsiung.hu...@gmail.com
  wrote:Hi allI w...
   hack...@android.com

Note: please don't send private questions to me, as I don't have time
  to  provide private suppo...
   answer them.- 隱藏被引用文字 -

   - 顯示被引用文字 -

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.
--~--~-~--~~~---~--~~
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: Could title bar of activity listen to click event?

2009-04-20 Thread Dianne Hackborn
As I said, the title bar is short to save space on the screen, and with it
right up against the status bar and being short like that it is just a
really crummy hit target.  This isn't really worthwhile to do on a touch
display, in my opinion.

2009/4/20 milton min.hsiung.hu...@gmail.com


 Hi Joe, Dianne

 Appreciate all your suggestions.

 I had tried to put a textview and add an onclicklistener to it.
 It works fine, but I still think it's better that I could use the
 title bar.
 To trigger the action from menu is ok too, but user have to do two
 actions to achieve one result.
 menu-action-result
 If I could use title bar, than I could let user do what he/she want in
 one action.
 title bar - result
 No matter it's onclick or long press or something else.
 But it looks like current framework doesn't support such behaviors. :-
 (

 Regards
 Milton

 On Apr 21, 1:00 am, Dianne Hackborn hack...@android.com wrote:
  You can put an on click listener on a text view (this is a basic feature
 of
  view), but please don't go digging through the view hierarchy for the
 title
  bar text view; this is an implementation detail of the window
 decorations.
 
  If you want a special title bar, I would recommend just doing your own
  custom title bar.  Alternatively, you can also supply your own custom
 view
  for the title area, but I think there is padding above and below the view
 so
  it would be even harder to hit.
 
  2009/4/20 Joe LaPenna jlape...@gmail.com
 
 
 
   Miloh,
 
   For a simple solution, you could request the no titlebar window deature
 and
   place a textview at the top of your layout.
 
   I'm not sure off the top of my head if you can attach a onclicklistener
 to
   a text view thouhgh. Probably not in which case for usability testing
   putting a button there would help you realize if that feature is
   discoverable or perhaps if a classic menu button is more discoverable.
 
   On Apr 20, 2009 2:13 AM, milton min.hsiung.hu...@gmail.com wrote:
 
   Hi Dianne
 
   Thanks for your comment.
   But is there any possible way to hack current title bar to try it ?
   (Ignoring the title bar height issue)
 
   Thanks again.
 
   Regards
   Milton
 
   On 4月20日, 下午4時19分, Dianne Hackborn hack...@android.com wrote:  This
   probably isn't going to be t...
 
On Sun, Apr 19, 2009 at 8:38 PM, milton min.hsiung.hu...@gmail.com
   wrote:Hi allI w...
hack...@android.com
 
 Note: please don't send private questions to me, as I don't have
 time
   to  provide private suppo...
answer them.- 隱藏被引用文字 -
 
- 顯示被引用文字 -
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see
 and
  answer them.
 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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