GO Language —- 6.8 Closure Fly

2023-01-11   ES  

Sort out a few more commonly used plug -in recently

This should be used most, right?
The first way is to have a mouse -right mouse button in XML filesFindViewViewByMe(xml)Click and thenCopy Codecan go directly to our class and paste it directly
在这里插入图片描述

The second type is to go directly to our class, click our layout file, and then right -click the mouse = >>>> general => findViewByme => OK, and in the class, he will help you automatically produce initView ();

can preview our code on the right to achieve fast positioning. When the EMM code is small, it feels useless. It feels useless when the code is too much …

This is a plugin of our quickly generated Java Bean. It used to use GSONFORMAT. Recently, the Android Studio version was found to have found that GSONFORMAT could not be used after 4.0. It changed to our new GSONFORMATPLUS

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
Gang download will be a little problem, you need to change his settings
在这里插入图片描述
At this time, you can use it

This is our translator

The first method:
在这里插入图片描述

Two type: We choose the words that need to be translated, right mouse button
在这里插入图片描述
在这里插入图片描述

Discovers that there are only a few commonly used …

This is the progress bar in Hua’s whistle
在这里插入图片描述

There will be different themes, such asThe Doki Theme宅 宅 exclusive
在这里插入图片描述
plug -in can be replaced by ginkgo, or you can customize file => settings =>
在这里插入图片描述

Personally feel very practical

Implementation ‘com.blankj: UtilCodex: 1.26.0’ // Tool

package com.afeng.myapplication;

import android.os.Bundle;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.SPUtils;
import com.blankj.utilcode.util.ToastUtils;

public class MainActivity extends AppCompatActivity {
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
    
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        ToastUtils.showShort("afeng");  // Toast
        SPUtils.getInstance().getString("username");  // SP take it out
        SPUtils.getInstance().put("username","afeng"); // SP storage
        LogUtils.i("Afeng");  // log print
        //...

    }
    
}

public class MainActivity extends AppCompatActivity {
    
    private ImageView imageview;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
    
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        imageview = (ImageView) findViewById(R.id.imageview);

        Glide.with(this)
                .load("")// Load picture resources
                .error(R.drawable.ic_launcher_background)// After the picture fails, the displayed picture
                .placeholder(R.drawable.ic_launcher_background) // The picture before loading, the picture displayed
                .skipMemoryCache(false)// Whether to put the picture in memory
                .diskCacheStrategy(DiskCacheStrategy.NONE)  // disk cache
                .transform(new CenterCrop(), new RoundedCorners(20))  // rounded image + center
                .transform(new CenterCrop()) // round picture
                .into(imageview);

        /** .diskCachestrategy attribute 
          * Diskcachestrategy.none without cache 
          * Diskcachestrategy.Result only cache the final loading chart 
          * Diskcachestrategy.all cache all version diagrams 
          */
    }
}

Implementation ‘com.squareup.okhttp3: okhttp: 3.12.1’ // okhttp dependency
This is almost the most network request I used

link:OkHttp_GitHub.

link:OKHTTP official website.

link:Okhttp-get and post.

Implementation ‘com.lzy.net:Okgo:3.0.4 ’/OKGO dependencies
The two most commonly used, OKGO is simpler

link:OkGo_GitHub.
link:Okgo-get and post.

link:eventbus official website.

Happy birthday to yourself! Intersection Intersection

source

Related Posts

Mybatis official document-dynamic SQL

PyTorch Learning Rate Adjustment Strategy Custom Definition

javascript secondary linkage and third -level linkage zhou125disorder

ESP32’s serial port communication (performed by interruption and looking at the door)

GO Language —- 6.8 Closure Fly

Random Posts

Detailed explanation list list in Python

Why use cross -verification

Simulation CPU and memory script

kali system changing source

[WPF] When the new window in Winfom is a new window, the controls such as Textbox cannot enter the problem solving method.