Hi,
I have the following code which queries 1 number of a contact. It works.
But how can I change it so that I can query multiple numbers (work,
mobile, home) for the same contact and the type of each number?
int phoneColumnIndex = cursor.getColumnIndex(People.NUMBER);
if
Hi,
Can you please tell me how can i launch the intent to pick image from SD card?
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
Hi,
I am trying to create a simple adapter for Gallery. And I call
setAdapter() of my Gallery.
The text is displayed on screen, but they are overlapping each other.
Do I need to set the size of the TextView that I create to make sure
it has enough space for the text it is holding? if yes, how
Hi,
I have read the Gallery2.java example, which show how to map a
Column's value to an elment in the view I want to create (in this
case, it maps 'NAME' to text1 element0.
But what if I have a Button in my view, how can I know which Person is
being clicked? or how can I query the person's info
Hi,
I have the following code to pick an image from sd card:
private void pickPhotoAction() {
Intent intent = new Intent(Intent.ACTION_GET_CONTENT, null);
intent.setType(image/*);
intent.putExtra(crop, true);
intent.putExtra(aspectX, 1);
Hi,
Can you please tell me how can I query all phone numbers of all
Contacts in the Database?
Where can I find some examples for that?
Thank you.
Regards,
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android
Can you please tell me where in android code which specify using
Launcher.apk when android starts? I have grep 'Launcher' in the code,
i can't find anywhere it specify android to use Launcher.apk.
On Fri, May 22, 2009 at 9:51 AM, Dianne Hackborn hack...@android.com wrote:
You need to give it a
Hi,
If I have a reference to a View, how can I clone it with all its
children and grandchildren (i.e. deep cloning)?
Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to
Hi,
I need to create a function which input is a reference is a view,
and the function basically creates a new View which overlay an image
on top of the input view?
What is the best way to achieve that?
I am thinking of create a new ViewGroup (as my output), add the input
view as a child to
the Cursor? The Caller of the query method?
or the ContentProvider (since it is the one creating the Cursor)
@Override
public Cursor query(Uri uri, String[] projection, String selection,
String[] selectionArgs, String sortOrder) {
On Wed, May 6, 2009 at 1:39 PM, Meryl
I am seeing the exception in 'adb logcat'. But I don't know if it is
caused by my application or android platform.
Can you please give me any idea how to troubleshoot this exception?
Thank you.
I/dalvikvm( 713): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 713):
Can you please tell me how does android determine when View should
enable the drawing cache?
I try calling in my class (which inherits form LinearLayout)
Bitmap drawingCache = getDrawingCache();
I get a null in my drawingCache.
Thank you.
On Thu, Apr 30, 2009 at 3:48 PM, Romain Guy
Hi,
My understanding of CellLayout.CellInfo is it is a data-structure
class which represents an item in CellLayout.
My question is why it needs to implements ContextMenu.ContextMenuInfo?
What is the relationship between ContextMenu and CellLayout?
Thank you.
Hi,
I am doing a similar thing. But I need to do that to a ViewGroup.
But what I find out is I see everything exception the background of my
ViewGroup.
Can you please tell me why? or if background drawable of ViewGroup is
painted differently?
Thank you.
On Fri, May 1, 2009 at 12:42 PM, dan
In the follow blog, it talks about Application Not Responding (ANR) dialog
http://developer.android.com/guide/practices/design/responsiveness.html
Can you please tell me where in the code which pop up this Application
Not Responding (ANR) dialog? Or how can I adjust the timer for this
dialog so
In the follow blog, it talks about Application Not Responding (ANR) dialog
http://developer.android.com/guide/practices/design/responsiveness.html
Can you please tell me where in the code which pop up this Application
Not Responding (ANR) dialog? Or how can I adjust the timer for this
dialog so
Hi,
I call ContentResolver's query method to get a Cursor, and I would
like to update the title of that row to 'new title'
can you please tell me how to do it?
final ContentResolver cr = context.getContentResolver();
Cursor c = cr.query(MY_CONTENT_URI,
new String[] { title},
an exception here:
int xColumn = c.getColumnIndexOrThrow(x);
}
On Fri, Apr 24, 2009 at 3:03 PM, Mark Murphy mmur...@commonsware.com wrote:
Meryl Silverburgh wrote:
Hi,
I call ContentResolver's query method to get a Cursor, and I would
like to update the title of that row to 'new
Hi,
I am trying to dump the content of sqlite via adb shell command.
Here is what i did:
$ adb shell
* daemon not running. starting it now *
* daemon started successfully *
# sqlite3
SQLite version 3.5.9
qlite .databases
seq name file
--- ---
is the name of the DB file?
On 4/16/09, Marco Nelissen marc...@android.com wrote:
On Thu, Apr 16, 2009 at 6:08 PM, Meryl Silverburgh
silverburgh.me...@gmail.com wrote:
Hi,
I am trying to dump the content of sqlite via adb shell command.
Here is what i did:
$ adb shell
* daemon not running
Hi,
I am trying to following this documentation
'http://source.android.com/using-eclipse' to debug android Launcher
Activity in eclipse.
It said '
You may need to open the Debug perspective (next to the Java
perspective icon in the upper-right, click the small Open
Perspective icon and select
Hi,
I have constructed a Bitmap object in Java. Can you please tell me how
can I scale it (x, y with a different ratio) on android?
Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers
On Tue, Apr 7, 2009 at 1:01 AM, David Turner di...@android.com wrote:
On Tue, Apr 7, 2009 at 2:15 AM, Meryl Silverburgh
silverburgh.me...@gmail.com wrote:
Hi,
I am trying to use LOGE function to display the value of errno.
LOGE(errno: %d\n, errno);
But what I get
errno: 1
But '1
Hi,
I put calls to LOGV() in my cpp file in WebKit code in andorid, but I
don't see any log statements when I run 'adb logcat' in another shell.
But as soon as I change it to LOGE(), i see them.
Can you please tell me how can I see the log content of LOGV?
Thank you.
Hi,
Can you please tell me how can I become root in android emulator?
I have googled and find this link:
http://www.androidhere.com/ANDROID-NEWS/Technology/200811/19-Hack--Howto-get-root-on-your-G1_41.html
so i tried
# adb shell
and the follow the steps
#mount -o remount,rw -t yaffs2
Hi,
I am trying to use LOGE function to display the value of errno.
LOGE(errno: %d\n, errno);
But what I get
errno: 1
But '1' is not a valid errno (I look at errno.h).
Can you please tell me what am I doing wrong?
Thank you.
--~--~-~--~~~---~--~~
You received
Hi,
I have download and built android source on my local machine.
Can you please tell me how can I remove all the binaries (*.o,
executables) to clean up everything?
Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Hi,
I have selector drawable for my widget. But for some reason, the
focused drawable (specified below) is not shown.
When I use hierarchyViewer, it does show my widget has focus (the
'hasFocus' is true). And its parent has Focus too and its grand
parent has Focus.
My question is why andorid
For ToggleButton, there is an attribute for 'disbledAlpha'. Why there
is no same attribute for ImageButton?
How can I achieve the same thing for an ImageButton (grey out when the
button is disabled).
Thank you.
The alpha to apply to the indicator when disabled.
Must be a floating point
Hi,
I am trying to create a compound widget which has 2 labels (i.e.
textview), one label on each line.
public class TwoLabel extends LinearLayout {
private TextView mLabel;
private TextView mLabel2;
public TwoLabel(Context context, AttributeSet attrs, int defStyle) {
see the first label but not the second one.
On Fri, Mar 20, 2009 at 6:50 PM, Meryl Silverburgh
silverburgh.me...@gmail.com wrote:
Hi,
I am trying to create a compound widget which has 2 labels (i.e.
textview), one label on each line.
public class TwoLabel extends LinearLayout
of their parent. So the second one is outside of the
parent.
On Fri, Mar 20, 2009 at 6:53 PM, Meryl Silverburgh
silverburgh.me...@gmail.com wrote:
Hi,
I am trying to create a compound widget which has 2 labels (i.e.
textview), one label on each line.
public class TwoLabel extends
PM, Meryl Silverburgh
silverburgh.me...@gmail.com wrote:
Romain,
Thank you. But I change the height to wrap_content for both items.
I still see only 1 item in the emulator.
Any idea please?
On Fri, Mar 20, 2009 at 8:48 PM, Romain Guy romain...@google.com wrote:
You specified a height
Hi,
In android, if I have a TextPaint object, how can I set the font style
to be 'bold'?
I can't find any method in TextPaint or Paint to allow me do that.
Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups
Hi,
Can you please tell me how can I detect Fling action in my own widget?
I have implemented my widget as OnGestureListener.
And like in Gallery, I have a
GestureDetector mGestureDetector = new GestureDetector(this);
For my onTouchEvent(), I have
@Override
public boolean
the correct boolean-values in the other methods
of your OnGestureDetector (onDown, onScroll, etc).
On Mar 18, 2:51 pm, Meryl Silverburgh silverburgh.me...@gmail.com
wrote:
Hi,
Can you please tell me how can I detect Fling action in my own widget?
I have implemented my widget
the onFling method in your listener to handle flings.
On Mar 12, 1:27 pm, Meryl Silverburgh silverburgh.me...@gmail.com
wrote:
Hi,
Can you please tell me how implement android's Gallery fling action
(with the animation) in my own widget?
Thank you.- Hide quoted text -
- Show quoted text
I am trying to understand how Gallery implements it fling behaviour.
I appreciate if someone can help me understand
1. why it needs special handing for ACTION_UP and ACTION_CANCEL?
2. why it does not check the retValue before calling UP/CANCEL's handling?
3. what does onUp() trying to do? Why it
I have looked at TabHost code and I have a question.
Why it expects TabContent to be a FrameLayout? I see it casts
mTabContent to be FrameLayout.
Why TabContent can't be an instance of ViewGroup, but a FrameLayout?
Thank you.
--~--~-~--~~~---~--~~
You received
Hi,
Can you please tell me how implement android's Gallery fling action
(with the animation) in my own widget?
Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this
Hi,
AbsoluteLayout has become obsolete, I need to convert it to FrameLayout.
My problem is in AbsoluteLayout.LayoutParams, I can specify (x,y) in
the constructor, which specify the location of my view during layout.
How can I achieve using FrameLayout + FrameLayout.LayoutParams?
Thank you.
Hi,
In xml layout, I can specify these parameters:
android:layout_centerInParent=true
android:layout_marginLeft=4dp
android:layout_marginRight=4dp
Can you please tell me what functions I can call in
Can you please tell me how to enable ANDROID_INSTRUMENT ?
On Tue, Mar 10, 2009 at 9:45 PM, vinay harugop vinc...@gmail.com wrote:
ravi,
I tried the same and found similar conflicts in the namespace when
ANDROID_INSTRUMENT was enabled.
Modify platform/android/SystemTimeAndroid.cpp,
Hi,
Can you please tell me why Activity dispatchKeyEvent(KeyEvent event)
method always return false?
I press UP/DOWN key (on keyboard), and I see the focus of each button
moves from one to another.
So I think the Activity has handled the UP/DOWN key. My question is
why dispatchKeyEvent() always
I have created a background drawable for my widget.
How can I specify the size of the background drawable so that it won't
stretch of my widget?
?xml version=1.0 encoding=utf-8?
layer-list xmlns:android=http://schemas.android.com/apk/res/android;
item android:id=@+android:id/background
Hi,
Can you please tell me where is the android code which picks the
different drawable will be used as background
when it has focus?
For example, I have the following setup for my widget:
?xml version=1.0 encoding=utf-8?
selector xmlns:android=http://schemas.android.com/apk/res/android;
Hi,
I have read the LabelView example in APIDemo which show how to create
a custom widget.
However, what if I want to create a custom widget which is a composite
of existing android widget?
For example, in my currently activity, I have this in my layout xml
file which has 2 bottoms left, right
On Wed, Feb 25, 2009 at 3:52 PM, Mark Murphy mmur...@commonsware.com wrote:
Meryl Silverburgh wrote:
I know my custom widget need to be inherited from view, but if i do
that, I can't do 'setContentView()' in my custom widget class (since
that is an Activity method).
If you need to turn
I have a question about using LayoutInflater.
I have a class which inherits from 'View'.
It calls
LayoutInflater inflater =
(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
if (inflater != null) {
Mark,
Thank you for your help.
On Wed, Feb 25, 2009 at 6:00 PM, Mark Murphy mmur...@commonsware.com wrote:
Meryl Silverburgh wrote:
I have a question about using LayoutInflater.
I have a class which inherits from 'View'.
It calls
LayoutInflater inflater =
(LayoutInflater
Hi,
I am trying to customize background drawable for Gallery widget in android.
So I took the Gallery1.java in APIDemo and try changing the background
drawable of Gallery.
In Gallery1.java, I add:
// Reference the Gallery view
Gallery g = (Gallery) findViewById(R.id.gallery);
Hi,
I have looked at the Gallery widget api,
http://code.google.com/android/reference/android/widget/Gallery.html
But can you please tell me how can I scroll an item in the Gallery
programmically? e.g. i want to write code to scroll the gallery by 1
item at a time.
Thank you.
I have looked at the Gallery.java source code, it has 2 functions
which move the selected position: movePrevious() or moveNext(),
however both are 'default' visibility.
Can you please tell me how can I call those 2 method programmically?
Thank you.
On Mon, Feb 23, 2009 at 12:19 PM, Meryl
Hi,
Can you please tell me how can I customize drawable (background image
for disable mode, focus mode, etc) for Gallery Widget?
Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
Hi,
In my layout.xml, I have a child Widget under my custom widget MyWidget
My question is in my java code of my parent widget (MyWidget), how
can I get a reference to the child Widget (MyChildWidget)?
com.mycompany.widget.MyWidget android:id=@android:id/widget
Hi,
Can you please help me understand how android consturcts widget?
I have these 2 cases,
com.mycompany.MyWidget android:id=@+id/mywidget_button
style=@style/MyWidget
com.mycompany.MyWidget android:id=@+id/mywidget_button
My question is why they call the same constructors (I have print
Hi,
I am trying to setup a selector drawable in my asset file like this:
* 2 different images for 'on'/'off' mode in rest mode (i.e. it does
not has focus)
* another 2 different images for 'on'/'off' mode in focus mode (i.e.
it has the focus).
In my case, the rest mode works, but the 'focus'
android:state_checked=true android:drawable=@drawable/on /
So I appreciate if you can help me out.
Thank you.
On Sun, Feb 15, 2009 at 12:32 AM, Romain Guy romain...@google.com wrote:
use state_selected, not focused.
On Sun, Feb 15, 2009 at 12:08 AM, Meryl Silverburgh
silverburgh.me
Hi,
I am trying to setup a selector drawable in my asset file like this:
* 2 different images for 'on'/'off' mode in rest mode (i.e. it does
not has focus)
* another 2 different images for 'on'/'off' mode in focus mode (i.e.
it has the focus).
In my case, the rest mode works, but the 'focus'
Hi,
I have tried everything thing I can thing of in defining the style of
my widget in my theme. But I still can't get it to work. I have posted
my questions to various forum/newgroup, I can't get my problem
resolved. I appreciate if someone can help me.
I am tying to define the style of
:59 PM, birds fly birdsact...@gmail.com wrote:
hi
you can use Theme , The theme can include all style information.
style name=string [parent=string]
item name=string/item
/style
On Fri, Feb 13, 2009 at 8:16 AM, Meryl Silverburgh
silverburgh.me...@gmail.com wrote:
Hi,
I create my own
version=1.0 encoding=utf-8?
resources
style name=MyWidget
item name=android:background@drawable/btn_mywidget_bg/item
/style
/resources
Can you please tell me what am I missing?
On Fri, Feb 13, 2009 at 2:38 PM, Meryl Silverburgh
silverburgh.me...@gmail.com wrote:
Thank you.
I have
Yeah. Thank you.
On Thu, Feb 12, 2009 at 9:53 AM, Sundog sunns...@gmail.com wrote:
Romain,
Just a quick thank you to you and others, especially Dianne, who
field such things. Most of us are very grateful for your hard work and
patience.
On Feb 12, 9:54 am, Romain Guy
Hi,
I create my own widget with its own drawable for background.
So in my styles.xml file, I have this:
resources
style name=MyWidget
item name=android:background@drawable/btn_mywidget_bg/item
/style
/resources
In my main.xml, if i specified my 'style' attribute, my
Hi,
When I create a button, it has a grey round rectangle and an orange
background when it has focus.
Can you please tell me where is the code which draws that?
I looked at the method of onDraw() of View and button, i dont' see
that is drawing that.
And in the TextView, I don't it is drawing
Hi,
Can you please tell me how can I customize android button's look and feel?
e.g. by default, it uses a grey round rectangle as the border and it
has 'orange' background when it has focus.
Can you please tell me how can i config that in my application?
Thank you.
I found the 'btn_default_selected.9.png' 'btn_default_press.9.png'
images, but I am still not sure how the 'borders' are drawn.
Thank you for any tip.
On Wed, Feb 11, 2009 at 11:20 AM, Meryl Silverburgh
silverburgh.me...@gmail.com wrote:
Hi,
Can you please tell me how can I customize android
Hi,
In the TabWidget source code, it has a mBottomLeftStrip and
mBottomRightStrip attribute.
Can you please tell me what are they for? I have an android example
with Tab. When I run that in the emulator, I click the left/right of
the tab widget, I don't see anything happened.
Thank you for any
, 3:19 am, Meryl Silverburgh silverburgh.me...@gmail.com
wrote:
Hi,
I am getting the Cannot delete that URL exception(see below):
java.lang.UnsupportedOperationException: Cannot delete that URL:
content://contacts/phones
at
android.database.DatabaseUtils.readExceptionFromParcel
Hi,
I have the following test case which tests context.sendBoardcast() function:
public void testInstallFavorite() {
Context context = getContext();
IntentFilter filter = new IntentFilter();
Hi,
I am getting the Cannot delete that URL exception(see below):
java.lang.UnsupportedOperationException: Cannot delete that URL:
content://contacts/phones
at
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:130)
at
That line is after my first insert.
On Fri, Feb 6, 2009 at 4:23 AM, MichaMicha micha.okker...@gmail.com wrote:
values.clear();
doesn't look right, right?
On 6 feb, 08:30, Meryl Silverburgh silverburgh.me...@gmail.com
wrote:
Hi,
I am trying to programmically add a new contact in android
How to remove a contact with a specified phone number?
I try this:
String phone =1234567;
context.getContentResolver().delete(Contacts.Phones.CONTENT_URI,
phone, null);
But I get an error with this:
java.lang.UnsupportedOperationException: Cannot delete that URL:
content://contacts/phones
I have read:
http://code.google.com/android/devel/data/contentproviders.html
But I don't understand what is the difference between managedQuery()
and getContentREsolver().query()?
Seems to me both take a Uri and query parameters and then return a Cursor.
I appreciate if anyone can tell me the
Hi,
Is it possible for me to find out what is the 'view' of my activity?
e.g. if my activity pops up a 'dialog', can I get a reference of that dialog?
Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups
Hi,
I am trying to programmically add a new contact in android.
What I did is this:
Uri uri = Contacts.People.CONTENT_URI;
values.put(Contacts.PeopleColumns.NAME, mydummyuser1);
Uri newuri = myActivity.getContentResolver().insert(uri,
values);
Hi,
In my activity, I have code which create dialog like this with +ve and
-ve button each has its own click action:
protected Dialog onCreateDialog(int id) {
switch (id) {
case CONFIRM_DIALOG:
// create my own dialog with positive and negative button...
Hi,
I have the following test code which calls
callActivityOnRestoreInstanceState of Instrumentation class.
mStartIntent = new Intent(Intent.ACTION_MAIN);
Bundle bundle = new Bundle();
bundle.putBoolean(testProperty, false);
MyActivity
{
public ApiDemosTest() {
super(com.example.android.apis, ApiDemos.class);
}
}
In either case, a clue that something is wrong is that you're calling
both startActivity() *and* callActivityOnStart(), which cannot be
right.
--Andy
On Wed, Feb 4, 2009 at 4:50 PM, Meryl Silverburgh
79 matches
Mail list logo