全部 文章 问答 分享 共找到309个相关内容
[文章] 笔记----Android开发之全局获取Context的技巧
码代码的过程中,发现Toast在一些地方不能通过getContext、this获取上下文,百度了一下全局获取Context的技巧,记录一下首先定制一个自己的Application,需要创建一个MyApplication
2020-05-01 10:17 · 笔记 / android / Context
[问答] 求助各位大神==封装公共头部遇到的问题
pre class="ql-syntax" spellcheck="false">public class Header extends LinearLayout { public Header(Context
2021-10-15 19:02 · android
[问答] Android中的所有Context都是一样的吗?
如题!那个大佬可以说说?要是能举个栗子最好了,3Q!
2020-03-29 10:20 · android
[问答] this.addView(l_view);//把l_view增加到当前容器 调用这个会崩溃?
match_parent" android:layout_height="match_parent" android:orientation="horizontal" tools:context
2022-12-11 09:41 · Android
[文章] java语言 构造函数 转成kotlin语言 构造函数
classTbNestedScrollView:NestedScrollView{constructor(context:Context):super(context){}constructor(context
[文章] ClassNotFoundException: MongoDriverInformation
ConfigurationPropertiesBindConstructorProvider.java:48)~[spring-boot-2.2.1.RELEASE.jar:2.2.1.RELEASE]atorg.springframework.boot.context.properties.ConfigurationPropertiesBean
2022-08-14 21:09 · mongodb / 冲突 / 版本 / / javaweb
[问答] 自定义控件,无法获取到xml中的自定义属性的值,只能获取到默认值
class="ql-syntax" spellcheck="false">package com.ttyh.customview.animation import android.content.Context
2022-04-02 12:17 · Android / 自定义控件
[文章] android 根据包名检查手机内是否有某个APP 方法
项目有这个根据APP包名判断手机是否有这个APP如果有跳转到APP如果没有根据下载地址跳转浏览器下载此应用如何检查手机是否有这个APP呢上代码privatefunisInstallQQWEICHAT(context
2022-06-02 10:02 · android
[问答] 安卓在fragment中获取相册图片路径
context, Uri uri) { int sdkVersion = Build.VERSION.SDK_INT; if (sdkVersion >= 19)
2022-06-22 23:33 · 安卓
[问答] TextView.setGravity(Gravity.CENTER)没居中
不知道为什么文字偏下了====================关键代码================================================textView=TextView(context
2020-06-14 14:20 · TextView / 自定义View
[文章] nuxt.js asyncData参数有哪些?
function(context){//Universalkeysconst{app,store,route,params,query,env,isDev,isHMR,redirect,error}=context
2020-03-03 22:58 · vue / js / nuxt / asyncdata / 参数
[文章] Android Studio Dolphin Xml 布局 无法预览汇总(持续更新)
atandroid.view.LayoutInflater.inflate(LayoutInflater.java:505)Copystacktoclipboard这里提示有个空指针异常,代码如下valattr=context.theme.obtainStyledAttributes
2022-12-01 15:40 · AndroidStudio
[问答] 安卓数据库无法增删改查
package com.example.databasedemo;

import android.content.Context
2022-04-23 14:24 · 数据库
[文章] 【领券联盟】笔记:视频51,52-实现首页的轮播功能
LooperViewPagerpublicclassAutoLooperViewPagerextendsViewPager{publicAutoLooperViewPager(@NonNullContextcontext){super(context
2020-04-02 22:22 · 课堂笔记
[问答] 求教大佬SQLite getReadableDatabase()报错
"filepath text)"; public DatabaseHelper(@Nullable @org.jetbrains.annotations.Nullable Context
2023-01-29 16:17 · Android / Sqlite
[问答] android 通过AppWidgetProvider 启动的Service会自动销毁问题
,HelloService.class);if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.O){context.startForegroundService
2020-08-19 15:58 · andorid / AppWidget / service
[文章] 单位转换工具类
;//根据手机分辨率从dp转成pxpublicclassSizeUtils{publicstaticintdip2px(Contextcontext,floatdpValue){floatscale=context.getResources
2020-03-16 14:45 · android
[问答] recyclerview实现多布局。
recyclerview实现多种布局,数据是获取本地的json数据,每个json数据的长度是不同的json数据格式:adapter:packageadapter;importandroid.content.Context
2020-10-10 14:15 · Androidrecyclerview
[问答] 大锯老师,我这个明明设置了Adapter它一直说没Adapter,这是为什么啊
gridHomeEquipmentSensor.setAdapter(adapter); } private void getAllEquipmentSensors(Context
2021-08-10 23:04 · 智商下线了...
[问答] 关于在服务器端配置SOBAndroidMiniWeb出错的问题
(ConfigurationClassPostProcessor.java:414) ~[spring-context-5.0.7.RELEASE.jar!
2021-08-30 14:23 · java
[文章] Spring Boot笔记 启动配置原理
);//准备上下文环境this.prepareContext(context,environment,listeners,applicationArguments,printedBanner);//刷新
2020-09-02 21:35 · SpringBoot
[文章] 领券联盟轮播图优化:左划和用户手放上去悬停
我们的轮播图还可以更好1.用户可以左划2.用户手放上去的时候不应该再自动向右滚动下面是我的解决方案和代码packagecom.bobo.union.ui.custom;importandroid.content.Context
2021-03-27 13:52 · 安卓
[文章] Android动态加载第三方APK的View研究过程
StringpackageName)throwsPackageManager.NameNotFoundException{returncreatePackageContext(packageName,Context.CONTEXT_IGNORE_SECURITY
[问答] android新手,请教下android treeview ,异步加载
p>
package com.benqio.jwt.holder;

import android.content.Context
2022-06-20 21:41 · treeview
2021-08-08 17:16 · Android / 测试类
[问答] 如何在非Composable中调用Composable函数?
ql-syntax" spellcheck="false"> class NetWorkReceiver : BroadcastReceiver() { override fun onReceive(context
2022-08-22 17:01 · compose
[文章] 【Android源码】Activity和AppCompatActivity的setContentView方法区别
protectedDecorViewgenerateDecor(intfeatureId){returnnewDecorView(context,featureId,this,getAttributes
2020-10-11 19:32 · Android源码 / Android
[文章] 阳光沙滩-实现定时、监听功能
importlombok.extern.slf4j.Slf4j;importorg.springframework.beans.factory.annotation.Value;importorg.springframework.boot.context.event.ApplicationStartedEvent
2020-11-05 08:42 · schedule / listener
[问答] 对按钮设置单击事件,可以把View 传到内部方法设置吗?
publicclassNormalServiceimplementsView.OnClickListener{protectedbooleanbindService;privateContextcontext;publicvoidinit(Contextcontext,Viewview){this.context
2020-04-23 10:51 · Android
[问答] org.springframework.beans.factory.BeanCreationException
atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]atorg.springframework.context.support.AbstractApplicationContext.getBean
2020-07-11 11:55 · spring
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 11