diff options
author | Artur Dryomov <artur.dryomov@gmail.com> | 2013-09-11 01:17:51 +0300 |
---|---|---|
committer | Artur Dryomov <artur.dryomov@gmail.com> | 2013-09-11 01:43:54 +0300 |
commit | 06b632f0d367178b7266e50c6f140ef36984733f (patch) | |
tree | 7b6cc83b0ca55644d08a85a50940a87690c2e9eb /android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java | |
parent | 5dd70c5c9b3e8cc7313285c2eae31b8d4f7a8d60 (diff) |
Fix notes jumps.
* Remove empty spaces not reset while changing text via TextSwitcher.
* Scroll notes to the top on changes because outer ScrollView remembers
current position not respecting TextSwitcher state of course.
Change-Id: I3e9ba458e4ce6b13e5b02675ca28d6c7c5829f00
Diffstat (limited to 'android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java')
-rw-r--r-- | android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java b/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java index aa86de07e5e4..29de2940ed1b 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java +++ b/android/sdremote/src/org/libreoffice/impressremote/fragment/SlidesPagerFragment.java @@ -24,6 +24,7 @@ import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.ScrollView; import android.widget.TextSwitcher; import com.actionbarsherlock.app.SherlockFragment; @@ -143,6 +144,7 @@ public class SlidesPagerFragment extends SherlockFragment implements ServiceConn if (areSlideNotesAvailable(aSlideIndex)) { showSlideNotes(aSlideIndex); + scrollSlideNotes(); } else { hideSlideNotes(); @@ -172,6 +174,12 @@ public class SlidesPagerFragment extends SherlockFragment implements ServiceConn return (TextSwitcher) getView().findViewById(R.id.text_switcher_notes); } + private void scrollSlideNotes() { + ScrollView aSlideNotesScroll = (ScrollView) getView().findViewById(R.id.scroll_notes); + + aSlideNotesScroll.scrollTo(0, 0); + } + private void hideSlideNotes() { TextSwitcher aSlideNotesSwitcher = getSlideNotesSwitcher(); |