本文整理了Java中android.webkit.WebView.onMeasure()
方法的一些代码示例,展示了WebView.onMeasure()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebView.onMeasure()
方法的具体详情如下:
包路径:android.webkit.WebView
类名称: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){
内容来源于网络,如有侵权,请联系作者删除!