草庐IT

KERN_SRC_PATH

全部标签

java - 安卓 : Share intent is not working for video file path

我有一个视频文件路径,想在社交媒体上分享视频,但无法分享视频。我正在尝试在AndroidStudio2.2中执行以下代码,但它不起作用。代码fragment:publicvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);ButtonshareBtn=(Button)findViewById(R.id.sharebutton);shareBtn.setOnClickListener(newButton.OnClic

Android View大纲——使用自定义Path

当我按如下方式设置View的轮廓时,它工作得很好:view.setClipToOutline(true);view.setOutlineProvider(newViewOutlineProvider(){@OverridepublicvoidgetOutline(Viewview,Outlineoutline){outline.setRoundRect(0,0,view.getWidth(),view.getHeight(),16);}});但是,使用Path没有任何效果。将setRoundRect替换为:Pathpath=newPath();path.addRoundRect(0,0

android - 迁移到androidx : Didn't find class "androidx.constraintlayout.ConstraintLayout" on path: DexPathList后

如问题标题所示,我已经搜索了我的问题的答案,并找到了Errorinflatingclassandroidx.constraintlayout.ConstraintLayoutaftermigrationtoandroidx,这与MigratingtoAndroidX中提供的官方迁移说明一致.我收到的信息要求我将android.support.constraint.ConstraintLayout更改为androidx.constraintlayout.widget.ConstraintLayout,但这对我不起作用。我还没有找到关于在我的gradle文件中放置什么依赖项的任何信息,所以

android - webview 加载包含 .js 的本地 html 文件作为 <script src>

我将.html(由.js网络链接组成)文件放在assest中,现在我正在尝试加载urlmWebView=(WebView)findViewById(R.id.webview);mWebView.getSettings().setJavaScriptEnabled(true);mWebView.getSettings().setPluginsEnabled(true);mWebView.getSettings().setAllowFileAccess(true);mWebView.loadUrl("file:///android_asset/anim1.html");这里我无法播放.js

android - Android 上的图形 : path with smooth curves?

我想为函数y=x^2绘制如下图表:但曲线并不平滑,因为它是一组连接的线。如何使曲线更平滑?谢谢 最佳答案 您应该将Path.quadTo与一个Path一起使用。如果您已经在这样做,那么我建议增加图表上的点数。移至路径的开头:Path.moveTo(x,y)在中间:Path.quadTo(lastX,lastY,(x+lastX)/2,(y+lastY)/2)最后:Path.lineTo(x,y) 关于android-Android上的图形:pathwithsmoothcurves?,我们

android - 如何以编程方式创建带有 id 和 src 参数的 imageView?

下面的工作,但我想消除xml,以便我可以通过编程方式更改图像:java:publicvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.p6_touch);ImageViewfloatImage=(ImageView)findViewById(R.id.p6_imageView);floatImage.setOnTouchListener(this);}XML: 最佳答案 在文档中有一个ta

android - 在安卓工作室 : How to change packages file path

所以我知道如何重命名一个包,但是这只是改变了结尾包com.example.android.navigationdrawerexample;在这个例子中,我想做的是去掉.example在不破坏任何东西的情况下,你会怎么做? 最佳答案 1-转到androidmanifest.xml2-搜索:3-对“package”的内容使用Refactor来更改您的包名称4-重新加载项目希望对大家有所帮助! 关于android-在安卓工作室:Howtochangepackagesfilepath,我们在St

Android用Path画圆

我正在尝试绘制一个圆圈的动画。在我的自定义View中,我有privatefinalPaintmPaint=newPaint(){{setDither(true);setStyle(Paint.Style.STROKE);setStrokeCap(Paint.Cap.ROUND);setStrokeJoin(Paint.Join.ROUND);setColor(Color.BLUE);setStrokeWidth(30.0f);setAntiAlias(true);}};...protectedvoidonDraw(Canvascanvas){super.onDraw();if(mOva

【vue3vite运行报错】Failed to resolve import “@vue/server-renderer from “src\App.vue“. Does the file exist

这里写自定义目录标题【vue3vite运行报错】Failedtoresolveimport“@vue/server-rendererfrom“src\App.vue“.Doesthefileexist【vue3vite运行报错】Failedtoresolveimport“@vue/server-rendererfrom“src\App.vue“.Doesthefileexist当遇到这样的情况可以试试更新vite版本npmivite@vitejs/plugin-vue--save-dev

android - 运行 gradle 检查时为 "Could not normalize path for file"

当我尝试在androidstudio中的android项目上运行gradlecheck时出现此错误。gradleassemble成功运行。我已经看到这个问题的解决方案来检查“使用外部构建”,但是对于我的androidstudio(0.3.7)版本,我们应该自动执行此操作。我的代码应该是正确的,因为它是在不同的机器(Mac)上构建的,但不会在我的Windows机器上编译。与我的环境有关。有什么想法吗?>*Whatwentwrong:Executionfailedfortask':VirtualWalk:testDebug'.>Couldnotnormalizepathforfile'D: