[android-beginners] Re: Android SMS

2008-08-27 Thread Sylvester Steele
thanks Megha Joshi wrote: 2008/8/26 Sylvester Steele [EMAIL PROTECTED] Hi, this might seem silly, but I can't get the SMS app to work. Issues: 1. Can't type in the To field. Worked around by selecting a contact from the addressbook. 2. Can't type a message! How do I select

[android-beginners] Re: Android SMS

2008-08-27 Thread Sylvester Steele
is there a way to type, while keeping it vertical? Sylvester On Aug 27, 8:36 pm, Sylvester Steele [EMAIL PROTECTED] wrote: thanks Megha Joshi wrote: 2008/8/26 Sylvester Steele [EMAIL PROTECTED] Hi, this might seem silly, but I can't get the SMS app to work. Issues: 1. Can't type

[android-beginners] selecting text

2008-07-14 Thread Sylvester Steele
Hi, I want the user to be able to select text from the screen..much like we do when we copy paste from one document to another. Is there an easy way to do this? I need to know the exact string selected by the user. Thanks, Sylvester --~--~-~--~~~---~--~~ You

[android-beginners] Re: custom component in a list

2008-07-11 Thread Sylvester Steele
I don't know how you have created your Adapter for supplying to your ListView subclass. I am assuming that you implemented an Adapter subclass that overrode getView() and is returning your row objects on demand, perhaps instantiated via ViewInflate. arrayAdapter1= new ArrayAdapter String(this,

[android-beginners] Re: custom component in a list

2008-07-11 Thread Sylvester Steele
Mark, a couple of questions: 1. I looked at the getView funtcion:ViewgetView(int position, View convertView, ViewGroup parent). I can understand that position refers to the particular element on the list and ViewGroup parent to the custom view I am using for the list items. But what

[android-beginners] Re: custom component in a list

2008-07-10 Thread Sylvester Steele
It is unclear who this is in this.findViewById(R.id.dButton). referred to the activity in the above post. But changed it now to: deleteButton1= (Button)customComponent.findViewById(R.id.deleteButton); customComponent is initialized as: customComponent= new ConversationListView(this);

[android-beginners] Re: custom component in a list

2008-07-09 Thread Sylvester Steele
dButton= (Button)this.findViewById(R.id.dButton); is I think where it problem is. I played around a bit with it and realized that other functions were also throwing up an exception. Then I just created a new button, using new Button(this); and it worked fine. So, why is dButton=

[android-beginners] custom component in a list

2008-07-08 Thread Sylvester Steele
I have a custom component with a texttView and a button. I want to display this in a simple list. customComponent = new conversationListView (this, blah); arrayAdapter1= new ArrayAdapter String(this, customComponent.getId(), customComponent.textView.getId()); I get an error saying some

[android-beginners] custom component

2008-07-07 Thread Sylvester Steele
Hi, I want to create an experimental custom component which consists of just one EditText and one TextView. So I did this: package com.customcomponent; import android.app.Activity; import android.content.Context; import android.util.Log; import android.widget.AbsoluteLayout; import

[android-beginners] Re: custom component

2008-07-07 Thread Sylvester Steele
I made the changes you suggested: I got rid of the XML file. My calling class looks like: Log.v(Main activity,before new CustomEditText (this)); customEditText = new CustomEditText (this); //customEditText = (CustomEditText)this.findViewById(R.layout.component);

[android-beginners] Re: custom component

2008-07-07 Thread Sylvester Steele
1. It used to be that your custom component subclassed AbsoluteLayout. If it still does, I suspect you cannot use LinearLayout.LayoutParams with an AbsoluteLayout. You should make those consistent, either by changing the superclass, or by changing the LayoutParams. I just changed it from

[android-beginners] Re: getting item name from listview.

2008-06-29 Thread Sylvester Steele
((Cursor)fruitsAdapter.getItem(position)).getString(columnNo) This works. Is this the right way? Sylvester On Jun 27, 11:52 pm, Mark Murphy [EMAIL PROTECTED] wrote: ArrayAdapter does not create a Cursor behind the scenes. Whoops, I think I was confusing two threads. Sorry about that. --

[android-beginners] accessing the phone number of an incoming call..

2008-06-26 Thread Sylvester Steele
Is it possible to get the phone number of an incoming call that is currently ringing? Thanks, Sylvester --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to

[android-beginners] Re: testing my app

2008-06-25 Thread Sylvester Steele
Thanks. Sylvester --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL

[android-beginners] Re: getting item name from listview.

2008-06-23 Thread Sylvester Steele
Actually, they both return a View. You need to cast the View to the type you created as your entries (e.g., TextView), then get the data out of there (e.g., getText().toString()). If you're relying on the adapter's built-in row types, they'll be TextView instances. Yes, I did do that, it

