1010import android .view .LayoutInflater ;
1111import android .view .View ;
1212import android .view .ViewGroup ;
13- import android .widget .FrameLayout ;
1413import android .widget .ImageView ;
1514import android .widget .TextView ;
1615import android .widget .Toast ;
2423public class PagerFragment extends Fragment {
2524
2625 private ImageView ivBack ;
27- private FrameLayout llContainer ;
2826 private RecyclerView rvContent ;
2927 private TextView tvBtn ;
3028
@@ -42,7 +40,6 @@ public static PagerFragment newInstance() {
4240 public View onCreateView (LayoutInflater inflater , @ Nullable ViewGroup container , @ Nullable Bundle savedInstanceState ) {
4341 View mView = inflater .inflate (R .layout .fragment_pager , null );
4442 ivBack = (ImageView ) mView .findViewById (R .id .iv_back );
45- llContainer = (FrameLayout ) mView .findViewById (R .id .ll_container );
4643 rvContent = (RecyclerView ) mView .findViewById (R .id .rv_content );
4744 tvBtn = (TextView ) mView .findViewById (R .id .tv_btn );
4845 return mView ;
@@ -120,11 +117,11 @@ public static int dp2px(Context context, float dpValue) {
120117 }
121118
122119 private void pageExpandAnim () {
123- llContainer .animate ().scaleX (0.9f ).setDuration (700 ).start ();
120+ rvContent .animate ().scaleX (0.9f ).setDuration (700 ).start ();
124121 }
125122
126123 private void pageShrinkAnim () {
127- llContainer .animate ().scaleX (1 ).setDuration (700 ).start ();
124+ rvContent .animate ().scaleX (1 ).setDuration (700 ).start ();
128125 }
129126
130127 public interface OnPageListener {
0 commit comments