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 (ph
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 android-deve
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 to
Hi,
I follow the instruction here to install Android cupcake emulator 1.5 r2:
http://developer.android.com/sdk/1.5_r2/installing.html
And i create
$ android create avd -n my_android1.5 -t 2
and i run
$ emulator -avd my_android1.5
but when the emulator starts, i don't see the IM application (no
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 w
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);
intent.pu
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 Dev
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 wrote:
> You need to give it a different package n
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 t
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 that
close 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, M
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): Lja
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.
--~--~-~--~~
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 wrote:
>
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 ra
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
new String[] { "new title" }, null);
if (c.getCount() >0) {
// get an exception here:
int xColumn = c.getColumnIndexOrThrow("x");
}
On Fri, Apr 24, 2009 at 3:03 PM, Mark Murphy wrote:
>
> Meryl Silverburgh wrote:
>> Hi,
>>
>> I call
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"}, "titl
Hi,
If I have an instance of a Picture object (android.graphics.Picture),
how can I crop out a section of the Picture object (0, 0, 100, 100)
(x, y, w, h)?
Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups
Hi,
I have read
'http://developer.android.com/guide/tutorials/notepad/notepad-ex2.html',
specifically step 4 about how to communicate between 2 activities.
It has this example:
Intent i = new Intent(this, NoteEdit.class);
startActivityForResult(i, ACTIVITY_CREATE);
But how can I return a diffe
me what is the name of the DB file?
On 4/16/09, Marco Nelissen 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.
>>
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
--- ---
Hi,
Can you please tell me what is the read which ViewRoot runs?
Is it the same thread as the Activity on the top of the screen? Or it
is a system thread?
If it is a system thread, does it responsible calling the onDraw of the Activty?
Thank you.
--~--~-~--~~~---~--
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 sele
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" gro
On Tue, Apr 7, 2009 at 1:01 AM, David Turner wrote:
>
>
> On Tue, Apr 7, 2009 at 2:15 AM, Meryl Silverburgh
> wrote:
>>
>> Hi,
>>
>> I am trying to use LOGE function to display the value of errno.
>> LOGE("errno: %d\n", errno);
>>
>&g
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 receive
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 /dev/block
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,
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 Goog
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 i
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 value,
uy wrote:
>>>
>>> You specified a height of fill_parent for both items. So they both
>>> have the height of their parent. So the second one is outside of the
>>> parent.
>>>
>>> On Fri, Mar 20, 2009 at 6:53 PM, Meryl Silverburgh
>>>
arent. So the second one is outside of the
> parent.
>
> On Fri, Mar 20, 2009 at 6:53 PM, Meryl Silverburgh
> wrote:
>>
>> Hi,
>>
>> I am trying to create a compound widget which has 2 labels (i.e.
>> textview), one label on each line.
>>
>>
second label?
In the layout.xml file which uses the TwoLabel compound widget, I did this:
So I am not sure why I only see the first label but not the second one.
On Fri, Mar 20, 2009 at 6:50 PM, Meryl Silverburgh
wrote:
> Hi,
>
> I am trying to create a compound widget wh
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) {
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
oolean-values in the other methods
> of your OnGestureDetector (onDown, onScroll, etc).
>
> On Mar 18, 2:51 pm, Meryl Silverburgh
> wrote:
>> Hi,
>>
>> Can you please tell me how can I detect Fling action in my own widget?
>> I have implemented my widget as OnGes
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 onTouchEvent(Mot
Hi,
If I call public void setSelection(int position, boolean animate) of
Gallery, its parent (AbsSpinner) setSelection method will get called.
And that will lead to layout(int delta, boolean animate) of Gallery get called.
In AbsSpinner.java:
protected void setSelectionInt(int position, boolea
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 n
lements
>> onFling, amongst others)
>> Implement the onFling method in your listener to handle flings.
>>
>> On Mar 12, 1:27 pm, Meryl Silverburgh
>> wrote:
>>
>>
>>
>> > Hi,
>>
>> > Can you please tell me how impl
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 th
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,
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 g
Hi,
In this TabHost example, it shows how to create TabHost and TabWidget:
http://developer.android.com/guide/tutorials/views/hello-tabwidget.html
Can you please tell me if I can customize background drawable of
TabWidget, not the tab, but the TabWidget itself?
If yes, how can i do that?
Thank
Can you please tell me how to enable ANDROID_INSTRUMENT ?
On Tue, Mar 10, 2009 at 9:45 PM, vinay harugop wrote:
> ravi,
> I tried the same and found similar conflicts in the namespace when
> ANDROID_INSTRUMENT was enabled.
> Modify platform/android/SystemTimeAndroid.cpp,
> platform/android/jni
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 ca
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?
http://schemas.android.com/apk/res/android";>
bkgd.png is a png file.
Thank you.
--~--~-~--~~~---~--~~
You rec
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:
http://schemas.android.com/apk/res/android";>
Where is the android code which finds out whi
Mark,
Thank you for your help.
On Wed, Feb 25, 2009 at 6:00 PM, Mark Murphy wrote:
>
> Meryl Silverburgh wrote:
>> I have a question about using LayoutInflater.
>>
>> I have a class which inherits from 'View'.
>>
>> It calls
>
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) {
inflater.inflate(R.layo
On Wed, Feb 25, 2009 at 3:52 PM, Mark Murphy 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).
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
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,
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.
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
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.
--~--~-~
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")?
I have tried this, but I get a nul
Hi,
Can you please help me understand how android consturcts widget?
I have these 2 cases,
My question is why they call the same constructors (I have print statement:
public MyToggleWidget(Context context, AttributeSet attrSet) {
super(context, attrStet, R.attr.buttonStyleMyWidget);
}
If s
Again, these works for my
widget now:
So I appreciate if you can help me out.
Thank you.
On Sun, Feb 15, 2009 at 12:32 AM, Romain Guy wrote:
>
> use state_selected, not focused.
>
> On Sun, Feb 15, 2009 at 12:08 AM, Meryl Silverburgh
> wrote:
>>
>> Hi,
>>
>&
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' mod
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 MyWid
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' mod
item>
Can you please tell me what am I missing?
On Fri, Feb 13, 2009 at 2:38 PM, Meryl Silverburgh
wrote:
> Thank you.
>
> I have added a 'themes.xml' file in my res/values directory.
>
>
>
><item name="buttonStyleMyWidget">@
9 at 4:59 PM, birds fly wrote:
> hi
> you can use Theme , The theme can include all style information.
>
>
><item name=string></item>
>
>
>
> On Fri, Feb 13, 2009 at 8:16 AM, Meryl Silverburgh
> wrote:
>>
>> Hi,
>>
>&
Hi,
I create my own widget with its own drawable for background.
So in my styles.xml file, I have this:
- @drawable/btn_mywidget_bg
In my main.xml, if i specified my 'style' attribute, my background
drawable was displayed correctly.
Yeah. Thank you.
On Thu, Feb 12, 2009 at 9:53 AM, Sundog 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 wrote:
>> Hi,
>>
>> First
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
wrote:
> Hi,
>
> Can you please tell me how can I c
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.
--~--~-~--~~-
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 a
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
null, null);
>}
>
> On Feb 9, 3:19 am, Meryl Silverburgh
> wrote:
>> Hi,
>>
>> I am getting the "Cannot delete that URL" exception(see below):
>> java.lang.UnsupportedOperationException: Cannot delete that URL:
>> cont
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
android.database.DatabaseUtils.read
Hi,
I have the following test case which tests context.sendBoardcast() function:
public void testInstallFavorite() {
Context context = getContext();
IntentFilter filter = new IntentFilter();
filter.addAction("com.android.launcher.
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
That line is after my first insert.
On Fri, Feb 6, 2009 at 4:23 AM, MichaMicha wrote:
>
> values.clear();
> doesn't look right, right?
>
> On 6 feb, 08:30, Meryl Silverburgh
> wrote:
>> Hi,
>>
>> I am trying to programmically add a new contact in andro
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,
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 "Andr
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 di
est extends ActivityInstrumentationTestCase {
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
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 m
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...
On Tue, Feb 3, 2009 at 4:52 PM, Dianne Hackborn wrote:
> If you just want to have the method called, you can post work to the main
> thread and directly call the method on the activity.
When you mean 'main' thread, does that mean the thread create by the
android.test.InstrumentationTestRunner wh
86 matches
Mail list logo