![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Android
文章平均质量分 86
舒泱
一切都是最好的安排
展开
-
Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac‘ Could not resolve all
问题android studio 报错:Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac’. >Could not resolve all task dependencies for configuration ‘:app:debugCompileClasspath’. 原因 在网上原创 2022-05-05 19:43:56 · 11018 阅读 · 4 评论 -
supertypes of the following classes cannot be resolved. make sure you have the required dependencies
目录1、问题2、出现这个问题的原因3、解决办法 1、问题Android Studio 编译报错: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath : class X, unresolved supertypes: Y重启且清除Android Stu原创 2022-04-13 00:28:08 · 10635 阅读 · 0 评论 -
Android开发基础之Activity,图解Activity状态与生命周期
目录一、Activity是什么?二、Activity状态三、Activity生命周期一、Activity是什么? Activity是Android的四大组件之一,Activity利用View来实现应用程序的图形用户界面GUI,而手机用户则是通过GUI和应用程序做交互。 对于每个activity,系统会分配一个默认窗口。一个应用程序需要多少个activity?每个activity表示什么样的界面?原创 2021-06-09 10:56:13 · 3150 阅读 · 12 评论 -
Android开发基础之消息提示组件Toast
设置显示的内容Toast.makeText(MainActivity.this,"显示的内容",Toast.LENGTH_SHORT).show(); 第一个参数:当前的上下文环境。可用getApplicationContext()或this等。第二个参数:要显示的字符串。第三个参数:显示的时间长短。有LENGTH_LONG和LENGTH_SHORT。程序示例:在activity_main.xml里添加一个按钮:<?原创 2021-05-13 20:05:56 · 870 阅读 · 4 评论 -
Android开发基础之控件WebView
WebView可以实现如下功能:加载本地assets文件夹下的html文件wedview.loadUrl(“file:///android_asset/test.html”);加载网络URLwebview.loadUrl(“http://m.baidu.com”);直接加载HTML代码方法一:webview.loadData();方法二:webview.loadDataWithBaseURL(); // 方法二比方法一更不容易出现乱原创 2021-05-12 17:07:44 · 1206 阅读 · 15 评论 -
Android开发基础之滚动视图ScrollView、HorizontalScrollView
目录一、基础属性二、自定义样式1、去掉CheckBox的勾选框2、自定义背景颜色3、自定义勾选框的背景图片三、监听事件 一、基础属性1、layout_width宽度2、layout_height高度3、id设置组件id4、text设置显示的内容5、textColor设置字体颜色6、textStyle设置字体风格:normal(无效果)、bold(加粗)、italic(斜体)7、textSiz原创 2021-05-10 18:31:13 · 457 阅读 · 3 评论 -
Android开发基础之控件CheckBox
目录一、基础属性二、自定义样式1、去掉CheckBox的勾选框2、自定义背景颜色3、自定义勾选框的背景图片三、监听事件 一、基础属性1、layout_width宽度2、layout_height高度3、id设置组件id4、text设置显示的内容5、textColor设置字体颜色6、textStyle设置字体风格:normal(无效果)、bold(加粗)、italic(斜体)7、textSiz原创 2021-05-07 16:31:54 · 5550 阅读 · 9 评论 -
Android开发基础之控件RadioButton、RadioGroup
目录一、基础属性RadioButtonRadioGroup二、自定义样式三、监听事件 一、基础属性RadioButton1、layout_width宽度2、layout_height高度3、id设置组件id4、text设置显示的内容5、textColor设置字体颜色6、textStyle设置字体风格:normal(无效果)、bold(加粗)、italic(斜体)7、textSize字体大原创 2021-05-05 17:47:12 · 2202 阅读 · 12 评论 -
【Android】Button之实现点击按钮跳转到另一个界面
一、新建一个界面点击“New”——“Activity”——“Empty Activity”原创 2021-04-28 16:22:14 · 27781 阅读 · 15 评论 -
Android开发基础之布局管理器RelativeLayout
目录一、LinearLayout也有的基础属性二、RelativeLayout特有的属性 一、LinearLayout也有的基础属性以下属性是LinearLayout和RelativeLayout 都有的属性:1、id设置控件id2、layout_width宽度3、layout_height高度4、background控件背景颜色5、layout_margin外边距,该控件距离其他控件的距离6、l原创 2021-04-26 21:03:50 · 238 阅读 · 0 评论 -
Android开发基础之布局管理器LinearLayout
基础属性1、id设置控件id2、layout_width宽度3、layout_height高度4、background控件背景颜色5、layout_margin外边距,该控件距离其他控件的距离6、layout_padding内边距,该控件内部控件间的距离7、orientation内部控件排列的方向,例如水平排列或垂直排列8、gravity内部控件的位置,例如上下左右9、lay原创 2021-04-26 19:53:54 · 725 阅读 · 5 评论 -
Android开发基础之控件ImageView及第三方库Glide的使用
一、基础属性1、id设置控件id2、layout_width宽度3、layout_height高度4、background控件背景颜色5、src设置图片资源6、scaleType设置图片缩放类型7、maxHeight最大高度8、maxWidth最大宽度9、adjustViewBounds调整View的界限 1、id原创 2021-04-26 10:40:26 · 861 阅读 · 0 评论 -
Android开发基础之控件EditText
一、基础属性1、id设置组件id2、layout_width宽度3、layout_height高度4、background控件背景颜色5、hint显示在控件内的提示信息,当用户输入内容时,该提示信息就不显示了6、textColorHint提示信息字体颜色7、textSize提示信息字体大小,单位常用sp8、gravity设置提示信息字体对齐方向9、inputType输入类型原创 2021-04-22 22:03:26 · 1907 阅读 · 2 评论 -
Android开发基础之按钮Button
一、基础属性1、layout_width宽度2、layout_height高度3、id设置组件id4、text设置显示的内容5、textColor设置字体颜色6、textStyle设置字体风格:normal(无效果)、bold(加粗)、italic(斜体)7、textSize字体大小,单位常用sp8、background控件背景颜色9、gravity设置字体对齐方向&原创 2021-04-22 20:32:03 · 3171 阅读 · 3 评论 -
【Android】Button之实现松开按钮和按下按钮背景图片或颜色不同
StateListDrawable是Drawable资源的一种,可以根据不同的状态,设置不同的图片,关键节点selector,我们只需要将Button的background属性设置为该drawable资源即可实现按下按钮与松开按钮时背景图片不同。1、drawable引用的Drawable位图2、state_focused是否获得焦点3、state_pressed控件原创 2021-04-22 17:16:40 · 2989 阅读 · 0 评论 -
Android开发基础之控件TextView
一、基础属性1、layout_width组件的宽度2、layout_height组件的高度3、id设置组件id4、text设置显示的文本内容5、textColor设置字体颜色6、textStyle设置字体风格:normal(无效果)、bold(加粗)、italic(斜体)7、textSize字体大小,单位常用sp8、backgr原创 2021-04-22 10:30:32 · 435 阅读 · 2 评论