In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "Android how to achieve the background image sliding larger release rebound effect", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "Android how to achieve the background image sliding larger release rebound effect" bar!
Original drawing
After magnification
1. Custom view inherits ScrollView implementation effect
Public class HeadZoomScrollView extends ScrollView {whether the position where the private View mZoomView; private int mZoomViewWidth; private int mZoomViewHeight; private float firstPosition;// record was pressed for the first time is private boolean isScrolling;// scaling private float mScrollRate = 0.3f super / scaling factor. The larger the zoom factor is, the greater the change is. The larger the zoom factor is, the slower the callback is public HeadZoomScrollView (Context context) {super (context). } public HeadZoomScrollView (Context context, AttributeSet attrs) {super (context, attrs);} public HeadZoomScrollView (Context context, AttributeSet attrs, int defStyleAttr) {super (context, attrs, defStyleAttr);} public void setmZoomView (View mZoomView) {this.mZoomView = mZoomView;} public void setmScrollRate (float mScrollRate) {this.mScrollRate = mScrollRate;} public void setmReplyRate (float mReplyRate) {this.mReplyRate = mReplyRate } @ Override protected void onFinishInflate () {super.onFinishInflate (); init ();} private void init () {setOverScrollMode (OVER_SCROLL_NEVER); if (getChildAt (0)! = null) {ViewGroup vg = (ViewGroup) getChildAt (0); if (vg.getChildAt (0)! = null) {mZoomView = vg.getChildAt (0) @ Override public boolean onTouchEvent (MotionEvent ev) {if (mZoomViewWidth)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.