Charles破解方法
下载CharlesCharles下载地址 https://www.charlesproxy.com/download/  下载破解文件在线破解地址: https://www.zzzmode.com/mytools/charles/  在RegisterName输入你想注册的名字。 替换charles.jar方法: 用刚才下载的charles.jar替换本地charles.jar文件。  macOS: /Applications/Charles.app/Contents/Java/charles.jar Windows: <安装盘>:\Program Files\Charles\lib\charles.jar  
PyCharm 2020.3破解
文章如果过期,详情参考:https://blog.idejihuo.com/topics/jetbrains/pycharm 破解补丁下载链接:  https://pan.baidu.com/s/1IKM8thIqRfU3L2U815RpFw  提取码: 9r8u 方法1.打开PyCharm,新建一个空工程 2.把下载的 zip 包拖动到右侧编辑内容,然后重启IDE 3.在工具栏 Help –> Eval Reset 4.重置时间 然后可以在注册信息里看到,剩余的时间是30天  过期了之后,按照前面的方法重新激活  
Jetpack架构组件
Jetpack架构组件官方应用架构     DataStore1.类型	DataStore 提供两种不同的实现:Preferences DataStore 和 Proto DataStore。  Preferences DataStore 使用键存储和访问数据。此实现不需要预定义的架构,也不确保类型安全。 Proto DataStore 将数据作为自定义数据类型的实例进行存储。此实现要求您使用协议缓冲区来定义架构,但可以确保类型安全。  2.Gradle配置DataStore Typed // Typed DataStore (Typed API surface, such as Proto)    dependencies {        implementation("androidx.datastore:datastore:1.0.0")        // optional - RxJava2 support       ...
LiveData transformations
 Transformations 有两个:   [Transformations.map](https://developer.android.com/reference/androidx/lifecycle/Transformations.html#map(androidx.lifecycle.LiveData, androidx.arch.core.util.Function)) [Transformations.switchMap](https://developer.android.com/reference/androidx/lifecycle/Transformations.html#switchMap(androidx.lifecycle.LiveData, androidx.arch.core.util.Function>))  
Data binding with ViewModel and LiveData
官方Demohttps://developer.android.com/codelabs/kotlin-android-training-live-data-data-binding#0 本文基于 ViewModel + LiveData 改造 Gradle配置android {    buildFeatures {        dataBinding true    }}  Add ViewModel data binding<layout ...>   <data>       <variable           name="scoreViewModel"           type="com.example.android.guesstheword.screens.score.ScoreViewModel" />   </data>  ...
LiveData和LiveData观察者
1.Add LiveData to ViewModel	Add LiveData to ViewModel and encapsulate the LiveData // The current wordprivate val _word = MutableLiveData<String>()val word: LiveData<String>    get() = _word// The current scoreprivate val _score = MutableLiveData<Int>()val score: LiveData<Int>    get() = _score  2.Attach observers to the LiveData objects在Activity中使用: viewModel.score.observe(this, Observer { newScore ->           Log.e(TAG, "$newScore" )      ...
Jetpack——DataBinding使用-RecyclerView
RecyclerView的绑定效果图:  列表适配器: public class DisplayAdapter extends RecyclerView.Adapter<DisplayAdapter.DisplayViewHolder> {    List<User> users;    public DisplayAdapter(List<User> users) {        this.users = users;    }    @NonNull    @Override    public DisplayViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {      //创建ViewHolder时,传入对应的 XXXBinding         ItemDisplayBinding binding =...
2022-05-27-ViewModel+LiveData实现Fragment间通信
模拟场景: 在Activity定义两个相同的Fragment,等分布局,Fragment里面只包含一个SeekBar控件,通过共享ViewModel来实现Fragment间的通讯 1. 定义ViewModel和LiveDataclass SharedViewModel: ViewModel() {    val progress: MutableLiveData<Int> = MutableLiveData()}  2. 布局文件activity_main.xml <?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:tools="http://schemas.android.com/tools"   ...
Android Gradle 7.1+新版本依赖变化
1.功能位置迁移旧版 Project build.gradle的 buildscript和 allprojects的移动至setting.gradle并改名为pluginManagement和dependencyResolutionManagement pluginManagement {    repositories {        gradlePluginPortal()        google()        mavenCentral()    }}dependencyResolutionManagement {    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)    repositories {        google()        mavenCentral()    }}rootProject.name = "Hilt"include...
Arcgis-Search for an address
Link: https://developers.arcgis.com/labs/ios/search-for-an-address/ let geocoder:AGSLocatorTask = AGSLocatorTask(url: URL(string: "https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer")!)  func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {        guard let searchText = searchBar.text, !searchText.isEmpty else {            print("Nothing to search")            return        }                geocoder.geocode(withSearchText:...