[android-beginners] getting item name from listview.

2008-06-21 Thread Sylvester Steele
Is there any way to get the item name at a particular position from a ListView? If I can't get it from the listView itself, how do I do it? the .getItem function returns a weird String, not the actual string you see on the screen. Sylvester --~--~-~--~~~---~--~~

[android-beginners] Re: displaying contacts in a list

2008-06-20 Thread Sylvester Steele
My code is: activity.setContentView(R.layout.contacts); //activity.setContentView(R.id.contactsList); String[] projection = new String[] { android.provider.BaseColumns._ID, android.provider.Contacts.PeopleColumns.NAME

[android-beginners] Re: displaying contacts in a list

2008-06-20 Thread Sylvester Steele
I have also tried: activity.setContentView(R.layout.contacts); Cursor C = activity.getContentResolver().query(People.CONTENT_URI, null, null, null, null); activity.startManagingCursor(C); String[] columns = new String[] {People.NAME}; int[] names = new int[]

[android-beginners] Re: displaying contacts in a list

2008-06-19 Thread Sylvester Steele
Could there be any other problem? Thanks, Sylvester --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from

[android-beginners] Re: set EditText properties

2008-06-15 Thread Sylvester Steele
change the layout parameters from your code using getLayoutParams() and then setting the height to the height you computed dynamically. Fine, but in that case what is the purpose of the setHeight function? Is there any other way to display rather than setContentView for which this function

[android-beginners] Re: set EditText properties

2008-06-15 Thread Sylvester Steele
() and then setting the height to the height you computed dynamically. You may also use the android:layout_weight attribute, provided by LinearLayout. On Sun, Jun 8, 2008 at 8:07 PM, Sylvester Steele [EMAIL PROTECTED] wrote: Try putting your EditText inside a LinearLayout, setting

[android-beginners] Re: set EditText properties

2008-06-15 Thread Sylvester Steele
I see a normal black background with white text. Basically no change. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To

[android-beginners] displaying contacts in a list

2008-06-15 Thread Sylvester Steele
Hi, I've been trying to display contacts in a list. Here's what I did: activity.setContentView(R.layout.contacts); String[] projection = new String[] { android.provider.BaseColumns._ID,

[android-beginners] debugging..

2008-06-15 Thread Sylvester Steele
hi, I am trying to use System.out.print , but the console does not show any output. My exact line is: System.out.print(activity.getTitle().toString()); but I haven't had luck with any other System.out.print(*whatever*); statement either. 1. Is there a better way of doing this? 2. Am I doing

[android-beginners] CursorAdapter

2008-06-08 Thread Sylvester Steele
Hi, The cursorAdapter constructor format is really simple but its just not working! private CursorAdapter ABC; ABC= new CursorAdapter (myCursor, myActivity); note: the activity is passed on to this class from another class the myCursor is not initialized, but is returned by a function ie i

[android-beginners] Re: CursorAdapter

2008-06-08 Thread Sylvester Steele
Can you elaborate on how it is not working? ABC= new __CursorAdapter__ (myCursor, myActivity); __ - redline under that. message: can not instantiate the type CursorAdapter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[android-beginners] Re: Menu items

2008-06-06 Thread Sylvester Steele
I was tinkering around with it and realized that just extending the Activity does not give the exception What I do is: 1 A class that extends Activity starts executing. 2 it instantiates another class. The instantiated class does not take any parameters in the constructor. 3 Inside the

[android-beginners] Re: Lists..w/o ListActivity

2008-06-04 Thread Sylvester Steele
The log shows this: [2008-06-04 20:48:40 - begin1] -- [2008-06-04 20:48:40 - begin1] Android Launch! [2008-06-04 20:48:40 - begin1] adb is running normally. [2008-06-04 20:48:40 - begin1] Launching: com.google.begin1Package.begin1Activity [2008-06-04 20:48:40 -

[android-beginners] Re: Lists..w/o ListActivity

2008-06-04 Thread Sylvester Steele
I think I used inappropriate terminology. I am getting an exception during runtime (as soon as it starts). my java code is: package com.google.begin1Package; import android.app.Activity; import android.os.Bundle; import android.widget.*; public class begin1Activity extends Activity {

[android-beginners] Re: Lists..w/o ListActivity

2008-06-04 Thread Sylvester Steele
A big thank you to you Mark! It works well now! Sylvester Steele --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com

[android-beginners] Lists..w/o ListActivity

2008-06-03 Thread Sylvester Steele
Is it possible to work with lists (ListView) without extending ActivityList? If not, does this mean that a different class has to be created just to make a list? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android