草庐IT

document-layout-analysis

全部标签

[plugin:vite:import-analysis] Failed to resolve import “@/views/Login.vue“ from “src\router\index.ts

解决:安装path模块 npminstall--save-dev@types/node vite.config.jsimport{defineConfig}from'vite'importvuefrom'@vitejs/plugin-vue'importpathfrom'path'//https://vitejs.dev/config/exportdefaultdefineConfig({plugins:[vue()],resolve:{alias:{'@':path.resolve(__dirname,'src')}}}) Nomatchingexportin"src/router/inde

android - fragment 机器人 :visibility in xml layout definition

它是如何工作的?我有如下布局:请注意第二个fragment有android:visibility="gone"并且实际上它在屏幕上不可见。但是这段代码:booleanbothVisible=firstFrag.isVisible()&&secondFrag.isVisible();返回true,这出乎我的意料。我想知道使用android:visibility是否正确,因为我在文档中找不到任何关于它的信息。 最佳答案 根据Fragmentsource,isVisible定义为:finalpublicbooleanisVisible()

android-layout - 安卓布局: distinguishing an 800x480 large device from a 1024x600 tablet

有没有一种方法可以使用Android布局自动区分分辨率为800x480的DellStreak和分辨率为1024x600的GalaxyTab或HTCFlyer?它们(大概包括Flyer)都报告为-large(不同于报告为-xlarge的Xoom)。有比-large更好的布局标签吗?(编辑以澄清-xlarge在这种情况下没有用) 最佳答案 请参阅SupportingMultipleScreens中的“表2”并尝试将Size和Density限定符组合在一起。也很有用的应用ScreenInfo示例:NexusOne(480*800,240d

android - FloatingActionButton、layout_anchor 和 layout_gravity

这里有点新手。我从事Android开发大约两个月,但我在其他环境中有多年的开发经验。好的。我有一个FloatingActionButton没有出现在我预期或想要的地方。它在CoordinatorLayout内,连同AppBarLayout/Toolbar,并在ListView之后。这是布局:使用这种布局,屏幕看起来像这样:我的layout_gravity说"bottom|end"。我将其更改为"bottom|right",但我仍然得到相同的结果。我已经阅读了很多教程,并通过StackOverflow进行了研究,但没有成功。我设法通过删除FAB元素app:layout_anchor="@

安卓 : Layout with Rounded drop shadow

我想要形状在布局的背景中,如下图所示。我已经尝试了一些东西,如下所示。borders.xml布局设置为android:background="@drawable/borders"通过这个实现,我变成了这样我怎样才能得到像下图这样的圆角阴影? 最佳答案 你应该给形状加上“角”: 关于安卓:LayoutwithRoundeddropshadow,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questi

android - 如果设置 layout_height = wrap_content,ViewPager 不工作

我在使用ViewPaper时遇到问题。当我设置ViewPaper的height=wrap_content时它没有显示任何内容,如果我为ViewPager设置高度它会显示(例如:android:layout_height="350dp")。请帮忙!谢谢!这是我的xml代码:已解决:我点击此链接,它帮助我解决了这个问题。https://stackoverflow.com/a/24666987/1928560 最佳答案 必须指定ViewPager高度match_parent或者您必须为其指定一个值。两种解决方案,在LinearLayout

android - 这个 LinearLayout 应该使用 android :layout_height ="wrap_content"?

我有以下xml布局:hereIgettheerror.android:orientation="vertical">但我收到了lint消息:ThisLinearLayoutshoulduseandroid:layout_height="wrap_content"为什么我会收到这条消息? 最佳答案 LinearLayout设计用于并排或堆叠元素。我的猜测是,由于ScrollView,此lint警告建议使用虚拟堆叠Documentation:“LinearLayout的所有子项都一个接一个地堆叠,因此垂直列表每行只有一个子项,无论它们有

Could not read document: Unrecognized token ‘xxx‘: was expecting (‘true‘, ‘false‘ or ‘null‘)错误的解决方法

文章目录1.复现错误2.分析错误3.解决错误4.文末总结1.复现错误今天写好导入hive表的接口,如下代码所示:/***hive表导入**@authorsuper先生*@datetime2023/3/20:16:32*@return*/@ResponseBody@PostMapping(value="/xxx/importTables")publicServiceStatusDatalocalHiveImportTables(@RequestBodyImportTablesBoimportTablesBo,@RequestHeader("x-userid")LonguserId){logger

android - 线性布局 : layout_width vs. 最小宽度

我正在尝试使用layout_width属性以一定的宽度布局,但是当膨胀时-布局的宽度取自child,它比layout_width我说了。这是一个例子:这段代码使整个布局的宽度为60dip。但是,当将minWidth属性添加到布局时,其值为310dip,则布局的宽度符合预期。为什么会这样?layout_width属性只是一个建议吗?谢谢,乌迪 最佳答案 当layout_width属性未设置为wrap_content或fill_parent时,LinearLayout不需要遵守layout_width属性。您仍然可以使用android:

android - 如何使用 ACTION_OPEN_DOCUMENT_TREE Intent 获取真实路径?

我的应用程序下载并解压缩特定文件夹中的文件:output=newFileOutputStream(realpath,true);output.write(buffer,0,bytesRead);ZipFilezipFile=newZipFile(realpath);随着新引入的ACTION_OPEN_DOCUMENT_TREEIntent,我想为用户提供选择该文件夹的机会。当测试在我的onActivityResult中接收到的值时,我得到一个类似/tree/primary:mynewfolder的路径,这不是像/这样的物理真实路径sdcard/mynewfolder.UritreeUr