private void a(View paramView, CoordinatorLayout paramCoordinatorLayout)
 {
   g = paramCoordinatorLayout.findViewById(f);
   if (g != null)
   {
     View localView = g;
     for (ViewParent localViewParent = g.getParent(); (localViewParent != paramCoordinatorLayout) && (localViewParent != null); localViewParent = localViewParent.getParent())
     {
       if (localViewParent == paramView)
       {
         if (paramCoordinatorLayout.isInEditMode())
         {
           h = null;
           g = null;
           return;
         }
         throw new IllegalStateException("Anchor must not be a descendant of the anchored view");
       }
       if ((localViewParent instanceof View)) {
         localView = (View)localViewParent;
       }
     }
     h = localView;
     return;
   }
   if (paramCoordinatorLayout.isInEditMode())
   {
     h = null;
     g = null;
     return;
   }
   throw new IllegalStateException("Could not find CoordinatorLayout descendant view with id " + paramCoordinatorLayout.getResources().getResourceName(f) + " to anchor view " + paramView);
 }
 public void onChildViewRemoved(View paramView1, View paramView2)
 {
   b(paramView2);
   if (CoordinatorLayout.a(CoordinatorLayout.this) != null) {
     CoordinatorLayout.a(CoordinatorLayout.this).onChildViewRemoved(paramView1, paramView2);
   }
 }
  public boolean onNestedFling(View target, float velocityX, float velocityY, boolean consumed) {
    ViewParent p = this.getParent().getParent();

    if (p instanceof CoordinatorLayout) {
      CoordinatorLayout cl = ((CoordinatorLayout) p);
      AppBarLayout apl = (AppBarLayout) cl.findViewById(R.id.app_bar_layout);
      CoordinatorLayout.LayoutParams lp = (LayoutParams) apl.getLayoutParams();
      final Behavior viewBehavior = lp.getBehavior();
      if (viewBehavior != null) {
        viewBehavior.onNestedFling(this, apl, target, velocityX, velocityY, consumed);
      }
    }

    return super.onNestedFling(target, velocityX, velocityY, consumed);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_forget_password);
    iv_logo = (ImageView) this.findViewById(R.id.iv_logo);
    img_background = (ImageView) this.findViewById(R.id.img_background);
    resizeLogo();
    fontManager = FontManager.getInstance(getAssets());
    ed_email = (EditText) this.findViewById(R.id.ed_email);
    ed_email
        .getBackground()
        .setColorFilter(getResources().getColor(R.color.ed_underline), PorterDuff.Mode.SRC_ATOP);
    ed_new_password = (EditText) this.findViewById(R.id.ed_new_password);
    ed_new_password
        .getBackground()
        .setColorFilter(getResources().getColor(R.color.ed_underline), PorterDuff.Mode.SRC_ATOP);
    ed_repassword = (EditText) this.findViewById(R.id.ed_repassword);
    ed_repassword
        .getBackground()
        .setColorFilter(getResources().getColor(R.color.ed_underline), PorterDuff.Mode.SRC_ATOP);

    ed_email.setTypeface(fontManager.getFont(FontManager.ROBOTO_LIGHT));
    ed_new_password.setTypeface(fontManager.getFont(FontManager.ROBOTO_LIGHT));
    ed_repassword.setTypeface(fontManager.getFont(FontManager.ROBOTO_LIGHT));

    btn_update_password = (Button) this.findViewById(R.id.btn_update_password);
    btn_update_password = (Button) this.findViewById(R.id.btn_update_password);
    btn_update_password.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            String email = ed_email.getText().toString().trim();
            String password = ed_new_password.getText().toString();
            String repassword = ed_repassword.getText().toString();
            if (verifyInputs(email, password, repassword)) {
              v.startAnimation(animFade);
              update_password(email, password);
            }
          }
        });
    btn_update_password.setTypeface(fontManager.getFont(FontManager.ROBOTO_MEDIUM));
    iv_back = (ImageView) this.findViewById(R.id.iv_back);
    iv_back.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            onBackPressed();
          }
        });
    ll_parent = (CoordinatorLayout) this.findViewById(R.id.ll_parent);
    ll_parent.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            hideSoftKeyboard();
          }
        });
    mValidator = Validator.getInstance();
    animFade = AnimationUtils.loadAnimation(ForgetPassword.this, R.anim.fade);
  }
