A little background info: I am a C++ developer who has worked very little with Java. Picking up Java wasn't very difficult since I know C++, but I am still playing around with the SDK. (In C++, my favorite SDK/API is Qt)
Anyway, I am trying to stick to the Model-View-Controller design philosophy, and was setting up the UI in XML. However, it is not working out the way I wanted it too. I am trying to write a simple app (to help get started with learning the SDK), where there are 4 buttons, all of which cause a different operation on a value in a textview. For example, the textview starts out at 100, and I have 4 buttons: +1, -1, +5, -5. When you press +1, it adds 1 to the value in the textview. When you press -5, it subtracts 5 from the value in the textview, etc etc...
That part is working fine, the buttons are doing what they need to do, however, I am trying to setup the UI as follows:
Basically, I want all the "+ buttons" in one column, and all the "- buttons" in another column. I figured I would use a relativeLayout, however, it is not working the way I want it to. I am getting the following:
(the -1 button is totally missing)
I have tried to narrow down possible errors in my code, and I have come to the conclusion that either I am using android:layout_toRightOf wrong, or I misunderstand how this command is implemented.
Here is my main.xml file:
(note: bu1p = button for +1, bu1m = button for -1 [p=positive m=minus]. I also have a custom button in there, so there are really 6 buttons in total)
(Sorry for the weird tab formatting, it didn't copy over correctly from Eclipse)
Again, just to clarify, this is how I want the UI to look:
(c is the custom value)
Any help is greatly appreciated. I am not even sure a relative layout is the best way to accomplish this task.