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
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
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
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时
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 {
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
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
>
> So, you want something like this?
>
> < List View Width >
> -
> | <- List Item -> xx| <- 100dp -> |
> --| |
> | <- List Item -> xxx|
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
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).
>>
>
>
>
> 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
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:
>
>
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
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
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
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
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
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
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
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
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
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
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
23 matches
Mail list logo