Scrollview not working in my Android 2.2 emulator?

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Scrollview not working in my Android 2.2 emulator?

Postby cyberpine » Mon Sep 06, 2010 6:37 pm

Am I missing something ? This main.xml does not produce a scrollbar in my 2.2 emulator and I also tried the up and down keys. Text just stops at bottom of page. Have not tested on phone.

Thanks.

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"  
  3.    android:orientation="vertical"  
  4.    android:layout_height="wrap_content"    
  5.    android:layout_width="fill_parent">  
  6.        
  7. <ScrollView    
  8.        android:id="@+id/ScrollView01"  
  9.      android:layout_height="100px"    
  10.      android:layout_width="fill_parent">  
  11.            
  12.        <TextView    
  13.       android:id="@+id/TEXT_VIEW"    
  14.       android:layout_height="wrap_content"    
  15.       android:layout_width="wrap_content"    
  16.       android:text="Nothing" />  
  17.  
  18.  </ScrollView>
  19.  
  20. </RelativeLayout>  
Parsed in 0.002 seconds, using GeSHi 1.0.8.4


loading as such:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.        TextView tv = new TextView (this);
  2.         tv.setText ("\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye\nhello\nxxxx\nGoodbye");
  3.         setContentView (tv);
  4.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
cyberpine
Junior Developer
Junior Developer
 
Posts: 10
Joined: Mon Sep 06, 2010 1:56 pm

Top

Re: Scrollview not working in my Android 2.2 emulator?

Postby cyberpine » Mon Sep 06, 2010 6:51 pm

disregard. duh.. lol
cyberpine
Junior Developer
Junior Developer
 
Posts: 10
Joined: Mon Sep 06, 2010 1:56 pm

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 3 guests