[android-developers] Re: Recording Audio

2009-01-11 Thread Lucius Fox
Thanks. how can I seutp the emulator to record audio? I am using Ubuntu as my development environment. How can I setup the emulator for that? Thank you. On Sun, Jan 11, 2009 at 2:23 PM, hmmm akul...@mail.ru wrote: To Record audio to a new file on sd card I did as follows and worked for me

[android-developers] How is android's AlertDialog layout define?

2009-03-22 Thread Lucius Fox
Hi, How is android's AlertDialog layout define? Is there a layout.xml file corresponding to the AlertDialog? I have looked at AlertDialog implementation, But i don't figure out how that is being layout (e.g. the location of the button, the location of text) Where are they defined? And how can I

[android-developers] Re: How is android's AlertDialog layout define?

2009-03-22 Thread Lucius Fox
android:name=.ActivityDialog1                  android:theme=@android:style/Theme.Dialog        /activity And you manage the Activity like any another Activity. sm1 On Mar 22, 2:56 am, Lucius Fox lucius.fo...@gmail.com wrote: Hi, How is android's AlertDialog layout define? Is there a layout.xml

[android-developers] Re: How is android's AlertDialog layout define?

2009-03-23 Thread Lucius Fox
best done as just a custom dialog. On Sat, Mar 21, 2009 at 11:56 PM, Lucius Fox lucius.fo...@gmail.com wrote: Hi, How is android's AlertDialog layout define? Is there a layout.xml file corresponding to the AlertDialog? I have looked at AlertDialog implementation, But i don't figure out how

[android-developers] Fling on ListView

2009-03-24 Thread Lucius Fox
Hi, Can you please tell me which method in ListView is handling the fling action (up and down)? I look at the source of ListView, I don't see a GestureDectector there. Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[android-developers] Re: Fling on ListView

2009-03-24 Thread Lucius Fox
, Romain Guy romain...@google.com wrote: ListView does not use a GestureDetector. On Tue, Mar 24, 2009 at 11:03 AM, Lucius Fox lucius.fo...@gmail.com wrote: Hi, Can you please tell me which method in ListView is handling the fling action (up and down)? I look at the source of ListView, I

[android-developers] Re: Fling on ListView

2009-03-24 Thread Lucius Fox
...@google.com wrote: What's a hort. fling? Horizontal? ListView does not need horizontal flings and therefore does not detect them nor does it notify of them. On Tue, Mar 24, 2009 at 3:37 PM, Lucius Fox lucius.fo...@gmail.com wrote: Thanks.  Is there a hook for application to get notified when users

[android-developers] How to troubleshoot a Stackoverflow error in android ViewRoot?

2009-04-04 Thread Lucius Fox
I am getting a StackOverflow error inside ViewRoot, I would appreciate some help in troubleshooting it? I don't understand why it causes a StackOverflow, since from the stack trace, it is not calling something recursive. And i don't understand why it report line 2155 as the line for the

[android-developers] Question about 'hasFocus' field in HierarchyViewer

2009-04-04 Thread Lucius Fox
When I look at all the views in HierarchyViewer, why there are multiple views's 'hasFocus' is true? I am under the assumption that only 1 view can have focus at a time. If so, why there are multiple view's hasFocus be true? Thank you. --~--~-~--~~~---~--~~ You

[android-developers] How onCreate/OnDestory method

2009-04-06 Thread Lucius Fox
Hi, Each activity has a onCreate/OnDestory method. And I think they are being invoked by frameworks/base/core/java/Instrumentation.java. My question is what it is process calling Instrumentation.callActivityOnDestory() and Instrumentation.callActivityOnStart()? Does that process has root

[android-developers] Re: How onCreate/OnDestory method

2009-04-06 Thread Lucius Fox
process. On Mon, Apr 6, 2009 at 5:53 PM, Lucius Fox lucius.fo...@gmail.com wrote: Hi, Each activity has a onCreate/OnDestory method. And I think they are being invoked by frameworks/base/core/java/Instrumentation.java. My question is what it is process calling

[android-developers] What is the purpose of android zygote process?

2009-04-07 Thread Lucius Fox
Hi, Can someone please help me understanding what is the android zygote process? From, it appears listen commands on a socket and spawn a thread for that? Is that true? if yes, what are examples of those commands? Under what situation that android zygote process will be used? Thank you.

