i just realized it totally looks like he’s winking
(Source: sleepysamurai)
So, this warning was plaguing me for a while:
ActivityManager: Warning: Activity not started, its current task has been brought to the front
“What is this crap?” I thought. “Why won’t the emulator start?!”
Then I looked down at my G1, which I had plugged in to my computer via USB to charge, and realized that my app was already running on my phone. I have no idea how this happened. Eclipse just found my phone plugged in and handed it the app, which it happily ran. Too effing cool!
“Hello world” achieved! I’m calling it a night.
Ugh, I guess I will assent to working with XML to the extent that it is necessary. Why would you use XML for an intra-IDE data format?! For God’s sake, it’s an IDE! The data format can be whatever you want! Just make the interface not suck, and—oh. Well, there’s my answer.
The raw basics for layout actually aren’t bad:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/MyColor"
> <EditText android:id="@+id/EditText01" android:layout_height="wrap_content" android:layout_width="fill_parent" android:inputType="numberSigned|numberDecimal"></EditText> <RadioGroup android:id="@+id/RadioGroup01" android:layout_width="wrap_content" android:layout_height="wrap_content"> <RadioButton android:id="@+id/RadioButton01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/celsius" android:checked="true"></RadioButton> <RadioButton android:id="@+id/RadioButton02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/fahrenheit"></RadioButton> </RadioGroup> <Button android:id="@+id/Button01" android:layout_height="wrap_content" android:onClick="@string/buttonHandler" android:layout_width="wrap_content" android:text="@string/calc"></Button> </LinearLayout>
I’m sure it gets hairier once you start building really complex and functional interfaces, but this doesn’t have any of the bloat that usually makes me terrified of XML. Also, I like the way it separates constants like strings and colors from the actual layout by letting you reference an XML file (as in android:text=”@string/someconstant”). I wonder how much of this is Eclipse, how much of it is Eclipse Helios, and how much of it is the Android SDK.
My Development Platform: Windows XP SP3
My Testing Device: G1 with CyanogenMod-4.2.15.1 (running Android 1.6)
This is mostly a summary of what I found here and here.
I’ve never done Java development, nor any development with any IDEs, so this was kind of a hassle. I predict that I’m going to hate working without a command line.