android.webkit.WebView.onMeasure()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(236)

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

WebView.onMeasure介绍

暂无

代码示例

代码示例来源:origin: WelliJohn/StickScrollView

@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
  int mExpandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
  super.onMeasure(widthMeasureSpec, mExpandSpec);
}

代码示例来源:origin: flipkart-incubator/android-inline-youtube-view

@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
  super.onMeasure(widthMeasureSpec, heightMeasureSpec);
  int newWidth;
  int newHeight;
  newWidth = getMeasuredWidth();
  newHeight = (int) (newWidth * ASPECT_RATIO);
  setMeasuredDimension(newWidth, newHeight);
}

代码示例来源:origin: agusibrahim/YuuPlayer

@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
  int parentWidth = MeasureSpec.getSize(widthMeasureSpec);
  int parentHeight = MeasureSpec.getSize(heightMeasureSpec);
  parentHeight=(int)convertPixelsToDp(parentHeight, getContext())+1;
  frameHeight=parentHeight;
  //Toast.makeText(getContext(), ""+parentHeight,0).show();
  loadData(contentBuilder(parentHeight, ""), "text/html; charset=utf-8", "UTF-8");
  this.setMeasuredDimension(parentWidth, parentHeight);
  super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
public void setVideo(String videoid){

相关文章

WebView类方法