[android-developers] Re: Layout with ScrollView and TextView

2010-04-05 Thread andrej sarkic
Thanks, I will take a look.

I would still like to understand though, how this layout works,
because it seems to me it contradicts what the documentation states.
At least my reading of it, and I'm sure I'm probably missing
something. I should not have to set a minHeight, which is in pixels,
which kinda of defeats the purpose of fill_parent.

Thanks,
Andrej

On Apr 3, 2:14 am, ABhi abhishek.gonda...@gmail.com wrote:
 Hi,

 If i understood your requirement correctly then your problem can be
 resolved by 'AndroidsFortune' application's source code. The guys has
 done wonderful job by having both horizontal and vertical scrolling
 for the TextView.

 Hope it helps you.

 Regards,
 Abhishek

 On Apr 2, 2:13 am,andrejsarkic andrej.sar...@gmail.com wrote:

  Hi all,

  I want to have a textview (like a console or output window), which
  scrolls. I saw on this list that the TextView will not scroll on its
  own unless I wrap it in a ScrollView. So I did that and it worked. The
  problem is, it seemed no matter what I did I could not get the
  TextView to be higher than one line. This was only when it was
  embedded in the ScrollView, and didn't seem to change whatever I set
  the TexView's layout_height to. Here is my layout:

  ?xml version=1.0 encoding=utf-8?
  LinearLayout
    xmlns:android=http://schemas.android.com/apk/res/android;
    android:layout_height=fill_parent
  android:layout_width=fill_parent android:orientation=vertical

  ScrollView android:id=@+id/ScrollView02
  android:layout_width=fill_parent android:layout_height=1.0dp
  android:layout_weight=1.0

  TextView android:id=@+id/TextView01
  android:layout_width=fill_parent
  android:layout_height=fill_parent/TextView
  /ScrollView
  /LinearLayout

  Adding android:text=some text android:minHeight=50dp  finally did
  the trick! But, I would still like to understand why I had to do this.
  It seemed like setting layout_height to fill_parent should be
  enough, shouldn't it?

  What am I missing here?

  Thanks,
 Andrej

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Layout with ScrollView and TextView

2010-04-03 Thread ABhi
Hi,

If i understood your requirement correctly then your problem can be
resolved by 'AndroidsFortune' application's source code. The guys has
done wonderful job by having both horizontal and vertical scrolling
for the TextView.

Hope it helps you.

Regards,
Abhishek

On Apr 2, 2:13 am, andrej sarkic andrej.sar...@gmail.com wrote:
 Hi all,

 I want to have a textview (like a console or output window), which
 scrolls. I saw on this list that the TextView will not scroll on its
 own unless I wrap it in a ScrollView. So I did that and it worked. The
 problem is, it seemed no matter what I did I could not get the
 TextView to be higher than one line. This was only when it was
 embedded in the ScrollView, and didn't seem to change whatever I set
 the TexView's layout_height to. Here is my layout:

 ?xml version=1.0 encoding=utf-8?
 LinearLayout
   xmlns:android=http://schemas.android.com/apk/res/android;
   android:layout_height=fill_parent
 android:layout_width=fill_parent android:orientation=vertical

 ScrollView android:id=@+id/ScrollView02
 android:layout_width=fill_parent android:layout_height=1.0dp
 android:layout_weight=1.0

 TextView android:id=@+id/TextView01
 android:layout_width=fill_parent
 android:layout_height=fill_parent/TextView
 /ScrollView
 /LinearLayout

 Adding android:text=some text android:minHeight=50dp  finally did
 the trick! But, I would still like to understand why I had to do this.
 It seemed like setting layout_height to fill_parent should be
 enough, shouldn't it?

 What am I missing here?

 Thanks,
 Andrej

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

To unsubscribe, reply using remove me as the subject.