android.support.v7.widget.CardView.requestLayout()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中android.support.v7.widget.CardView.requestLayout()方法的一些代码示例,展示了CardView.requestLayout()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CardView.requestLayout()方法的具体详情如下:
包路径:android.support.v7.widget.CardView
类名称:CardView
方法名:requestLayout

CardView.requestLayout介绍

暂无

代码示例

代码示例来源:origin: ypicoleal/LoginDemo

@Override
public void onEasingValueChanged(double value, double oldValue) {
  int diff_margin = curr_singup_margin - target_singup_margin;
  int margin = target_singup_margin + (int) (diff_margin - (diff_margin * value));
  LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) singupButton.getLayoutParams();
  layoutParams.setMargins(0, 0, margin, 0);
  singupButton.requestLayout();
  diff_margin = curr_login_margin - target_login_margin;
  margin = target_login_margin + (int) (diff_margin - (diff_margin * value));
  layoutParams = (LinearLayout.LayoutParams) loginButton.getLayoutParams();
  layoutParams.leftMargin = margin;
  loginButton.requestLayout();
}

代码示例来源:origin: ypicoleal/LoginDemo

@Override
protected void applyTransformation(float interpolatedTime, Transformation t) {
  int diff_radius = first_curr_radius - first_target_radius;
  int radius = first_target_radius + (int) (diff_radius - (diff_radius * interpolatedTime));
  first_container.setRadius(radius);
  first_container.requestLayout();
  diff_radius = second_curr_radius - second_target_radius;
  radius = second_target_radius + (int) (diff_radius - (diff_radius * interpolatedTime));
  second_container.setRadius(radius);
  second_container.requestLayout();
}

代码示例来源:origin: ypicoleal/LoginDemo

@Override
protected void applyTransformation(float interpolatedTime, Transformation t) {
  int diff_radius = first_curr_radius - first_target_radius;
  int radius = first_target_radius + (int) (diff_radius - (diff_radius * interpolatedTime));
  first_container.setRadius(radius);
  first_container.requestLayout();
  diff_radius = second_curr_radius - second_target_radius;
  radius = second_target_radius + (int) (diff_radius - (diff_radius * interpolatedTime));
  second_container.setRadius(radius);
  second_container.requestLayout();
}

代码示例来源:origin: ypicoleal/LoginDemo

@Override
  public void onEasingFinished(double value) {
    LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) singupButton.getLayoutParams();
    layoutParams.setMargins(0, 0, target_singup_margin, 0);
    singupButton.requestLayout();
    layoutParams = (LinearLayout.LayoutParams) loginButton.getLayoutParams();
    layoutParams.setMargins(target_login_margin, 0, 0, 0);
    loginButton.requestLayout();
    loginButton.setVisibility(View.GONE);
  }
});

代码示例来源:origin: ypicoleal/LoginDemo

@Override
public void onEasingValueChanged(double value, double oldValue) {
  int diff_margin = curr_singup_margin - target_singup_margin;
  int margin = target_singup_margin + (int) (diff_margin - (diff_margin * value));
  LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) singupButton.getLayoutParams();
  layoutParams.setMargins(0, 0, margin, 0);
  singupButton.requestLayout();
  diff_margin = curr_login_margin - target_login_margin;
  margin = target_login_margin + (int) (diff_margin - (diff_margin * value));
  layoutParams = (LinearLayout.LayoutParams) loginButton.getLayoutParams();
  layoutParams.leftMargin = margin;
  loginButton.requestLayout();
}

代码示例来源:origin: ypicoleal/LoginDemo

@Override
public void onEasingStarted(double value) {
  int diff_margin = curr_singup_margin - target_singup_margin;
  int margin = target_singup_margin + (int) (diff_margin - (diff_margin * value));
  LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) singupButton.getLayoutParams();
  layoutParams.setMargins(0, 0, margin, 0);
  singupButton.requestLayout();
  diff_margin = curr_login_margin - target_login_margin;
  margin = target_login_margin + (int) (diff_margin - (diff_margin * value));
  layoutParams = (LinearLayout.LayoutParams) loginButton.getLayoutParams();
  layoutParams.setMargins(margin, 0, 0, 0);
  loginButton.requestLayout();
}

代码示例来源:origin: ypicoleal/LoginDemo

@Override
public void onEasingStarted(double value) {
  int diff_margin = curr_singup_margin - target_singup_margin;
  int margin = target_singup_margin + (int) (diff_margin - (diff_margin * value));
  LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) singupButton.getLayoutParams();
  layoutParams.setMargins(0, 0, margin, 0);
  singupButton.requestLayout();
  diff_margin = curr_login_margin - target_login_margin;
  margin = target_login_margin + (int) (diff_margin - (diff_margin * value));
  layoutParams = (LinearLayout.LayoutParams) loginButton.getLayoutParams();
  layoutParams.setMargins(margin, 0, 0, 0);
  loginButton.requestLayout();
}

代码示例来源:origin: ypicoleal/LoginDemo

@Override
  public void onEasingFinished(double value) {
    LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) singupButton.getLayoutParams();
    layoutParams.setMargins(0, 0, target_singup_margin, 0);
    singupButton.requestLayout();
    layoutParams = (LinearLayout.LayoutParams) loginButton.getLayoutParams();
    layoutParams.setMargins(target_login_margin, 0, 0, 0);
    loginButton.requestLayout();
    singupButton.setVisibility(View.GONE);
  }
});

代码示例来源:origin: jorgegil96/All-NBA

layoutParams.setMargins(margin, margin, margin, 0);
gameCard.requestLayout();

代码示例来源:origin: ypicoleal/LoginDemo

animationCircle.requestLayout();

代码示例来源:origin: ypicoleal/LoginDemo

animationCircle.requestLayout();

相关文章