[android-beginners] Re: findViewById() function return null

2008-05-05 Thread Dan U.

> What is timestamp of this xml file? How does it work with the app?

I think the reason it was suggested was to convince the thing to
recompile. I don't think that's the problem. I'd guess you are using
the m5 sdk, but the layout file you posted is m3. try changing the
id="@+id... to android:id="@+id...

On May 5, 8:22 pm, tagore <[EMAIL PROTECTED]> wrote:
> Thank you for your reply.
>
> the relative_view.xml file is shown below:
> 
> http://schemas.android.com/apk/res/
> android"
> android:layout_width="fill_parent"
> android:layout_height="wrap_content"
> android:padding="10px">
>
>android:layout_width="fill_parent"
>   android:layout_height="wrap_content"
>   android:text="Type here:"/>
>
>android:layout_width="fill_parent"
>   android:layout_height="wrap_content"
>   android:background="@android:drawable/
> editbox_background"
>   android:layout_below="@id/label"/>
>
>  android:layout_width="wrap_content"
> android:layout_height="wrap_content"
> android:layout_below="@id/entry"
> android:layout_alignParentRight="true"
> android:layout_marginLeft="10px"
> android:text="OK" />
>
>  android:layout_height="wrap_content"
> android:layout_toLeft="@id/ok"
> android:layout_alignTop="@id/ok"
> android:text="Cancel" />
> 
>
> I REALLY have the id -- entry. I wonder if there is other problem?
> What is timestamp of this xml file? How does it work with the app?
>
> On 5月6日, 上午10时04分, Mark Murphy <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > tagore wrote:
> > > Today, I write some simple code to implement activity. See the
> > > following codes:
> > > public class TestLinearView extends Activity {
> > > private EditText edit = null;
> > > /** Called when the activity is first created. */
> > > @Override
> > > public void onCreate(Bundle icicle) {
> > > super.onCreate(icicle);
>
> > > // Set activity content from layout view
> > > setContentView(R.layout.relative_view);
>
> > > // change the edit text
> > > edit = (EditText)findViewById(R.id.entry);
> > > edit.setText("Mysdfsadfdsafdsf");
> > > }
> > > }
>
> > > However, the application crushed. After I debug into the app, I found
> > > that the edit was null.
>
> > It would appear that your res/layout/relative_view.xml file does not
> > have a view with the id of "@+id/entry". I would have expected a
> > compiler error, though, complaining that R.id.entry was not found.
> > Perhaps your R.java file is out of sync with the contents of your res/
> > directory tree.
>
> > Try updating the timestamp on your res/layout/relative_view.xml file
> > (e.g., touch res/layout/relative_view.xml in Linux) and recompile. Or,
> > update res/layout/relative_view.xml to include an EditText element with
> > an android:id of "@+id/entry", since it would appear it doesn't have one
> > already.
>
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com
> > The Busy Coder's Guide to Android Development -- coming in June 2008!
--~--~-~--~~~---~--~~
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 PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] modifying the People content provider

2008-05-05 Thread scimitar

Hi. I want to modify a field of the People(contact list) content
provider from my code, but I see that all the strings are static
final. Is there a way to do this?

thanks,

--~--~-~--~~~---~--~~
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 PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: findViewById() function return null

2008-05-05 Thread tagore

Thank you for your reply.

the relative_view.xml file is shown below:

http://schemas.android.com/apk/res/
android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="10px">










I REALLY have the id -- entry. I wonder if there is other problem?
What is timestamp of this xml file? How does it work with the app?

On 5月6日, 上午10时04分, Mark Murphy <[EMAIL PROTECTED]> wrote:
> tagore wrote:
> > Today, I write some simple code to implement activity. See the
> > following codes:
> > public class TestLinearView extends Activity {
> > private EditText edit = null;
> > /** Called when the activity is first created. */
> > @Override
> > public void onCreate(Bundle icicle) {
> > super.onCreate(icicle);
>
> > // Set activity content from layout view
> > setContentView(R.layout.relative_view);
>
> > // change the edit text
> > edit = (EditText)findViewById(R.id.entry);
> > edit.setText("Mysdfsadfdsafdsf");
> > }
> > }
>
> > However, the application crushed. After I debug into the app, I found
> > that the edit was null.
>
> It would appear that your res/layout/relative_view.xml file does not
> have a view with the id of "@+id/entry". I would have expected a
> compiler error, though, complaining that R.id.entry was not found.
> Perhaps your R.java file is out of sync with the contents of your res/
> directory tree.
>
> Try updating the timestamp on your res/layout/relative_view.xml file
> (e.g., touch res/layout/relative_view.xml in Linux) and recompile. Or,
> update res/layout/relative_view.xml to include an EditText element with
> an android:id of "@+id/entry", since it would appear it doesn't have one
> already.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> The Busy Coder's Guide to Android Development -- coming in June 2008!
--~--~-~--~~~---~--~~
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 PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: findViewById() function return null

