Skip to content

Instantly share code, notes, and snippets.

View NaturalizerINA's full-sized avatar

Rahmad Setiawan Mukminullah NaturalizerINA

View GitHub Profile
package com.mukminullah.recyclerview;
import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;
/**
* Created by user on 26/01/18.
*/
package com.mukminullah.recyclerview;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.ArrayList;
package com.mukminullah.recyclerview;
/**
* Created by user on 26/01/18.
*/
public class B_list {
private String nama;
private String jurusan;
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#4f328b"
android:orientation="vertical"
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
android:background="#fff"
tools:context="com.mukminullah.recyclerview.MainActivity">
<android.support.v7.widget.RecyclerView
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.mukminullah.recyclerview"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
@NaturalizerINA
NaturalizerINA / AndroidManifest.xml
Created January 4, 2018 06:33
Adding permission for the internet connection
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mukminullah.imagetransformer">
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
@NaturalizerINA
NaturalizerINA / activity_main.xml
Created January 4, 2018 06:32
Adding xml file to adding the ImageView and ProgressBar component
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.mukminullah.imagetransformer.MainActivity">
<ProgressBar
android:id="@+id/pb"
android:layout_width="50dp"
@NaturalizerINA
NaturalizerINA / MainActivity.java
Created January 4, 2018 06:20
Java file for requesting and transforming the image
package com.mukminullah.imagetransformer;
import android.graphics.drawable.Drawable;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.Toast;
@NaturalizerINA
NaturalizerINA / build.gradle
Created January 4, 2018 06:18
Add the glide image request library and transformation library in build.gradle (module)
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.mukminullah.imagetransformer"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"