Beginner Question: Is it possible to put each class into it's own java file in Eclispe?

by Binxalot » Wed, 21 Apr 2010 05:41:23 GMT


Sponsored Links
 I'm coming over from C# where I can make a namespace and then have
each class placed into its own .cs file if I want, but in all of the
examples I've seen for android all of the methods and classes are all
in one big java file.

Is it possible to put my classes in to their own java files and then
import those classes into a main program java file as needed like I do
in C#?

--



Other Threads

1. Add new item in SMS context menu

Can I add a new item in SMS context menu which can in turn invoke my
app/activity ? If yes help will be appreciated.

Thanks,
Vijay

-- 

2. HTTPClient post delay

Good morning everyone,

I am having a hugely annoying issue with delays using HTTPClient and
post the first time I call execute on the client the response takes 5
seconds to come back. Subsequent calls take around 100 to 200 ms. I am
using the Apache client so does anyone know why this takes so long?
The client setup looks like below

HttpParams params2 = new BasicHttpParams();
params2.setParameter(CoreProtocolPNames.PROTOCOL_VERSION,
HttpVersion.HTTP_1_1);
params2.setParameter(CoreConnectionPNames.TCP_NODELAY, true);
params2.setParameter(CoreProtocolPNames.HTTP_CONTENT_CHARSET,
HTTP.UTF_8);
params2.setParameter(CoreProtocolPNames.USER_AGENT, "Apache-HttpClient/
Android");
params2.setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 15000);
params2.setParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK,
false);
HttpClient client = new DefaultHttpClient(params2);

// params are a bunch of post params about 5 of them.

HttpPost post = new HttpPost(baseURL);
post.setEntity(getPostContent(params));
client.execute(post);


The timing for this look like below.

11-16 08:10:50.709: VERBOSE/SG Log verb(332): Call complete 5753
11-16 08:10:50.979: VERBOSE/SG Log verb(332): Call complete 271
11-16 08:10:51.099: VERBOSE/SG Log verb(332): Call complete 114
11-16 08:10:51.319: VERBOSE/SG Log verb(332): Call complete 221
11-16 08:10:51.419: VERBOSE/SG Log verb(332): Call complete 97
11-16 08:10:51.579: VERBOSE/SG Log verb(332): Call complete 165
11-16 08:10:51.689: VERBOSE/SG Log verb(332): Call complete 106
11-16 08:10:51.849: VERBOSE/SG Log verb(332): Call complete 161

Any help is much appreciated!

-- 

3. ACTION_PHONE_STATE_CHANGED broadcast doesn't fire my broadcast receiver

4. Mms reopen problem?

5. very most powerful information health information

6. ERROR/AndroidRuntime(584): java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.provider.Telephony.SPN_STRINGS_UPDATED

7. XmlPullParserException: unexpected type