Re: [android-developers] Layout text justificaiton question:
This is my latest attempt to get what I want. It still doesn't work, unfortunately. ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=match_parent android:layout_height=match_parent EditText android:id=@+id/inputEdit android:layout_height=wrap_content android:layout_width=400dp android:width=400dp android:inputType=numberSigned|numberDecimal android:layout_alignParentRight=true android:layout_centerVertical=true android:layout_marginLeft=0dip android:layout_marginRight=0dip /EditText Spinner android:id=@+id/inputSpinner android:layout_height=wrap_content android:layout_width=400dp android:width=400dp android:layout_alignParentRight=true android:layout_centerVertical=true android:layout_marginLeft=0dip android:layout_marginRight=0dip/ TextView android:id=@+id/editLabelTV android:layout_height=wrap_content android:layout_width=wrap_content android:gravity=right android:layout_centerVertical=true android:layout_toLeftOf=@id/inputEdit android:layout_marginLeft=0dip android:layout_marginRight=0dip/ TextView android:id=@+id/spinLabelTV android:layout_height=wrap_content android:layout_width=wrap_content android:gravity=right android:layout_centerVertical=true android:layout_toLeftOf=@id/inputSpinner android:layout_marginLeft=0dip android:layout_marginRight=0dip/ /RelativeLayout In an attempt to be able to use the toLeftOf property, I created another label, and hide both the extra label and unused control. I'm still getting the same result. This is kindof what I'm getting, now: Input 1:__ Another Input: __ Input Three: __ Where all the input controls are lined up, right, but the labels are pretty much centered in the remaining room. I feel like I'm missing something simple, because it doesn't seem like this should be so difficult. -Mark On Thursday, March 1, 2012 6:21:57 PM UTC-6, TreKing wrote: On Thu, Mar 1, 2012 at 5:33 PM, Mark Winchester wrote: I can get the text/spinners lined up correctly by setting the width of the TextView, but the text on the TextView doesn't bump up against the input controls, like I want it to. Can anybody suggest a way to get this looking like I'm wanting? What does it do now? What does your code / layouts look like right now that does not work? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Layout text justificaiton question:
On Fri, Mar 2, 2012 at 9:11 AM, Mark Winchester mwinches...@gmail.comwrote: Where all the input controls are lined up, right, but the labels are pretty much centered in the remaining room. I feel like I'm missing something simple, because it doesn't seem like this should be so difficult. Seems to me that you need either a Table, with two columns, or probably even simpler, Three LinearLayouts: - A root parent (horizontal) - A left child for your inputs, with right gravity to move its children to the right - A right child for your labels Some crude ascii art: --- | |-|---| | | | Input 1 | ___ | | | | Another Input | ___ | | | |-|---| | --- Feel me? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Layout text justificaiton question:
I've got a GUI coded up, and it works pretty well, but I'm having an issue getting everything formatted just right. Currently, there exists a ListView on the page. This list view is then filled with horizontal LinearLayouts that have a TextView (label) a either an EditText or Spinner, depending on the type of input. When I populate the list, I'm setting the visibility of the unused control to GONE, so that only the correct control appears on the screen. What I'm having trouble with, is that I'd like for the left edge of the text/spinners to be lined up, down the list, and the labels to appear right justified next to them. I can get the text/spinners lined up correctly by setting the width of the TextView, but the text on the TextView doesn't bump up against the input controls, like I want it to. Can anybody suggest a way to get this looking like I'm wanting? Any help is appreciated. This is kindof like what I'm looking for: Input 1: __ Another Input: __ Input Three: __ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Layout text justificaiton question:
On Thu, Mar 1, 2012 at 5:33 PM, Mark Winchester mwinches...@gmail.comwrote: I can get the text/spinners lined up correctly by setting the width of the TextView, but the text on the TextView doesn't bump up against the input controls, like I want it to. Can anybody suggest a way to get this looking like I'm wanting? What does it do now? What does your code / layouts look like right now that does not work? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en