[android-developers] abd shell ps output

2009-04-08 Thread Lucius Fox
Hi, I invoke 'adb shell' process, and did a ps. But in the ps output, I don't any process for 'shell' , can you please tell me why? # ps USER PID PPID VSIZE RSS WCHANPC NAME root 1 0 264 176 c008b8ac c36c S /init root 2 0 0 0 c004b138

[android-developers] How to get the source of the android 1.5 preview SDK?

2009-04-15 Thread Lucius Fox
Hi, How to get the source of the android 1.5 preview SDK? Should I get the trunk? or get the cupcake branch? Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this

[android-developers] Question about Android lifecycle

2009-04-16 Thread Lucius Fox
Hi, I read http://developer.android.com/guide/topics/fundamentals.html#lcycles which said The foreground lifetime of an activity happens between a call to onResume() until a corresponding call to onPause(). During this time, the activity is in front of all other activities on screen and is

[android-developers] ImageView 's layout_width and layout_height

2009-04-19 Thread Lucius Fox
Hi, I have created a ImageView BitmapDrawable bitmapDrawalbe = new BitmapDrawable(); ImageView imageView = new ImageView(this); imageView.setBackgroundDrawable(bitmapDrawalbe); where BitmapDrawable has an attribute of 'Bitmap' and its getWidth and getHeight are: public

[android-developers] java.lang.SecurityException: Permission Denial in inserting an entry to Database

2009-04-22 Thread Lucius Fox
Hi, I am getting the following SecurityException when I try to insert an entry to DB: Can you please tell me how can I fix my issue? /AndroidRuntime( 857): Caused by: java.lang.SecurityException: Permission Denial: writing com.mycompany.myapp uri

[android-developers] absolute_x and absolute_y property in Hierarchy Viewer

2009-04-22 Thread Lucius Fox
Hi, In Hierarchy Viewer, it has absolute_x and absolute_y property. Can you please tell me what are the corresponding value in the Java class? is it 'mScrollX' 'mScrollY' of teh android/view/View.java? If not, can you please tell me what is that. Thank you.

[android-developers] Re: ImageView 's layout_width and layout_height

2009-04-25 Thread Lucius Fox
On Sun, Apr 19, 2009 at 12:31 PM, Mark Murphy mmur...@commonsware.com wrote: Lucius Fox wrote: Do I need to set the height/width specifically for my ImageView to match my backgroundDrawable? Or it will pick up automatically. ImageView scales the image to fit the view size, not the other way

[android-developers] How to draw a rectangle on screen using layout.xml file

2009-04-25 Thread Lucius Fox
Hi, I am trying to draw a rectangle using layout.xml file without java code. So this is what I tried: LinearLayout color android:layout_width=wrap_content android:layout_height=10dp android:color=#00ff00 / /LinearLayout

[android-developers] How to set the width and height of an ImageView programmically?

2009-04-26 Thread Lucius Fox
Hi, Can you please tell me how can i set the width and height of an ImageView programmically in java code (not layout xml file)? I tried setMinimumWidth/setMinimumHeight, but that does not work. I have looked at the view in HierarchyView, it still said the width to be 80 and height to be 100.

[android-developers] How can to remote debug with android emulator

