
安卓学习笔记
h93910
这个作者很懒,什么都没留下…
展开
-
compose 怎么去除 NavigationBarItem 选中后的背景色
【代码】compose 怎么去除 NavigationBarItem 选中后的背景色。原创 2024-03-18 16:24:38 · 669 阅读 · 0 评论 -
navController.graph 修改起始 startDestination
原只需设置资源就可使用navController.setGraph(graph)//graph为resId现有需要动态修改startDestination,经实践需要在setGraph之前修改掉startDestination,如下操作即可private lateinit var appBarConfiguration: AppBarConfigurationval navController by lazy { findNavController(R.id.xxx) }...//手原创 2021-10-27 17:32:33 · 1510 阅读 · 0 评论 -
navController.navigate 在Activity onActivityResult 中无效
因为FramgentManager还没恢复状态,把navigate转到onResume内即可 private var cIntent: Intent? = null override fun onResume() { super.onResume() cIntent?.apply { navController.navigate(R.id.action_to_CallFragment) cIntent =原创 2021-10-27 15:11:45 · 810 阅读 · 0 评论 -
com.google.android.material.tabs.tablayout item文字大小
style <style name="TabLayoutStyle" parent="Base.Widget.Design.TabLayout"> <item name="tabTextAppearance">@style/EventTabLayoutItemTextStyle</item> </style> <style name="EventTabLayoutItemTextStyle">原创 2021-10-22 13:35:48 · 1431 阅读 · 0 评论 -
Android.mk 编译apk 时constraint-layout 引起的value has already been defined问题
android.mk使用源码直接编译apk时遇到的解决方法android9 , 不要用网上加aar的方式,我这边试了会产生标题的问题先在mk文件里加:LOCAL_USE_AAPT2 := trueThen, we need to add:LOCAL_AAPT_FLAGS := –auto-add-overlay –extra-packages android.support.constraintLOCAL_STATIC_ANDROID_LIBRARIES += android-suppo原创 2021-01-11 17:24:16 · 358 阅读 · 0 评论 -
Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE的报错的解决方法
在项目文件下:AndroidManifest.xml文件中增加一行代价就行了。如:package="xxx" android:installLocation="preferExternal" ------增加这行代码! android:versionCode="1" android:versionName="1.0" >android:insta转载 2015-08-11 15:36:33 · 476 阅读 · 0 评论 -
安卓 WebView无法访问天猫 net::ERR_UNKNOWN_URL_SCHEME
或者出现:Not allowed to load local resource: file:///android_asset/webkit/android-weberror.png在中文网找了,各种加了以下代码 WebSettings webSettings = mWebView.getSettings(); webSettings.setJavaScriptCa原创 2015-12-22 10:43:45 · 4053 阅读 · 0 评论