BÀI 51 - MỘT SỐ THƯ VIỆN TRONG LẬP TRÌNH ANDROID
// Firebase User
implementation platform('com.google.firebase:firebase-bom:28.2.1')
implementation 'com.google.firebase:firebase-analytics'
// Facebook User
//noinspection GradleDependency
implementation 'com.facebook.android:facebook-android-sdk:[8,9)'
implementation 'com.google.firebase:firebase-auth'
implementation 'com.squareup.picasso:picasso:2.71828'
// Google Map
implementation 'com.google.android.gms:play-services-maps:17.0.1'
// Design ứng dụng
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.4.0'
// Đỉnh cao hơn của listView
implementation 'androidx.recyclerview:recyclerview:1.2.1'
// Hỗ trợ đọc url hình ảnh từ internet
implementation 'com.squareup.picasso:picasso:2.71828'
// Đọc nội dung url
implementation 'com.android.volley:volley:1.2.0'
// Đổ image có viền hình tròn
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'com.github.mmmelik:RoundedImageView:v1.0.1'
Ví dụ picasso, thư viện đổ hình ảnh từ url:
Picasso.get().Load ("http://i.imgur.com/DvpvklR.png") // Địa chỉ hình ảnh.
.placeholder("hinhAnhKhongTimThay") // Có thể bỏ cái này.
.error("hinhAnhKhiLoiCSDL") // Có thể bỏ cái này luôn.
.into(imageView); // Nơi đổ hình.
Ví dụ Volley, thư viện đọc nội dung url:
RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
requestQueue.add(jsonArrayRequest);