Exemplo n.º 5
0
  private void startRipple() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
      final CoordinatorLayout coordinatorLayout =
          (CoordinatorLayout) findViewById(R.id.coordinator_layout);
      Drawable d = coordinatorLayout.getBackground();
      final RippleDrawable rippleDrawable = (RippleDrawable) d;
      rippleDrawable.setHotspot(
          mReset.getX() + mReset.getWidth() / 2, mReset.getY() + mReset.getHeight() / 2);
      rippleDrawable.setState(
          new int[] {android.R.attr.state_pressed, android.R.attr.state_enabled});
      coordinatorLayout.getBackground().setState(new int[] {});
    }

    mReset.hide();
    mElapsedTime = 0;
    setTime();
  }
 public boolean a(
     CoordinatorLayout paramCoordinatorLayout,
     View paramView,
     int paramInt1,
     int paramInt2,
     int paramInt3,
     int paramInt4) {
   int j = getLayoutParamsheight;
   Object localObject;
   if ((j == -1) || (j == -2)) {
     localObject = paramCoordinatorLayout.d(paramView);
     if (!((List) localObject).isEmpty()) {
       break label41;
     }
   }
   label41:
   do {
     return false;
     localObject = a((List) localObject);
   } while ((localObject == null) || (!ai.D((View) localObject)));
   if (ai.x((View) localObject)) {
     ai.a(paramView, true);
   }
   int i = View.MeasureSpec.getSize(paramInt3);
   paramInt3 = i;
   if (i == 0) {
     paramInt3 = paramCoordinatorLayout.getHeight();
   }
   int k = ((AppBarLayout) localObject).getMeasuredHeight();
   int m = ((AppBarLayout) localObject).getTotalScrollRange();
   if (j == -1) {}
   for (i = 1073741824; ; i = Integer.MIN_VALUE) {
     paramCoordinatorLayout.a(
         paramView,
         paramInt1,
         paramInt2,
         View.MeasureSpec.makeMeasureSpec(m + (paramInt3 - k), i),
         paramInt4);
     return true;
   }
 }
 d(Context paramContext, AttributeSet paramAttributeSet)
 {
   super(paramAttributeSet);
   TypedArray localTypedArray = paramContext.obtainStyledAttributes(paramAttributeSet, a.i.CoordinatorLayout_LayoutParams);
   c = localTypedArray.getInteger(a.i.CoordinatorLayout_LayoutParams_android_layout_gravity, 0);
   f = localTypedArray.getResourceId(a.i.CoordinatorLayout_LayoutParams_layout_anchor, -1);
   d = localTypedArray.getInteger(a.i.CoordinatorLayout_LayoutParams_layout_anchorGravity, 0);
   e = localTypedArray.getInteger(a.i.CoordinatorLayout_LayoutParams_layout_keyline, -1);
   b = localTypedArray.hasValue(a.i.CoordinatorLayout_LayoutParams_layout_behavior);
   if (b) {
     a = CoordinatorLayout.a(paramContext, paramAttributeSet, localTypedArray.getString(a.i.CoordinatorLayout_LayoutParams_layout_behavior));
   }
   localTypedArray.recycle();
 }
 @Override
 public boolean onInterceptTouchEvent(
     CoordinatorLayout parent, AppBarLayout child, MotionEvent ev) {
   final int x = (int) ev.getX();
   final int y = (int) ev.getY();
   switch (ev.getAction()) {
     case MotionEvent.ACTION_DOWN:
       if (getTopAndBottomOffset() == 0) {
         isExpand = true;
       } else {
         isExpand = false;
       }
       mStartY = ev.getRawY();
       if (!parent.isPointInChildBounds(child, x, y)) {
         mIsNested = false;
       }
       break;
     case MotionEvent.ACTION_MOVE:
       if (parent.isPointInChildBounds(child, x, y) || ev.getY() - mStartY > 0) {
         mIsNested = true;
       }
   }
   return super.onInterceptTouchEvent(parent, child, ev);
 }
  private void initBottomView() {
    CoordinatorLayout coordinatorLayout = (CoordinatorLayout) findViewById(R.id.cl_activity_scroll);
    assert coordinatorLayout != null;
    View view = coordinatorLayout.findViewById(R.id.ns_content_scroll);
    behavior = BottomSheetBehavior.from(view);

    behavior.setBottomSheetCallback(
        new BottomSheetBehavior.BottomSheetCallback() {
          boolean first = true;

          @Override
          public void onStateChanged(@NonNull View bottomSheet, int newState) {
            state = newState;
          }

          @Override
          public void onSlide(@NonNull View bottomSheet, float slideOffset) {
            if (first) {
              first = false;
              bottomSheet.setTranslationY(0);
            }
          }
        });
  }
Exemplo n.º 10
0
 @Override
 protected void onFinishInflate() {
   super.onFinishInflate();
   mLocationMap = new HashMap<>(getChildCount());
   for (int i = 0; i < getChildCount(); i++) {
     View view = getChildAt(i);
     if (view instanceof BaseActionButtonRotation) {
       mRotationButton = (BaseActionButtonRotation) view;
       mRotationButton.setOnClickListener(this);
       mRotationButton.setVisibility(VISIBLE);
     } else {
       view.setVisibility(INVISIBLE);
     }
   }
   it("onFinishInflate", "doing!");
 }
 public boolean c(CoordinatorLayout paramCoordinatorLayout, View paramView1, View paramView2) {
   CoordinatorLayout.Behavior localBehavior =
       ((CoordinatorLayout.d) paramView2.getLayoutParams()).b();
   int i;
   if ((localBehavior instanceof AppBarLayout.Behavior)) {
     i = ((AppBarLayout.Behavior) localBehavior).a();
     int j = paramView2.getHeight();
     int k = a;
     int m = paramCoordinatorLayout.getHeight();
     int n = paramView1.getHeight();
     if ((a == 0) || (!(paramView2 instanceof AppBarLayout))) {
       break label107;
     }
     int i1 = ((AppBarLayout) paramView2).getTotalScrollRange();
     a(a.a(j - k, m - n, Math.abs(i) / i1));
   }
   for (; ; ) {
     return false;
     label107:
     a(i + (paramView2.getHeight() - a));
   }
 }
