Re: [android-developers] Align ListView to the right

2012-07-26 Thread Nadeem Hasan
Lim, > You are looking at the wrong place. What you should worry about is the > alignment (gravity) of the list item not the listview itself. Make the > listview layout_width=match_parent with a layout_marginRight=100dp right > margin. Then for the textview of your listitem, set > layout_widt

Re: [android-developers] Align ListView to the right

2012-07-26 Thread Nick Fedesna
The margin and alignment settings on the ListView only apply to where the listview is positioned in the Relative Layout. To control how the text appears in the ListView's individual items, you'll need to alter the properties on the TextView provided for the list items via the Adapter. -- You

Re: [android-developers] Align ListView to the right

2012-07-25 Thread Aprido Sandyasa
Because you are measuring from the left so u are using : android:layout_alignParentLeft="true" but if you are measuring from the right so you using : android:layout_alignParentRight="true" -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To

Re: [android-developers] Align ListView to the right

2012-07-25 Thread limtc
Thanks! I will try it later - I am now reading your code. I am just wondering why aligning the ListView to the right of the screen is android:layout_alignParentLeft="true" Shouldn't this be layout_alignParentRight? Probably this is where my confusion come from. 在 2012年7月25日星期三UTC+8下午9时

Re: [android-developers] Align ListView to the right

2012-07-25 Thread Aprido Sandyasa
oh, one more thing. for the java you have added the list into the activity and change like this: import java.util.ArrayList; import android.os.Bundle; import android.app.ListActivity; import android.view.Menu; import android.widget.ArrayAdapter; public class MainActivity extends ListActivity {

Re: [android-developers] Align ListView to the right

2012-07-25 Thread Aprido Sandyasa
Your problems is not on the java because the src just called the xml layout. Setting at xml layout(left or right, top or bottom) if you can't manually just drag and drop at tab "graphical layout" >> if you using eclipse to program android application here is the code of the xml layout: http://sch

Re: [android-developers] Align ListView to the right

2012-07-24 Thread limtc
Hi, probably it is my problem not yours. I really appreciate you are trying to help. I am not looking into justification within the listview, but the listview within the container (activity). Here's my activity: public void onCreate(Bundle savedInstanceState) { super.onCreate(saved

Re: [android-developers] Align ListView to the right

2012-07-24 Thread Justin Anderson
> > So, you want something like this? > > < List View Width > > - > | <- List Item -> xx| <- 100dp -> | > --| | > | <- List Item -> xxx|

Re: [android-developers] Align ListView to the right

2012-07-24 Thread Justin Anderson
Maybe I'm just thick-headed (it's been known to happen before), but I'm still not getting what you are wanting. You just aren't providing enough information. So, you want something like this? < List View Width > - | <- List Ite

Re: [android-developers] Align ListView to the right

2012-07-24 Thread limtc
Hi, A list view (with some items), hanging on the right. The list view is 100dp distance away from the right of the device. [ <-100 -> ] 在 2012年7月24日星期二UTC+8下午9时29分21秒,MagouyaWare写道: > > First option (entire list view on the right, with 100dp right margin). >> > >

Re: [android-developers] Align ListView to the right

2012-07-24 Thread Justin Anderson
> > First option (entire list view on the right, with 100dp right margin). > That is not the first option I proposed... The first option I proposed was 100dp margin on the left. I still can't picture exactly what it is you are wanting. Can you create a basic diagram of what you want this to look

Re: [android-developers] Align ListView to the right

2012-07-24 Thread limtc
First option (entire list view on the right, with 100dp right margin). 在 2012年7月24日星期二UTC+8下午8时50分29秒,MagouyaWare写道: > > Hi Lim, > > I have done many list views so I'm sure I can help, but from the way you > phrased your question I don't fully understand what you are trying to > accomplish: > >

Re: [android-developers] Align ListView to the right

2012-07-24 Thread Justin Anderson
Hi Lim, I have done many list views so I'm sure I can help, but from the way you phrased your question I don't fully understand what you are trying to accomplish: 1. Move the entire list view over to the right, with a space of 100dp on the left? 2. Right-align the text of each list view

Re: [android-developers] Align ListView to the right

2012-07-24 Thread 泰前 林
Align left is not the problem… wanted to align to the right! :) I don't want it to align left (which is the default behavior). Lim Thye Chean Virtual GS 在 24 Jul, 2012,7:19 PM,bharadwaj 写道: > > > On Tue, Jul 24, 2012 at 12:40 PM, limtc wrote: > This is supposedly a simple question - but I

Re: [android-developers] Align ListView to the right

2012-07-24 Thread Jadranko Bodiroga
try tu put : android:layout_marginLeft="300dp" I think that will help -- 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

Re: [android-developers] Align ListView to the right

2012-07-24 Thread bharadwaj
On Tue, Jul 24, 2012 at 12:40 PM, limtc wrote: > This is supposedly a simple question - but I have been testing the whole > morning, searching and test all suggestions, but I can't seem to get it > right. Please help! > > All I wanted is to align the ListView to the right (with 100dp blank > spac

Re: [android-developers] Align ListView to the right

2012-07-24 Thread Aprido Sandyasa
U should tell me the error is so i can tell what kind of error and what is the problem do u have -- 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 th

Re: [android-developers] Align ListView to the right

2012-07-24 Thread Aprido Sandyasa
ListView is the container, so if u want to view the text on the list u have to added a textview -- 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 thi

Re: [android-developers] Align ListView to the right

2012-07-24 Thread Aprido Sandyasa
What kind of error did u had? -- 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

Re: [android-developers] Align ListView to the right

2012-07-24 Thread limtc
Does not understand. Why do we want to add in another TextView? The original layout has no text view. 在 2012年7月24日星期二UTC+8下午4时50分25秒,Aprido Sandyasa写道: > > http://schemas.android.com/apk/res/android"; > android:background="@drawable/background" > android:layout_width="fill_parent" > a

Re: [android-developers] Align ListView to the right

2012-07-24 Thread limtc
This does not work. In fact there is an error as the layout_marginRight was specified twice. 在 2012年7月24日星期二UTC+8下午4时52分41秒,Aprido Sandyasa写道: > > or you can try this on out: > > http://schemas.android.com/apk/res/android"; > android:background="@drawable/background" > android:layout_wid

Re: [android-developers] Align ListView to the right

2012-07-24 Thread Aprido Sandyasa
or you can try this on out: http://schemas.android.com/apk/res/android"; android:background="@drawable/background" android:layout_width="fill_parent" android:layout_height="wrap_content"> -- You received this message because you are subscribed to the Google Groups "Android

Re: [android-developers] Align ListView to the right

2012-07-24 Thread Aprido Sandyasa
http://schemas.android.com/apk/res/android"; android:background="@drawable/background" android:layout_width="fill_parent" android:layout_height="wrap_content"> try this and hope this will help ya :D -- You received this message because you are subscribed to the Google