🛸~~ 🚁🚁🚁🛩️🛩️🛩|

n1ce2cv

园龄:5年2个月粉丝:4关注:1

06 2021 档案

OkHttp
摘要:OkHttp 添加依赖 implementation("com.squareup.okhttp3:okhttp:4.9.0") 注册权限 <uses-permission android:name="android.permission.INTERNET"/> 同步与异步请求 package com
65
0
0
Gson
摘要:Gson 添加依赖: implementation 'com.google.code.gson:gson:2.8.6' 对象的序列化与反序列化 User user = new User("wmj", "666", 24, false); Job teacher = new Job("teacher"
248
0
0
Rx
摘要:Rx 添加依赖 implementation 'io.rectivex.rxjava2:rxandroid:2.0.1' implementation 'io.rectivex.rxjava2:rxjava:2.0.7' Rx思维下载图片 添加网络权限 <uses-permission androi
139
0
0
Intent
摘要:Intent 用于启动Activity,启动Service,发送广播 显式Intent Intent(Context, Class) 构造函数分别为应用和组件提供 Context 和 Class 对象。因此,此 Intent 将显式启动该应用中的 DownloadService 类。 Intent
189
0
0
Glide
摘要:Glide 添加依赖 implementation 'com.github.bumptech.glide:glide:4.12.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0' 加网络权限 <uses-permiss
263
0
0
Activity
摘要:Activity 新建的activity必须在AndroidManifest.xml中注册 生命周期 创建:onCreate() → onStart() → onResume() 按下主屏键:onPause() → onStop() 重新打开:onRestart() → onStart() → on
289
0
0
Fragment
摘要:Fragment Fragment表示应用界面中可重复使用的一部分。Fragment 定义和管理自己的布局,具有自己的生命周期,并且可以处理自己的输入事件。Fragment 不能独立存在,而是必须由 Activity 或另一个 Fragment 托管。Fragment 的视图层次结构会成为宿主的视图
148
0
0
基础控件(ListView,RecyclerView,单位和尺寸,ViewPager,ViewPager2)
摘要:ListView list_item.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:layout_height="match_parent" android:layout_width="match_parent" a
66
0
0
动画
摘要:动画 帧动画 在drawable文件夹下添加图片,并新建frame.xml <?xml version="1.0" encoding="utf-8"?> <animation-list xmlns:android="http://schemas.android.com/apk/res/android
40
0
0
布局(LinearLayout,RelativeLayout,FrameLayout,TableLayout,GridLayout,ConstraintLayout)
摘要:LinearLayout layout_gravity:组件在父容器里的对齐方式 gravity:组件包含的所有子元素的对齐方式 layout_weight:在原有基础上分配剩余空间,一般把layout_height都设置为0dp再使用此属性 设置分割线可以用divider属性,或者插入View <
144
0
0
基础控件(Button,Edittext,ImageView,ProgressBar,ToolBar,AlertDialog,PopupWindow)
摘要:Button 触发事件 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="matc
44
0
0
jetpack1
摘要:组合函数 package com.example.myapplication1 import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setConten
34
0
0
点击右上角即可分享
微信分享提示
深色
回顶
收起