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
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] 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 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] 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_width="fill_parent"
> android:layout_height="wrap_content">
>  android:dividerHeight="0dp"
> android:layout_marginTop="100dp"
> android:layout_marginRight="100dp"
> android:layout_width="wrap_content"
> android:layout_height="wrap_content"
> android:layout_marginRight="100dp" >
> 
>  

-- 
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] 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"
> android:layout_height="wrap_content">
>  android:dividerHeight="0dp"
> android:layout_marginTop="100dp"
> android:layout_marginRight="100dp"
> android:layout_width="wrap_content"
> android:layout_height="wrap_content"
> android:layout_alignParentRight="true" >
> android:id="@+id/myTxtList"
>android:layout_width="wrap_content"
>android:layout_height="wrap_content"
>android:layout_alignRight="@id/android:list"
> 
> 
>
> try this and hope this will help ya :D
>

-- 
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] 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.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

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 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] 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 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] 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
> space), and here's my current layout file:
>
> http://schemas.android.com/apk/res/android";
> android:background="@drawable/background"
> android:layout_width="fill_parent"
> android:layout_height="wrap_content">
>  android:dividerHeight="0dp"
> android:layout_marginTop="100dp"
> android:layout_marginRight="100dp"
> android:layout_width="wrap_content"
> android:layout_height="wrap_content"
> android:layout_alignParentRight="true" >
> 
> 
>
> I have tried different options, but the text in ListView keep align to the
> left!
>
> --
>

try this add  android:layout_marginleft="10dp" in  your list view...this
will align it to left...

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

-- 
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] 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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

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 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 space), 
> and here's my current layout file:
> 
> http://schemas.android.com/apk/res/android";
> android:background="@drawable/background"
> android:layout_width="fill_parent"
> android:layout_height="wrap_content">
>  android:dividerHeight="0dp"
> android:layout_marginTop="100dp"
> android:layout_marginRight="100dp"
> android:layout_width="wrap_content"
> android:layout_height="wrap_content"
> android:layout_alignParentRight="true" >
> 
>  
> 
> I have tried different options, but the text in ListView keep align to the 
> left!
> 
> -- 
> 
> try this add  android:layout_marginleft="10dp" in  your list view...this will 
> align it to left...
> 
> 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
> 
> 
> -- 
> 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

-- 
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] 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 item?
   3. Put a space of 100dp to the left of the text in each list view item?
   4. Some combination of the above?

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Tue, Jul 24, 2012 at 6:18 AM, 泰前 林  wrote:

> 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 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
>> space), and here's my current layout file:
>>
>> http://schemas.android.com/apk/res/android
>> "
>> android:background="@drawable/background"
>> android:layout_width="fill_parent"
>> android:layout_height="wrap_content">
>> > android:dividerHeight="0dp"
>> android:layout_marginTop="100dp"
>> android:layout_marginRight="100dp"
>> android:layout_width="wrap_content"
>> android:layout_height="wrap_content"
>> android:layout_alignParentRight="true" >
>> 
>> 
>>
>> I have tried different options, but the text in ListView keep align to
>> the left!
>>
>> --
>>
>
> try this add  android:layout_marginleft="10dp" in  your list view...this
> will align it to left...
>
>  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
>
>
>
> --
> 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
>
>
>  --
> 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
>

-- 
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] 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:
>
>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 item?
>3. Put a space of 100dp to the left of the text in each list view item?
>4. Some combination of the above?
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Tue, Jul 24, 2012 at 6:18 AM, 泰前 林  wrote:
>
>> 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 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 
>>> space), and here's my current layout file:
>>>
>>> http://schemas.android.com/apk/res/android";
>>> android:background="@drawable/background"
>>> android:layout_width="fill_parent"
>>> android:layout_height="wrap_content">
>>> >> android:dividerHeight="0dp"
>>> android:layout_marginTop="100dp"
>>> android:layout_marginRight="100dp"
>>> android:layout_width="wrap_content"
>>> android:layout_height="wrap_content"
>>> android:layout_alignParentRight="true" >
>>> 
>>>  
>>>
>>> I have tried different options, but the text in ListView keep align to 
>>> the left!
>>>
>>> -- 
>>>
>>
>> try this add  android:layout_marginleft="10dp" in  your list view...this 
>> will align it to left...
>>
>>  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
>>
>>
>>
>> -- 
>> 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
>>
>>
>>  -- 
>> 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
>>
>
>

-- 
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] 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 like
so I can visualize it?

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Tue, Jul 24, 2012 at 7:24 AM, limtc  wrote:

> 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:
>>
>>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 item?
>>3. Put a space of 100dp to the left of the text in each list view
>>item?
>>4. Some combination of the above?
>>
>> Thanks,
>> Justin Anderson
>> MagouyaWare Developer
>> http://sites.google.com/site/**magouyaware
>>
>>
>> On Tue, Jul 24, 2012 at 6:18 AM, 泰前 林  wrote:
>>
>>> 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 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
 space), and here's my current layout file:

 http://schemas.**
 android.com/apk/res/android
 "
 android:background="@drawable/**background"
 android:layout_width="fill_**parent"
 android:layout_height="wrap_**content">
 >>> android:dividerHeight="0dp"
 android:layout_marginTop="**100dp"
 android:layout_marginRight="**100dp"
 android:layout_width="wrap_**content"
 android:layout_height="wrap_**content"
 android:layout_**alignParentRight="true" >
 
 

 I have tried different options, but the text in ListView keep align to
 the left!

 --

