[android-beginners] Re: How do I set the value of an EditText

2009-03-21 Thread Tseng
An error message would be helpful Otherwise it's hard to help you, other than "guessing" what could be the reasons for it. Maybe you haven't set the ID correctly, using a wrong ID (which doesn't even exist in the XML Layout file) or you're using setContentView/setView after you have using "fi

[android-beginners] Re: How do I set the value of an EditText

2009-03-28 Thread Tseng
Hehe, yep, that's the most common error beginers make when start with android and i already mentioned it in my post above ^^ On Mar 26, 2:41 pm, Lovedumplingx wrote: > Holy Mother Dogfood!!! > > I am quite possibly an idiot (that's the second time I'm saying this > today)!  Wow.  So simple and y

[android-beginners] Re: Why Prefer Virtual Over Interface?

2009-04-05 Thread Tseng
For performance reasons. If you're using the interface reference, the interface needs to be converted to the right underlying type (in the developer guide on android.com from a general Map to HashMap, so basically it's a similar to doing ((HashMap)myMap1).anyMethod(...)). It may be ok, if you use

[android-beginners] Re: Why Prefer Virtual Over Interface?

2009-04-05 Thread Tseng
P.S. Forgot to mention: it's not as simple as casting it to the right type ((HashMap).myMap1).someMethod(...), but it's the need of refactoring to determinate the correct type of the underlying impelementation which is quite costly operation in terms of CPU cycles On Apr 3, 10:04 am, OT wrote: >

[android-beginners] Re: Guide for Dummies? Absolutely new ne to programming.

2009-04-05 Thread Tseng
Yep, Java should be the first step you should do before starting Android development. Technically it's not java which is used on android, because Android use it's own Virtual Machine called Dalvik virtual machine (DalvikVM) to execute the compiled bytecode on the phone, while Java uses the Java v

[android-beginners] Re: EditText

2009-06-15 Thread Tseng
http://developer.android.com/reference/android/view/View.OnLongClickListener.html Implement an View.OnLongClickListener and set it to your EditText via EditText txt = (EditText)findViewById(R.id.your_edittext_id); ... txt.setOnLongClickListener(...) Check out http://tseng-blog.nge-web.net/blog

[android-beginners] Re: XML Layout Language

2009-06-15 Thread Tseng
ng I read now is vague. There are no common tags in XML (unlike in HTML or X-HTML which are subclasses of XML). In case of android every subclass of View can be an Element. You can even create your own subclasses of View and use them in the layout XML files. You can check for some very basics at

[android-beginners] Re: App Idea for your consideration

2009-02-26 Thread Tseng
I doubt there will be enough Halo Gamers which are Halo 3 players AND owners of Android enabled Phone in order to make this application worthwhile. On Feb 24, 5:25 pm, Myr Herder wrote: > If anyone needs an idea for an app to write, might I suggest one that > gathers information from Bungie.net'

[android-beginners] Re: How to access LInux shell command from GUI interface with root permission

2009-02-26 Thread Tseng
Don't start deveral new posts, one is enough. Basically you can't do it. However in R29 Firmware there was an bug, which allowed commands to be executed. But this was an bug/exploit and should not be used as basic for a programm to work as it was already fxied in R30 or R31. So only phones with t

[android-beginners] Re: How to access Linux using Android SDK?

2009-02-26 Thread Tseng
Well, first off: >From the SDK/Framework (read: from within your Android Application) itself there is no way to access the underlaying Linux commands directly if i understand it correctly. If you want to access the shell of your Emulator or DevG1 Phone, you could do it with the "adb shell" comman

[android-beginners] Re: How to pass data between forms?

2009-02-26 Thread Tseng
Depends. SessionState sounds like it's a class which extends BaseSavedState (which is used to preserve states of an widget). For example private static class SavedState extends BaseSavedState { long contactId; public SavedState(Parcel source) { su

[android-beginners] Re: Download of Android Eclipse plugin: 404 Not Found

2009-02-27 Thread Tseng
If you're having problem, simply try using normal http instead of https like https://dl-ssl.google.com/android/eclipse/ On Feb 26, 9:26 am, "Klaus, GPSies.com" wrote: > Hi, > > I'm trying to download the Eclipse plugin > from:https://dl-ssl.google.com/android/eclipse/ > and I'm getting a 404. >

[android-beginners] Re: Building apps for Java supported mobiles

2009-02-27 Thread Tseng
Well, depends on your application. Basically you can have general classes which don't use specific API calls. For example XMLparsers or some calculation/algoryth functions. The UI elements need completely be rewritten if you're porting it to android. Maybe even some underlying things too (like ex

[android-beginners] Re: Problem with AutoCompleteTextView and SimpleCursorAdapter

2009-03-03 Thread Tseng
You don't have to create your own XML file if you're just want to display a one-liner dropdown menu. Instead better to use the already defined one in the android resources. Basically you can leave the auto_complete.xml, as it's not used anyways in your code (unless you want to design your own drop

[android-beginners] Re: How to format time in millis to human readable?

2009-03-06 Thread Tseng
I wouldn't really use this method to be honest. Even the Android Documentation sugest to use native methods, instead of writing your own stuff for methods which are already available (i.e. simple date formating). [Use Native Methods] http://developer.android.com/guide/practices/design/performance

[android-beginners] Re: EditText appearance

2009-03-11 Thread Tseng
You could create a colorstate list (xml file in res/drawable), for example http://developer.android.com/reference/android/content/res/ColorStateList.html Here is an example i used for textcolors. Should work for HintColors too! res/drawabale/myedittextcolors.xml: http://schemas.android.com/apk

[android-beginners] Re: Intents and Activities

2009-03-11 Thread Tseng
Yea, Intents are kind of events. You can use them to call or communicate with other Activities or Applications. And you can add extra data (Intent.putExtra(...)) to send data to other activities On Mar 10, 9:06 pm, Lovedumplingx wrote: > Don't know if this went through last time so I'll post ag