2009-02-02 Thread Lucius Fox
Hi, I am trying to follow the steps below (found in an earlier email thread from Anil Yadav (anily0...@gmail.com): Step 1: First launch emulator from command line (by typing Emulator command) Step 2: Then launch DDMS using command line (by typing DDMS command) Step 3: Start your application in

[android-developers] How to use findViewById() in a dialog

2009-02-04 Thread Lucius Fox
Hi, I create a dialog using this: Dialog d = new AlertDialog.Builder(MyActivity.this) .setPositiveButton(R.string.btn_yes, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { dummy();

[android-developers] Re: How to use findViewById() in a dialog

2009-02-05 Thread Lucius Fox
that appear on your button. Not the id ! findVienwById wants an id ! Emmanuelhttp://androidblogger.blogspot.com/ On Feb 5, 8:35 am, Lucius Fox lucius.fo...@gmail.com wrote: Hi, I create a dialog using this: Dialog d = new AlertDialog.Builder(MyActivity.this

[android-developers] Android Instrumentation for unit testing

2009-02-05 Thread Lucius Fox
Hi, I understand that Android has an Instrumentation for unit testing. In my android activity, I have a ListView and when user clicks on it, it pops up an dialog which 2 choices. And when user clicks one of the choices, it will pop up another form which allow users to enter move information and

[android-developers] Need help in writing unit test for parcelable object

2009-02-06 Thread Lucius Fox
Hi, I follow the following example in creating a Parcelable object: http://code.google.com/android/reference/android/os/Parcelable.html And I did the following to unit test the CREATOR and writeToParcel method: Parcel dummyParcel = Parcel.obtain(); MyParcelable p = new MyParceable(12345);

[android-developers] Re: Need help in writing unit test for parcelable object

2009-02-08 Thread Lucius Fox
James, Thank you. On Sun, Feb 8, 2009 at 5:09 AM, James jw.ma...@gmail.com wrote: OK. I found it faster than I thought or I would have waited to make that last reply. You have two options: 1.) put the parcelable in an intent, then get it back out. -- this would be instead of calling

[android-developers] how can I create a 'View' object from a xml file?

2009-03-09 Thread Lucius Fox
Hi, In the Tab2 of TabActivity in the APIDemo example, it has this method to create a View object for each tab: public View createTabContent(String tag) { final TextView tv = new TextView(this); tv.setText(Content for tab with tag + tag); return tv; } Can you please

[android-developers] How to layout elements programmically?

2009-03-09 Thread Lucius Fox
From http://d.android.com/guide/topics/ui/declaring-layout.html, it said Instantiate layout elements at runtime. Your application can create View and ViewGroup objects (and manipulate their properties) programmatically. Can you please tell me how/where I can find example for that? For example,

[android-developers] How to get a reference to a TabWidget in my java code

2009-03-09 Thread Lucius Fox
Hi, In my layout xml, I have: TabHost android:id=@+id/tabhost android:layout_width=fill_parent android:layout_height=fill_parent TabWidget android:id=@android:id/tabs android:layout_width=fill_parent android:layout_height=wrap_content/ /TabHost

[android-developers] android.graphics.Picture and ç

2009-04-27 Thread Lucius Fox
Hi, Can you please tell me how can I convert a android.graphics.Picture to a android.graphics.Picture? or how can i create a new Picture object which is a scaled version of the original Picture object? Thank you. --~--~-~--~~~---~--~~ You received this message

[android-developers] Activity onPause method

2009-04-28 Thread Lucius Fox
In my Activity onPause method, how can i find out if this activity is launched by another activity? (e.g. when user clicks menu of another activity to launch this activity?) Should i use the isTaskRoot() Return whether this activity is the root of a task. or isChild() Is this activity embedded

[android-developers] How to query the number of rows in a table

2009-05-04 Thread Lucius Fox
Hi, Can you please tell me how to query the number of rows in a table in Android? Assume I have the name of the table in string. Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group.

[android-developers] Re: How to query the number of rows in a table

2009-05-04 Thread Lucius Fox
(); } } but how can I get the actual result from the 'execSQL' ? Thank you. On Mon, May 4, 2009 at 9:51 AM, Lucius Fox lucius.fo...@gmail.com wrote: Hi, Can you please tell me how to query the number of rows in a table in Android? Assume I have the name of the table in string. Thank you

[android-developers] How can I listen for WebView page load completed event

