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. Get MediaScanner current status

Dear all,

My Android application has a broadcast receiver that receives
mediascanner start and finished intents.
Now I'd like to know if it's also possible to do a syncronous request
to the mediascanner to know its current status (if it's still scanning
or not).
I need this because if my application starts during a scan I cannot
know the mediascanner status until I receive one of the two intents.

Is this possible?

Thank you.

mrA

-- 

2. How to increase...?

Hi,
       How can we increase the height of title bar.




Regards,
abhilash.b

-- 

3. OOT: Perkenalan Diri + WTA: What Should I Do with My HD2?

4. Detect Codec of local media File

5. Market Comments, Top 3, Faking Of, Benefits Of

6. GPS MapView: animate to current position

7. Robin Talwar wants to chat