Alright, I'm majorly stumped here... All I am trying to do is make a ScrollView scroll to the bottom of the TextView when the activity is launched.
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <ScrollView android:id="@+id/currScroll" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="380px" android:background="#ffffff"> <TextView android:id="@+id/currConversation" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textColor="#000000" android:background="#ffffff" android:textSize="18sp" /> </ScrollView> <Button android:id="@+id/sendMessage" android:layout_column="0" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/new_message" /> </LinearLayout> And here is the code...: @Override public void onResume() { super.onResume(); ScrollView currScroll = (ScrollView) findViewById(R.id.currScroll); currScroll.fling(-10000); Toast.makeText(this, "Max: " + currScroll.getMaxScrollAmount(), Toast.LENGTH_LONG).show(); } The text is being added to currConversation dynamically in the onCreate function using setText().The problem seems to be that no matter how much text is in the TextView getMaxScrollAmount() always returns 0. I have tried scrollTo(), scrollBy(), fullScroll()!!!!!! Any help is greatly appreciated! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---