答案 0 :(得分:3)
这个lib就是你需要的https://github.com/Dimezis/BlurView
<eightbitlab.com.blurview.BlurView
android:id="@+id/blurView"
android:layout_width="match_parent"
android:layout_height="66dp"
android:layout_alignParentBottom="true"
>
<!--anything below this view will be blured-->
</eightbitlab.com.blurview.BlurView>
在app.gradle defaultConfig
中 renderscriptTargetApi 23
renderscriptSupportModeEnabled true
和活动
blurView = (BlurView) findViewById(R.id.blurView);
final View decorView = getWindow().getDecorView();
final View rootView = decorView.findViewById(android.R.id.content);
final Drawable windowBackground = decorView.getBackground();
blurView.setupWith(rootView)
.windowBackground(windowBackground)
.blurAlgorithm(new RenderScriptBlur(this, true)) //Preferable algorithm, needs RenderScript support mode enabled
.blurRadius(10);
答案 1 :(得分:0)
参考此博客post
var q = 'q2';
function qty(q1) {
var theForm = document.forms["contact-form"];
var quantity = theForm.elements[q1]; var howmany =0;
return howmany;
}
document.write(qty(q));