plug -in
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