Skip to content

Instantly share code, notes, and snippets.

View almakhanov's full-sized avatar

Nursultan almakhanov

View GitHub Profile
@libinbensin
libinbensin / DrawerActivity
Last active March 13, 2021 05:30
Android Navigation Drawer with Activities
public class DrawerActivity extends ActionBarActivity {
private DrawerLayout mDrawerLayout = null;
private ListView mDrawerList = null;
private String[] mDrawerItems;
private ActionBarDrawerToggle mDrawerToggle = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_drawer_layout);
@vorobeij
vorobeij / ConfigGson.kt
Last active October 27, 2020 09:13
Gson interface adapter for "Register an InstanceCreator with Gson for this type may fix this problem"
object ConfigGson {
fun getGson() = GsonBuilder().apply {
registerTypeAdapter(Launchable::class.java, InterfaceAdapter<Launchable>())
registerTypeAdapter(Trigger::class.java, InterfaceAdapter<Trigger>())
}.create()
}