[android-developers] Re: How can I use different row view for selected or unselected list item?

2010-10-07 Thread Xiongzh
ou calling the super.getView??? > > http://android.amberfog.com/?p=296you will find an example towards the end > of this page. > > > > On Thu, Oct 7, 2010 at 1:36 PM, Xiongzh wrote: > > My intent was to use different view defined in xml when an item is > > clicked. > >

[android-developers] How can I use different row view for selected or unselected list item?

2010-10-07 Thread Xiongzh
My intent was to use different view defined in xml when an item is clicked. I overwritten getView method in my child class of SimpleCursorAdapter: @Override public View getView(int position, View convertView, ViewGroup parent) { if (position == mSelectedItemPos) {

[android-developers] Re: How to warn user when back button is pressed to navigate out of my application?

2010-04-27 Thread Xiongzh
> > > > On Tue, Apr 27, 2010 at 12:45 AM, Xiongzh wrote: > > But it's totally transparent to the customer, isn't it? > > The activity should be in the very top of the Android stacks. So it > > would be bring up again quickly. > > > On Apr 27

[android-developers] Re: How to warn user when back button is pressed to navigate out of my application?

2010-04-27 Thread Xiongzh
But it's totally transparent to the customer, isn't it? The activity should be in the very top of the Android stacks. So it would be bring up again quickly. On Apr 27, 3:28 pm, patbenatar wrote: > > Restarting the Activity in onStop sounds incredibly intrusive for your > user experience. > > -Nic

[android-developers] Re: How to warn user when back button is pressed to navigate out of my application?

2010-04-27 Thread Xiongzh
a misunderstanding of your message. > > -Nick > > On Apr 27, 12:22 am, Xiongzh wrote: > > > > > Some of my customers are accustomed to use the back button to go back > > to the previous activity. Some complained that they often navigate out > > of the ap

[android-developers] Re: How to warn user when back button is pressed to navigate out of my application?

2010-04-27 Thread Xiongzh
Some of my customers are accustomed to use the back button to go back to the previous activity. Some complained that they often navigate out of the application by pressing back button. I think it would be nice to customers if they can be warned. Thanks for your suggestion. How do think the approa

[android-developers] How to warn user when back button is pressed to navigate out of my application?

2010-04-26 Thread Xiongzh
I can find some posts on how to warn user when the back button is pressed to 'quit' the application. http://groups.google.com/group/android-developers/browse_thread/thread/496500abe014f324/7bf02ce27368b9e6?lnk=gst&q=back+button+prevent#7bf02ce27368b9e6 http://groups.google.com/group/android-devel

[android-developers] Re: Issue: Manual switching of APN’s when more than one APN Present

2010-03-31 Thread Xiongzh
I'm also interested in this question. Could anybody help to clarify it? On Feb 17, 6:01 pm, vishnu vardhan reddy madduri wrote: > My provider requires twoAPN'sto be configured manually. One for > email (SMTP/POP traffic) and another for browsing (HTTP traffic). > > My issue is when I have chosen

[android-developers] Re: How ratio of dp-to-pixel change with the screen density?

2009-03-01 Thread Xiongzh
ake your application run > on future Android devices that may or may not have the same pixel > density as the G1. > > > > On Sat, Feb 28, 2009 at 8:06 PM, Xiongzh wrote: > > > I'm being confused by the 'screen density' concept in Android. > > I knwe th

[android-developers] How ratio of dp-to-pixel change with the screen density?

2009-02-28 Thread Xiongzh
I'm being confused by the 'screen density' concept in Android. I knwe that dpi (dot per inch) came from the printing device. 160 dpi means 160 dots in every inch on the paper. However, when dpi is used for the screen density, for example, what's mentioned '160 dpi screen' in Android document, what

[android-developers] Re: Sliding text

2009-01-06 Thread Xiongzh
android.widget.Scroller is a better choice to make the text sliding I've just tried a scrolling TextView. It worked well with only small defects. Source codes are in my blog: http://bear-polka.blogspot.com/2009/01/scrolltextview-scrolling-textview-for.html On Nov 13 2008, 3:48 am, Mark Murphy w

[android-developers] Re: the text font size in pixel != the actual pixels each character occupies?

2009-01-06 Thread Xiongzh
I've shared my ScrollTextView at http://bear-polka.blogspot.com/2009/01/scrolltextview-scrolling-textview-for.html Comments are welcomed On Jan 6, 8:36 pm, Xiongzh wrote: > The TextPaint worked well to measure the text length in pixel. > I've implemented my ScrollTextV

[android-developers] Re: the text font size in pixel != the actual pixels each character occupies?

2009-01-06 Thread Xiongzh
1月6日, 下午3时11分, "心蓝" wrote: > U can use TextPaint class ,and the method in this class is measureText, then > get one char width! > Any question u can post topic inhttp://androidos.cc/bbs, > 2009/1/6 Xiongzh > > > > > > > Hi all, > > > I'll lik

[android-developers] the text font size in pixel != the actual pixels each character occupies?

2009-01-05 Thread Xiongzh
Hi all, I'll like to know how to calculate the actual pixels a text occupies in the screen from its font size. Say, my font size of the text in TextView is 20.5px. It doesn't mean that every character of the text occupies 20.5px in the screen, does it? I'm inheriting android.widget.TextView to

[android-developers] Re: How to quickly update the package without restarting the simulator?

2008-12-30 Thread Xiongzh
Hope in the next version of Android SDK, developer need not to package and reinstall the apk while debugging ... On 12月31日, 上午7时15分, Xiongzh wrote: > Yes, do not need to restart the simulator. Just re-run the application > within Eclipse. The plugin is wise enough to reuse the simulat

[android-developers] Re: How to quickly update the package without restarting the simulator?

2008-12-30 Thread Xiongzh
boot sequence. > > On Tue, Dec 30, 2008 at 6:35 AM, Xiongzh wrote: > > > hi friends, > > > I'm tired of restarting the simulator again and again for just small > > changes in the source codes. > > In my VISTA/3G/Intel Duo laptop, it would take minitu

[android-developers] How to quickly update the package without restarting the simulator?

2008-12-30 Thread Xiongzh
hi friends, I'm tired of restarting the simulator again and again for just small changes in the source codes. In my VISTA/3G/Intel Duo laptop, it would take minitues. Is it possible to uninstall and re-install the package without closing the simulator and restarting it? My way is to use adb uni

[android-developers] How to power off the emulator

2008-12-13 Thread Xiongzh
Hi friends, A small issue in my emulator in Vista: Either I pressed the red phone button for long time or pressed the power off button in the up-left side, the emulator was in 'Shutting down ...' status for long time. How can it be powered off as the real device? Is it OK to just close the wind

[android-developers] Re: java.util.Timer NOT make sense in Activity?

2008-12-09 Thread Xiongzh
RunOnUiThread had been removed since Android SDK m5, so I gave up reimplementing my 'hello world' by it. http://code.google.com/android/migrating/m5-0.9/changes-overview.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

[android-developers] Re: java.util.Timer NOT make sense in Activity?

2008-12-09 Thread Xiongzh
My reimplementation using view.postDelay(Runnable action, long milliseconds); package com.example.android.helloactivity; import android.app.Activity; import android.os.Bundle; import android.widget.EditText; /** * A minimal "Hello, World!" application. */ public class HelloActivity extends Ac

[android-developers] Re: java.util.Timer NOT make sense in Activity?

2008-12-09 Thread Xiongzh
{ super.onCreate(savedInstanceState); // Set the layout for this activity. You can find it // in res/layout/hello_activity.xml setContentView(R.layout.hello_activity); } } On Dec 10, 7:40 am, Mark Murphy <[EMAIL PROTECTED]> wrote: > Xiongzh wrote: > >

[android-developers] java.util.Timer NOT make sense in Activity?

2008-12-09 Thread Xiongzh
Hi, I was going to update the 'hello world' message in a edit text box by java.util.Timer. But it did not work as in a simple Java application. Maybe the way in Android is to put the timer in a service. But I'll like to know the reason: why does java.util.Timer not make sense in Activity? Thank