Exemplo n.º 12
0
  private void initializeFields() {
    fontManager = FontManager.getInstance(getAssets());
    pref =
        getSharedPreferences(GNLConstants.SharedPreference.SHARED_PREF_NAME, Context.MODE_PRIVATE);
    prefEditor = pref.edit();
    iv_logo = (ImageView) this.findViewById(R.id.iv_logo);
    img_background = (ImageView) this.findViewById(R.id.img_background);
    ed_fname = (EditText) this.findViewById(R.id.ed_fname);
    ed_fname
        .getBackground()
        .setColorFilter(getResources().getColor(R.color.ed_underline), PorterDuff.Mode.SRC_ATOP);
    ed_lname = (EditText) this.findViewById(R.id.ed_lname);
    ed_lname
        .getBackground()
        .setColorFilter(getResources().getColor(R.color.ed_underline), PorterDuff.Mode.SRC_ATOP);
    ed_email = (EditText) this.findViewById(R.id.ed_email);
    ed_email
        .getBackground()
        .setColorFilter(getResources().getColor(R.color.ed_underline), PorterDuff.Mode.SRC_ATOP);
    ed_password = (EditText) this.findViewById(R.id.ed_password);
    ed_password
        .getBackground()
        .setColorFilter(getResources().getColor(R.color.ed_underline), PorterDuff.Mode.SRC_ATOP);
    ed_repassword = (EditText) this.findViewById(R.id.ed_repassword);
    ed_repassword
        .getBackground()
        .setColorFilter(getResources().getColor(R.color.ed_underline), PorterDuff.Mode.SRC_ATOP);

    ed_fname.setTypeface(fontManager.getFont(FontManager.ROBOTO_LIGHT));
    ed_lname.setTypeface(fontManager.getFont(FontManager.ROBOTO_LIGHT));
    ed_email.setTypeface(fontManager.getFont(FontManager.ROBOTO_LIGHT));
    ed_password.setTypeface(fontManager.getFont(FontManager.ROBOTO_LIGHT));
    ed_repassword.setTypeface(fontManager.getFont(FontManager.ROBOTO_LIGHT));

    btn_signup = (Button) this.findViewById(R.id.btn_signup);
    btn_signup.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            fname = ed_fname.getText().toString().trim();
            lname = ed_lname.getText().toString().trim();
            email = ed_email.getText().toString().trim();
            password = ed_password.getText().toString();
            repassword = ed_repassword.getText().toString();
            if (verifyInputs(fname, lname, email, password, repassword)) {
              v.startAnimation(animFade);
              register(fname, lname, email, password);
            }
          }
        });
    btn_signup.setTypeface(fontManager.getFont(FontManager.ROBOTO_MEDIUM));
    iv_back = (ImageView) this.findViewById(R.id.iv_back);
    iv_back.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            onBackPressed();
          }
        });
    ll_parent = (CoordinatorLayout) this.findViewById(R.id.ll_parent);
    ll_parent.setOnClickListener(
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            hideSoftKeyboard();
          }
        });
    mValidator = Validator.getInstance();
    animFade = AnimationUtils.loadAnimation(Register.this, R.anim.fade);
  }
 private ColorDrawable getCurrentStatusBarBackground() {
   Drawable drawable = layoutCoordinator.getStatusBarBackground();
   return drawable instanceof ColorDrawable ? (ColorDrawable) drawable : new ColorDrawable();
 }
 @Override
 public void onDetachedFromWindow() {
   super.onDetachedFromWindow();
   mNestedScrollingChildHelper.onDetachedFromWindow();
 }
 public bg a(View paramView, bg parambg)
 {
   CoordinatorLayout.a(CoordinatorLayout.this, parambg);
   return parambg.f();
 }
Exemplo n.º 16
0
 @Override
 protected void onLayout(boolean changed, int l, int t, int r, int b) {
   super.onLayout(changed, l, t, r, b);
   getInfo();
   it("onLayout", "doing!");
 }
 @Override
 public void onNestedPreScroll(View target, int dx, int dy, int[] consumed) {
   mNestedScrollingChildHelper.dispatchNestedPreScroll(dx, dy, consumed, null);
   super.onNestedPreScroll(target, dx, dy, consumed);
 }