In this tutorial we’ll start making a useful Android unit conversion app. I’ll show you everything this time because I on purpose didn’t pre-plan anything.
I’ll cover relative layouts, grid layouts, array resources, Array Adapters, Spinners, and more. In the next video I’ll finish the entire app. Like always all the code follows the video below. If it is still the month of July 2014, don’t forget to sign up to win a Samsung Galaxy Note 3 in my current contest.
If you like videos like this it helps to share it on Google Plus with a click here [googleplusone]
Code From the Video
Use Case Description
activity_main.xml
MainActivity.java
conversion_types.xml
how to find conversion_types.xml
It is at the very bottom of the page
What is the difference between match_parent and fill_parent?
They do the same thing, but fill_parent has been deprecated and so it should not be used anymore
Just a quick note. I think the value of
android:layout_toRightOf=”@+id/convert_from_text_view”
that is in the <EditText should actually be
android:layout_toRightOf="@id/convert_from_text_view"
(without the +), because it's already listed as
android:layout_toRightOf="@+id/convert_from_text_view"
in the definition.
You may be right. Oddly I have never had a problem with doing that. I’ll look into it
i have spent an exhaustive amount of time on line 50(54) id will not populate. if i type it manually the text color stays black and underlined red.
Sorry, but I’m not sure which lines of code your are specifically talking about.