[android-beginners] Re: Design question: Activity per screen or not

2010-02-03 Thread Smelly Eddie
David - a few thoughts. Each screen should be a new activity. The cost of creating a new class is about 2 minutes and 4kb. The benefits are numerous. 1) Rely on xml layouts without custom if this screen than that or if that screen then this 2) Avoid complex logic and bloated classes. In

[android-beginners] Re: Application Idea, Need Assistance

2009-12-31 Thread Smelly Eddie
A few thoughts; 1 - contacts: have you considered reusing the contacts API, or activity, I think it would provide for a more robust and familiar user experience allowing users to pull from their phone's contacts which are also maintained online (gmail) rather than maintaining 2 distinct set of

[android-beginners] Re: Learning from Mark Murphy's book - threading question

2009-12-31 Thread Smelly Eddie
alexk-il You should not be spawning threads yourself, as it is against Android best practices. Instead look at ASyncTask, which provides methods for pre-execute, onUpdate, and postExecute, and are automagically handled by the Activity manager, so you don;t need to worry about killing them in

[android-beginners] Re: Alertdialog with a custom view

2009-12-18 Thread Smelly Eddie
Thorsten: Create a layout that includes the buttons, images and text as you would like them to appear. Then in your activity create a method to display the layout you ahve made. I am including to examples. The first just shows an icon and text, and the second shows text and 3 buttons. ---

[android-beginners] Re: including an XML-defined layout in another XML-defined layout

2009-12-07 Thread Smelly Eddie
I found this article when i was lookling to reuse view elements. http://www.curious-creature.org/2009/02/25/android-layout-trick-2-include-to-reuse/ essentially you can reuse layouts in a master layout by including; include android:id=@+id/cell1 layout=@layout/ workspace_screen / On

[android-beginners] Re: concept: app that pulls data from a website

2009-12-07 Thread Smelly Eddie
SG If you have been to the market recently you should not be surprised that many 'silly' apps get quite popular. So 'worth' is a objective question; - will it enhance your java and android knowledge and experience? - will you enjoy and use the finished product? - do you pursue more in life than

[android-beginners] Re: HTML sanitization

2009-12-04 Thread Smelly Eddie
You should try looking around the reference docs or searching for html.. http://developer.android.com/reference/android/text/Html.html import android.text.Html; (example turning raw html into a html enabled text view) synopsis = (TextView) findViewById(R.id.synopsis);

[android-beginners] Re: Noob Question

2009-12-02 Thread Smelly Eddie
5 minutes is excessive - but that is likely your device... on my device running Fedora 64 it takes about 45 seconds before I see the home screen, and my app starts up just after. Typically I use the device manager to start the emulator before I start debugging. this way it is ready and waiting

[android-beginners] Re: Tab views, onStart() ???

2009-11-22 Thread Smelly Eddie
, Thanks Eddie. On Nov 20, 10:18 am, Smelly Eddie ollit...@gmail.com wrote: Hmmm.. If only the documentation clearly outlined some sort of 'onTabChanged' listener well that would be exactly what you need. Shame that the SDK reference doesn't have

[android-beginners] Re: Tab views, onStart() ???

2009-11-20 Thread Smelly Eddie
Hmmm.. If only the documentation clearly outlined some sort of 'onTabChanged' listener well that would be exactly what you need. Shame that the SDK reference doesn't have a pge liek this one, http://developer.android.com/reference/android/widget/TabHost.OnTabChangeListener.html that

[android-beginners] Re: detect if there is a connection to internet

2009-11-15 Thread Smelly Eddie
You can use ConnectivityManager and check the returned networkinfo object. http://developer.android.com/reference/android/net/NetworkInfo.html On Nov 15, 4:32 am, Marton Kodok pentiu...@gmail.com wrote: Hello, I want to detect if there is a connection to Internet before launching a webview.

[android-beginners] Re: R.java sometimes doen not refresh itself in eclipse

2009-10-14 Thread Smelly Eddie
I may be mistaken, but if you run a clean on the project it should regenerate all the generated java files, namely R. On Oct 13, 11:57 pm, jax jackma...@gmail.com wrote: I have notices that R.java sometimes noes not refresh when I edit (and save) an XML file.  The only way I have been able

[android-beginners] Re: Arch Linux 64-bit install

2009-09-18 Thread Smelly Eddie
Hey Lee I am running Ubuntu on a 64bit AMD machine without issues. I am using the 64bit version of eclipse with the 32bit version of android sdk(1.5). no issues at all. Though the new sdk 1.6 is out with better screen support (woohoo!) http://developer.android.com/sdk/1.6_r1/index.html On

[android-beginners] Re: How to Call Browser Activity

2009-09-08 Thread Smelly Eddie
://...;)); startActivity(i); On Mon, Sep 7, 2009 at 4:51 PM, Smelly Eddie ollit...@gmail.com wrote: I am reading through the SDK on Android .com and I am having trouble just finding an example using an intent to invoke a browser activity. I want to send the user to a specific URL. String authUrl = http

[android-beginners] How to Call Browser Activity

2009-09-07 Thread Smelly Eddie
I am reading through the SDK on Android .com and I am having trouble just finding an example using an intent to invoke a browser activity. I want to send the user to a specific URL. String authUrl = http://domain.com/login;; // bring the user to authUrl, e.g. open a web browser

[android-beginners] Re: a problem with connection Http

2009-09-06 Thread Smelly Eddie
Can you access the web with the emulator? I get hostname can not be resolved errors in similar code as above. Do I specify my pc as a proxy or something? On Jul 22, 11:16 am, Justin (Google Employee) j...@google.com wrote: My guess is you are using the emulator here. To the emulator,

[android-beginners] Using Alarm Service - Getting Started

2009-06-22 Thread Smelly Eddie
I am just getting into android and had a question about leveraging the alarm service. My application consists of one activity, setting a time. I want to then pass that time to the system's alarm, and have it add a message to the notification bar at that time. I have read the design guidelines