>>>
>>> try this add  android:layout_**marginleft="10dp" in  your list
>>> view...this will align it to left...
>>>
>>>  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
>>>
>>>
>>>
>>> --
>>> 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
>>>
>>>
>>>  --
>>> 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
>>>
>>
>>  --
> 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
>

-- 
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] 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).
>>
>
> 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 
> like so I can visualize it?
>
>

-- 
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] 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 Item ->  xx|   <- 100dp ->   |
--| |
|  <- List Item -> xxx| |
 --| |
|  <- List Item -> xxx| |
 --| |
|  <- List Item ->   x| |
 --| |
|x| |
--| |
|  xxx| |
-
< Device Screen Width -->

Is that correct?

Thanks,
Justin

On Jul 24, 2012 7:40 AM, "limtc"  wrote:

> 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).
>>>
>>
>> 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
>> like so I can visualize it?
>>
>>  --
> 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

-- 
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] 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| |
>  --| |
> |  <- List Item -> xxx| |
>  --| |
> |  <- List Item ->   x| |
>  --| |
> |x| |
>  --| |
> |  xxx| |
>  -
> < Device Screen Width -->
>

Where the x's represent text of variable length?

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Tue, Jul 24, 2012 at 9:47 AM, Justin Anderson wrote:

> 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 Item ->  xx|   <- 100dp ->   |
> --| |
> |  <- List Item -> xxx| |
>  --| |
> |  <- List Item -> xxx| |
>  --| |
> |  <- List Item ->   x| |
>  --| |
> |x| |
> --| |
> |  xxx| |
> -
> < Device Screen Width -->
>
> Is that correct?
>
> Thanks,
> Justin
>
>
> On Jul 24, 2012 7:40 AM, "limtc"  wrote:
>
>> 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).

>>>
>>> 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
>>> like so I can visualize it?
>>>
>>>  --
>> 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
>
>

-- 
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] 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(savedInstanceState);
setContentView(R.layout.list);

String[] songs = getResources().getStringArray(R.array.videos); 
this.setListAdapter(new ArrayAdapter(this, R.layout.item, 
R.id.label, songs));
getListView().setDivider(null); 
}

The list.xml is what listed above, containing the list view that I wish to 
be align right to this activity, with a right margin of 100dp. 

Thanks for all the help you are trying to give to me, I am just not sure 
why I can't communicate this simple idea across to you (a list view on the 
right of the screen).

在 2012年7月24日星期二UTC+8下午11时47分28秒,MagouyaWare写道:
>
> 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.
>
>

-- 
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] 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://schemas.android.com/apk/res/android";
xmlns:tools="http://schemas.android.com/tools";
android:layout_width="fill_parent"
android:layout_height="fill_parent" >





and it is worked. try this, i have it testing on emulator and my device and
it is working normally

note: if you insist set the align right at 100 dp you have to change like
this:

http://schemas.android.com/apk/res/android";
xmlns:tools="http://schemas.android.com/tools";
android:layout_width="fill_parent"
android:layout_height="fill_parent" >






because measure align right or left at 100dp is the same for align center.

-- 
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] 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 {
int posisi = -1;
ArrayList list = new ArrayList();
ArrayAdapter myAdapter;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
myAdapter = new ArrayAdapter(this,
android.R.layout.simple_list_item_1, list);
setListAdapter(myAdapter);
list.add("Hello World");
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
}

-- 
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] 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时17分18秒,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://schemas.android.com/apk/res/android";
> xmlns:tools="http://schemas.android.com/tools";
> android:layout_width="fill_parent"
> android:layout_height="fill_parent" >
>
>  android:id="@android:id/list"
> android:layout_width="100dp"
> android:layout_height="100dp"
> android:layout_alignParentLeft="true"
> android:layout_alignParentTop="true"
> android:layout_marginLeft="80dp" >
> 
> 
>
> and it is worked. try this, i have it testing on emulator and my device 
> and it is working normally
>
> note: if you insist set the align right at 100 dp you have to change like 
> this:
>
> http://schemas.android.com/apk/res/android";
> xmlns:tools="http://schemas.android.com/tools";
> android:layout_width="fill_parent"
> android:layout_height="fill_parent" >
>
>  android:id="@android:id/list"
> android:layout_width="100dp"
> android:layout_height="100dp"
> android:layout_alignParentTop="true"
> android:layout_centerHorizontal="true" >
> 
>
> 
>  
> because measure align right or left at 100dp is the same for align center.
>

-- 
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] 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 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] 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 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] 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_width=match_parent and gravity=right. Justin and Nick tried to set 
> you on the right course but you ignored them.

 
Aprido,
 
Take a break. You thinking too fast and not helping him at all.

-- 
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