Scrollable text widgets?

by jski » Thu, 05 Mar 2009 01:32:53 GMT


Sponsored Links
 I'm trying to get scrollable text widgets for a "chat" like app.  One
would be sued to view the chat history, the other would be used to
enter new messages in.  The ONLY way I ever got scrollable text
widgets to work is to use the ScrollView layout and place either a
EditText widget or a TextView widget inside of it. the The following
is my current best guess as how to do this the right way:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/widget271"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android=" http://schemas.android.com/apk/res/android" ;
<Button
android:id="@+id/ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="OK"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
</Button>
<ScrollView
android:id="@+id/widget278"
android:layout_width="319px"
android:layout_height="171px"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
<TextView
android:id="@+id/TV1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ff9999ff">
</TextView>
</ScrollView>
<ScrollView
android:id="@+id/widget281"
android:layout_width="319px"
android:layout_height="196px"
android:layout_below="@+id/widget278"
android:layout_alignParentRight="true"
<EditText
android:id="@+id/ET2"
android:textSize="18sp"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</EditText>
</ScrollView>
</RelativeLayout>

--~--~---------~--~----~------------~-------~--~----~



Scrollable text widgets?

by jski » Thu, 05 Mar 2009 01:32:53 GMT


 I'm trying to get scrollable text widgets for a "chat" like app.  One
would be sued to view the chat history, the other would be used to
enter new messages in.  The ONLY way I ever got scrollable text
widgets to work is to use the ScrollView layout and place either a
EditText widget or a TextView widget inside of it. the The following
is my current best guess as how to do this the right way:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/widget271"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android=" http://schemas.android.com/apk/res/android" ;
<Button
android:id="@+id/ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="OK"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
</Button>
<ScrollView
android:id="@+id/widget278"
android:layout_width="319px"
android:layout_height="171px"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
<TextView
android:id="@+id/TV1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ff9999ff">
</TextView>
</ScrollView>
<ScrollView
android:id="@+id/widget281"
android:layout_width="319px"
android:layout_height="196px"
android:layout_below="@+id/widget278"
android:layout_alignParentRight="true"
<EditText
android:id="@+id/ET2"
android:textSize="18sp"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</EditText>
</ScrollView>
</RelativeLayout>

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. How do I simulate the Home key programmatically?

You cannot simulate a press on the Home key.



> 

2. How to launch YouTube with specified keywords?

Dear All,

         

         I want launch the YouTube with specified video searching list at
startup(e.g I want YouTube shows the video list all related with the key
word "Susan" and "U.S" in the first page.)

        But The YouTube application is not open source in clair, would you
please tell me which YuTube API can implement this feature?

 

       Thanks,

 

Best Regards,

David

-- 

3. Spinner not displaying the selectedItem

4. Can static library is created by android 2.0 work at android 2.1?

5. Batere spica

6. Android for Robotica

7. Possible to Detect if OnResume is because Back button was hit?