Back to project page glide-transformations.
The source code is released under:
Apache License
If you think the Android project glide-transformations listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package jp.wasabeef.example.glide; /*from www. ja v a 2 s . co m*/ import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; import java.util.ArrayList; import java.util.List; import jp.wasabeef.example.glide.MainAdapter.Type; public class MainActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); RecyclerView recyclerView = (RecyclerView) findViewById(R.id.list); recyclerView.setLayoutManager(new GridLayoutManager(this, 2)); List<Type> dataSet = new ArrayList<>(); dataSet.add(Type.Crop); dataSet.add(Type.CropSquare); dataSet.add(Type.CropCircle); dataSet.add(Type.ColorFilter); dataSet.add(Type.Grayscale); dataSet.add(Type.RoundedCorners); dataSet.add(Type.Blur); dataSet.add(Type.Toon); dataSet.add(Type.Sepia); dataSet.add(Type.Contrast); dataSet.add(Type.Invert); dataSet.add(Type.Pixel); dataSet.add(Type.Sketch); dataSet.add(Type.Swirl); dataSet.add(Type.Brightness); dataSet.add(Type.Kuawahara); dataSet.add(Type.Vignette); recyclerView.setAdapter(new MainAdapter(this, dataSet)); } }