2008-05-05 Thread tagore

The relative_view.xml file is shown below:

http://schemas.android.com/apk/res/
android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="10px">










It absolutely has the id -- entry:


So, I wonder if it is wrong place to call findViewById() in
onCreate().
About the timestamp, is it the modified time of the file? How does the
timestamp work with the app?


On 5月6日, 上午10时04分, Mark Murphy <[EMAIL PROTECTED]> wrote:
> tagore wrote:
> > Today, I write some simple code to implement activity. See the
> > following codes:
> > public class TestLinearView extends Activity {
> > private EditText edit = null;
> > /** Called when the activity is first created. */
> > @Override
> > public void onCreate(Bundle icicle) {
> > super.onCreate(icicle);
>
> > // Set activity content from layout view
> > setContentView(R.layout.relative_view);
>
> > // change the edit text
> > edit = (EditText)findViewById(R.id.entry);
> > edit.setText("Mysdfsadfdsafdsf");
> > }
> > }
>
> > However, the application crushed. After I debug into the app, I found
> > that the edit was null.
>
> It would appear that your res/layout/relative_view.xml file does not
> have a view with the id of "@+id/entry". I would have expected a
> compiler error, though, complaining that R.id.entry was not found.
> Perhaps your R.java file is out of sync with the contents of your res/
> directory tree.
>
> Try updating the timestamp on your res/layout/relative_view.xml file
> (e.g., touch res/layout/relative_view.xml in Linux) and recompile. Or,
> update res/layout/relative_view.xml to include an EditText element with
> an android:id of "@+id/entry", since it would appear it doesn't have one
> already.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> The Busy Coder's Guide to Android Development -- coming in June 2008!
--~--~-~--~~~---~--~~
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 PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: findViewById() function return null

2008-05-05 Thread Mark Murphy

tagore wrote:
> Today, I write some simple code to implement activity. See the
> following codes:
> public class TestLinearView extends Activity {
> private EditText edit = null;
> /** Called when the activity is first created. */
> @Override
> public void onCreate(Bundle icicle) {
> super.onCreate(icicle);
> 
> // Set activity content from layout view
> setContentView(R.layout.relative_view);
> 
> // change the edit text
> edit = (EditText)findViewById(R.id.entry);
> edit.setText("Mysdfsadfdsafdsf");
> }
> }
> 
> However, the application crushed. After I debug into the app, I found
> that the edit was null.

It would appear that your res/layout/relative_view.xml file does not 
have a view with the id of "@+id/entry". I would have expected a 
compiler error, though, complaining that R.id.entry was not found. 
Perhaps your R.java file is out of sync with the contents of your res/ 
directory tree.

Try updating the timestamp on your res/layout/relative_view.xml file 
(e.g., touch res/layout/relative_view.xml in Linux) and recompile. Or, 
update res/layout/relative_view.xml to include an EditText element with 
an android:id of "@+id/entry", since it would appear it doesn't have one 
already.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
The Busy Coder's Guide to Android Development -- coming in June 2008!

--~--~-~--~~~---~--~~
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 PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] findViewById() function return null

2008-05-05 Thread tagore

Today, I write some simple code to implement activity. See the
following codes:
public class TestLinearView extends Activity {
private EditText edit = null;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);

// Set activity content from layout view
setContentView(R.layout.relative_view);

// change the edit text
edit = (EditText)findViewById(R.id.entry);
edit.setText("Mysdfsadfdsafdsf");
}
}

However, the application crushed. After I debug into the app, I found
that the edit was null.
What is wrong with my codes? Please figure out.
--~--~-~--~~~---~--~~
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 PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] findViewById() function return null

2008-05-05 Thread tagore

Today, I write some simple code to implement activity. See the
following codes:
public class TestLinearView extends Activity {
private EditText edit = null;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);

// Set activity content from layout view
setContentView(R.layout.relative_view);

// change the edit text
edit = (EditText)findViewById(R.id.entry);
edit.setText("Mysdfsadfdsafdsf");
}
}

