[android-developers] Better way to debug when there is jar dependancies?

2009-04-16 Thread Bin Chen
My application app depends on jar_a, which depends on jar_b. Now I want to debug jar_b by changing it's code. Both the jar_a and jar_b is built by ant tool. So my process is: 1) change jar_b 2) build jar_b 3) copy jar_b to the lib/ directory of jar_a 4) build jar_a 5) delete the reference to jar_

[android-developers] Re: Can't use the findViewById() in an second view

2009-04-15 Thread Bin Chen
Finally I resolved this problem by invoking the flattened view's findViewById(), hope this can be helpful for others. On Apr 15, 5:20 pm, Bin Chen wrote: > It's weird, if I change the code into: > >                                                         new > DialogInt

[android-developers] Re: Can't use the findViewById() in an second view

2009-04-15 Thread Bin Chen
.main); } Then the button in the main view has no effect at all, is it a bug? Or the way I do is wrong? On Apr 15, 5:16 pm, Bin Chen wrote: > Sovled by adding a setContentView()... > > On Apr 15, 5:10 pm, Bin Chen wrote: > > > I have a main.xml as th

[android-developers] Re: Can't use the findViewById() in an second view

2009-04-15 Thread Bin Chen
Sovled by adding a setContentView()... On Apr 15, 5:10 pm, Bin Chen wrote: > I have a main.xml as the main view and another > alert_dialog_text_entry.xml for one dialog when a button is clicked in > the main.xml view. In the click handler of the button, the findViewById > () can

[android-developers] Can't use the findViewById() in an second view

2009-04-15 Thread Bin Chen
I have a main.xml as the main view and another alert_dialog_text_entry.xml for one dialog when a button is clicked in the main.xml view. In the click handler of the button, the findViewById () can't work, the returned vaule is null, the code is like this: protected Dialog onCreateDialog(i

[android-developers] What the difference of "this" pointer?

2009-04-14 Thread Bin Chen
I see some of the examples contain such code to refer to "this" pointer: mProgressDialog = new ProgressDialog(AlertDialogSamples.this); So this usage has some special meaning other than the standalone "this"? Thanks. Bin --~--~-~--~~~---~--~~ You received this me

[android-developers] Embed Contacts activity

2009-04-12 Thread Bin Chen
I seached this forum and someone said for the security reason, we can only embed the activity we own, but I am wondering how the phone app embeds the activity from contacts? Is there any tricks for that? Thanks. Bin --~--~-~--~~~---~--~~ You received this message b

[android-developers] Can I use UNIQUE in the query() parameter?

2009-04-12 Thread Bin Chen
My contacts contain a lot of duplicated records, I want to use the traditional SQL clause "UNIQUE" to get the unique records, is it doable thru the query() method call? Thanks. I tried with the selectionArgs argument but failed. Bin --~--~-~--~~~---~--~~ You receiv

[android-developers] How can the user event callback be invoked?

2009-04-02 Thread Bin Chen
See: public class CompassActivity extends Activity implements Renderer, SensorEventListener { The CompassActivity implements SensorEventListener and override the onSensorChanged() method. I am curious when the hardware accelerator is moving, how can the system invoke this callback? I mean how c

[android-developers] Some of the strange JAVA syntax - android specifics?

2009-04-01 Thread Bin Chen
I am a C programmer before, and I am looking into android source code right now, some JAVA syntax is confusing, I am not sure whether or not it's android related, see: @Override protected void onDraw(Canvas canvas) { synchronized (this) { if (mBitmap !=