Skip to content

Instantly share code, notes, and snippets.

View yelinaung's full-sized avatar
🏠
Working from home

Ye Lin Aung yelinaung

🏠
Working from home
View GitHub Profile
@bryanstern
bryanstern / OkHttpStack.java
Last active April 24, 2022 03:17
An OkHttp backed HttpStack for Volley
/**
* The MIT License (MIT)
*
* Copyright (c) 2015 Circle Internet Financial
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@gabrielemariotti
gabrielemariotti / README.md
Last active March 9, 2023 06:02
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

@chrisbanes
chrisbanes / CollapsingTitleLayout.java
Last active March 26, 2023 11:58
CollapsingTitleLayout
/*
* Copyright 2014 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@alt332
alt332 / read.go
Last active October 25, 2015 11:00
package main
import (
"net/http"
"encoding/json"
"io/ioutil"
"log"
"fmt"
)
@JakeWharton
JakeWharton / README.md
Last active January 8, 2020 02:13
A special activity which facilitates restarting your application process.
@markushi
markushi / MyActivity.java
Last active May 3, 2020 22:50
Reveal Color View Demo
package at.markushi.reveal;
import android.app.Activity;
import android.graphics.Color;
import android.graphics.Point;
import android.os.Bundle;
import android.view.View;
import at.markushi.ui.RevealColorView;
@gabrielemariotti
gabrielemariotti / Readme.md
Last active March 2, 2024 23:10
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:

@gabrielemariotti
gabrielemariotti / Toolbar.java
Created August 4, 2014 13:22
Android-L: A little example of the new Toolbar view.
Toolbar toolbar = (Toolbar)findViewById(R.id.toolbar);
//Title and subtitle
toolbar.setTitle("MY toolbar");
toolbar.setSubtitle("Subtitle");
//Menu
toolbar.inflateMenu(R.menu.toolbar_menu);
toolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() {
@tyvsmith
tyvsmith / App.java
Last active August 29, 2015 14:04
Android ListAdapter using custom ViewGroup over ViewHolder pattern
package com.example.app;
public class App {
public String id;
public String name;
public String icon_url;
@Override
public String toString() {
return name;
@JakeWharton
JakeWharton / README.md
Last active May 10, 2018 08:39
A workaround for Android "L" Okio packaging problem. Place all of the following in a `libs/` folder.

JarJar'd OkHttp Dependencies

Due to a bug in the packaging of Android OS "L", dependencies which reference Okio need to be repackaged.

For more information see square/okhttp#967

Usage