However, the application crushed. After I debug into the app, I found
that the edit was null.
What is wrong with my codes? Please figure out.
--~--~-~--~~~---~--~~
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 PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] UI Elements distinguishing

2008-05-05 Thread tagore

What is the difference among window, view and dialog.
Why are them inherited from a common base class?
--~--~-~--~~~---~--~~
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 PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: ContentProviders and databases

2008-05-05 Thread ccylan

Hi Again,

It seems like I'm talking to myself, but I managed to solve the
problem.
It turns out I had the provider tag in both of my applications, when
all that
was needed is a URI call within an application that wants to use the
provider.

On Apr 28, 4:25 pm, ccylan <[EMAIL PROTECTED]> wrote:
> Hello Again,
>
> I was successfully able to implement my customizedcontentprovider.
> However there are a couple questions I would like to ask.
>
> Thecontentproviderseems to create a database inside the application
> that I first call it in.  When I open up another application to insert
> into thatcontentprovider, it appears to work correctly and write in
> in the database of the first application.  However, when I reboot
> android and run the second application, it creates a new database and
> writes it inside of the second application.  How do I prevent this
> problem from occurring?
>
> Is there a way to make sure thecontentproviders database is always
> located within the first application?
>
> Thanks again everyone.
>
> On Apr 24, 2:30 pm, ccylan <[EMAIL PROTECTED]> wrote:
>
> > Hello Everyone,
>
> > Recently I've been trying to figure out how to have a background
> > service push data into a database and then read from that database
> > with another application.  Initially I thought about just using the
> > various sql classes available, but then I discovered that the
> > databases for each application are only available to that
> > application.  So after snooping around a little bit I found out about
> > ContentProvider.  However, I'm still confused about how to use it even
> > after reading the "accessingcontentproviders" page.
>
> > I've been looking through DatabaseContentProvider since it seems like
> > I can use databases in conjunction with the ContentProvider, does this
> > mean that the database I create using the contentprovider accessible
> > to all my other applications?  How would I access this database from
> > another application?  Would it be done with that "content://..."
> > interface?
>
> > I'm a bit confused so the way I wrote things out might not make sense,
> > please ask me for clarification on my questions if you need.
>
> > Thanks

--~--~-~--~~~---~--~~
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 PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: problem facing with playing videos in androids

2008-05-05 Thread Megha Joshi
The 3gp files should not give any issues with MediaPlayer or VideoView APIs,
Could you attach your 3gp file, so that I can test it on my end?

Thanks,
Megha

On Mon, May 5, 2008 at 8:17 AM, Hitesh <[EMAIL PROTECTED]> wrote:

>
> HI MADAM/SIR
>
>  i m hitesh.i m playing the 3 gp file on androids emulator.the length
> of 3 gp file is 1 minute 3 sec.
> but the video play ony for 2 or 3 second.i uses the code that given on
> net.
> i also used the other url but the result is same.
>
> please tell me answer.
>
>  Thank You
> >
>

--~--~-~--~~~---~--~~
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 PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: 2 xml files in one java file

2008-05-05 Thread Ahmed Abdel samea

I didnt try it but i dont think so i can define a whole form then define another one this will result that the last one is setted only  but that whats is logical 

 
Yours,
 --( H o H i )- On Mon, 5/5/08, scorpio <[EMAIL PROTECTED]> wrote:
From: scorpio <[EMAIL PROTECTED]>Subject: [android-beginners] 2 xml files in one java fileTo: "Android Beginners" Date: Monday, May 5, 2008, 12:24 PMCan we call two xml files in one java class. Is it possible ??

thanks
scorpio



  Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.

--~--~-~--~~~---~--~~
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 PROTECTED]
  Announcing the new M5 SDK!
  http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-no...
  For more options, visit this group at
  http://groups.google.com/group/android-beginners?hl=en  -~--~~~~--~~--~--~---



[android-beginners] problem facing with playing videos in androids

2008-05-05 Thread Hitesh

HI MADAM/SIR

 i m hitesh.i m playing the 3 gp file on androids emulator.the length
of 3 gp file is 1 minute 3 sec.
but the video play ony for 2 or 3 second.i uses the code that given on
net.
i also used the other url but the result is same.

please tell me answer.

 Thank You
--~--~-~--~~~---~--~~
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 PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] 2 xml files in one java file

2008-05-05 Thread scorpio

Can we call two xml files in one java class. Is it possible ??

thanks
scorpio
--~--~-~--~~~---~--~~
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 PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---