Skip to content

Instantly share code, notes, and snippets.

View MostafaAnter's full-sized avatar
🎯
Focusing

Mostafa Anter MostafaAnter

🎯
Focusing
View GitHub Profile
@MostafaAnter
MostafaAnter / SharedPrefs.kt
Created August 16, 2020 22:44 — forked from RahulSDeshpande/SharedPrefs.kt
'SharedPrefs' utility class written Kotlin, for storing and retrieving data from SharedPreference in Android.
import android.content.Context
import android.preference.PreferenceManager
import android.util.Log
import java.lang.ref.WeakReference
/**
* Created by rahuldeshpande on 02/06/19.
*/
object SharedPrefs {
@MostafaAnter
MostafaAnter / README.md
Created June 16, 2017 21:05 — forked from gabrielemariotti/README.md
A SectionedGridRecyclerViewAdapter: use this class to realize a simple sectioned grid `RecyclerView.Adapter`.

You can use this class to realize a simple sectioned grid RecyclerView.Adapter without changing your code.

Screen

The RecyclerView has to use a GridLayoutManager.

This is a porting of the class SimpleSectionedListAdapter provided by Google

If you are looking for a sectioned list RecyclerView.Adapter you can take a look here

@MostafaAnter
MostafaAnter / SempleSectioned.md
Last active May 29, 2017 15:20 — forked from gabrielemariotti/Readme.md
A SimpleSectionedRecyclerViewAdapter: use this class to realize a simple sectioned `RecyclerView.Adapter`.

You can use this class to realize a simple sectioned RecyclerView.Adapter without changing your code.

The RecyclerView should use a LinearLayoutManager. You can use this code also with the TwoWayView with the ListLayoutManager (https://github.com/lucasr/twoway-view)

This is a porting of the class SimpleSectionedListAdapter provided by Google

Screen

Example:

@MostafaAnter
MostafaAnter / AppHelper.java
Created June 7, 2016 00:01 — forked from anggadarkprince/AppHelper.java
Upload file with Multipart Request Volley Android
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import java.io.ByteArrayOutputStream;
/**
* Sketch Project Studio
* Created by Angga on 12/04/2016 14.27.
*/
public class AppHelper {