2009-05-08 Thread Lucius Fox
Hi, Is it possible to listen for WebView page load completed event (the whole page is loaded including images, js files, css files and the page is completely rendered. Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[android-developers] Where is arm-none-linux-gnueabi-gdb equivalent on MacOS

2009-05-26 Thread Lucius Fox
Hi, I am trying to follow to debug native application on MacOS: http://honeypod.blogspot.com/2008/01/debug-native-application-for-android.html But can somone please tell me where is arm-none-linux-gnueabi-gdb equivalent on MacOS? And why do I need both 'arm-none-linux-gnueabi-gdb' and

[android-developers] Where does the location of the database

2009-05-28 Thread Lucius Fox
Hi, In my activity, I create a database using the following: db.execSQL(CREATE TABLE favorites ( +_id INTEGER PRIMARY KEY)' ); But can you please tell me where will android create the database file? I try 'adb shell' and then 'cd /data/data/com.mycompany.myactivity', but there is no

[android-developers] How can I get the source code of donut

2009-05-29 Thread Lucius Fox
Hi, Can you please tell me how can I get the source code of donut branch? 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] Re: How can I get the source code of donut

2009-05-29 Thread Lucius Fox
I was able to get the cupcake branch. I am not sure if there is a branch for donut branch? On Fri, May 29, 2009 at 3:07 PM, Romain Guy romain...@google.com wrote: Hi, Everything is explained at source.android.com On Fri, May 29, 2009 at 3:03 PM, Lucius Fox lucius.fo...@gmail.com wrote

[android-developers] Re: How can I listen for WebView page load completed event

2009-06-03 Thread Lucius Fox
On Wed, Jun 3, 2009 at 9:16 AM, Lucius Fox lucius.fo...@gmail.com wrote: On Fri, May 8, 2009 at 10:35 AM, Mark Murphy mmur...@commonsware.com wrote: Lucius Fox wrote: Hi, Is it possible to listen for WebView page load completed event (the whole page is loaded including images, js files

[android-developers] Re: How can I listen for WebView page load completed event

2009-06-03 Thread Lucius Fox
On Fri, May 8, 2009 at 10:35 AM, Mark Murphy mmur...@commonsware.com wrote: Lucius Fox wrote: Hi, Is it possible to listen for WebView page load completed event (the whole page is loaded including images, js files, css files and the page is completely rendered. Create a WebViewClient

[android-developers] How to add picture in Avatar in Contact on the emulator

2009-06-04 Thread Lucius Fox
Hi, I would like to know how can I add picture in Avatar in Contact on the emulator? When i click the 'avatar icon', it just pops up 'Select picture' and no media found. How can I load some dummy images to the emulator and I can select from that 'Select picture screen. Thank you.

[android-developers] How to query the photo of each contact in database

2009-06-06 Thread Lucius Fox
Hi, I am reading this http://developer.android.com/guide/topics/providers/content-providers.html to query the database for all the contacts. Specially, i do this to get the NAME and NUMBER of each contact. But how can I get the PHOTO of each contact? What is the COLUMN I should use? Thank you.

[android-developers] How can i build an URI for each person in the contact

2009-06-06 Thread Lucius Fox
Hi, How can i build a URI for each person of the contact so that i can use the following method in Contact.People public static Bitmap loadContactPhoto(Context context, Uri person, int placeholderImageResource, BitmapFactory.Options options) Thank you.

[android-developers] Need help in understanding ContactsListActivity callSelection() implementation

2009-06-11 Thread Lucius Fox
Hi, In code callSelection of ContactsListActivity, it calls ListView's getSelectedItem and casts the return to Cursor. boolean callSelection() { ListView list = getListView(); if (list.hasFocus()) { Cursor cursor = (Cursor) list.getSelectedItem(); // omitted

[android-developers] Email App and IM App on cupcake branch

2009-06-13 Thread Lucius Fox
Hi, I download and compile cupcake branch. But the Email App and IM App (not Gmail and GTalk) is not installed on the emulator. Can you please tell me how to install Email App and IM app? Thank you. --~--~-~--~~~---~--~~ You received this message because you are

[android-developers] Missing application icon in All Application drawer

2009-06-13 Thread Lucius Fox
Hi, Can someone please help me understanding why in my emulator, i can * in my settings- manage application, see an entry for an application there * but i cant' find the icon for launching that in All Application. Can you please tell me how can I make my application launches on the emulator?

[android-developers] Re: Missing application icon in All Application drawer

2009-06-14 Thread Lucius Fox
On Sat, Jun 13, 2009 at 2:23 PM, Mark Murphymmur...@commonsware.com wrote: Lucius Fox wrote: Can someone please help me understanding why in my emulator, i can * in my settings- manage application, see an entry for an application there * but i cant' find the icon for launching that in All

[android-developers] How to launch a 'selection dialog' on Android

2009-06-15 Thread Lucius Fox
Hi, When I click the home screen, android pops up a 'selection dialog' (i am not sure what is the technical term) to ask me to add 'Widget', 'Shortcut', 'Folder', etc. etc. Can you please tell me how to pop up those kind of selection dialog? Where can I find example for that? Thank you.