pakerfeldt / android-viewflow

A horizontal view scroller library for Android
1.78k stars 695 forks source link

Changes to viewflow adding features #74

Open Golgorz opened 12 years ago

Golgorz commented 12 years ago

Let me explain, the onscreen rotation changes didnt work for me and messes up the screens and titleflow. I added some changes to the viewflow.java to fix this issue:


public void onConfigurationChanged(Configuration newConfig) { if (newConfig.orientation != mLastOrientation) { mLastOrientation = newConfig.orientation; //added this line: setSelection(getSelectedItemPosition()); getViewTreeObserver().addOnGlobalLayoutListener(orientationChangeListener); } }


also, i wanted the titles to be clickable, i know other project did this, but i already have done everything with pakerfeldt library and just dont want to change all, so i coded the on title click featuer (just for the next right and left titles) if interested i can post my solution.

thanks to all, and sorry if this all is useless

shimiuh commented 11 years ago

yes pleas post solution for on title click featuer thanks

shimiuh commented 11 years ago

what is 1.getSelectedItemPosition() 2.getViewTreeObserver() 3.orientationChangeListener