Skip to content

Instantly share code, notes, and snippets.

View sdex's full-sized avatar
🇺🇦

Yuriy Mysochenko sdex

🇺🇦
View GitHub Profile
# Python 3 !!
# folder structures:
'''
haominshi@MacBook-Pro-de-Haomin:~/Desktop$ tree diff
diff
├── Android_xml_content.txt
├── Android_xml_key.txt
├── Android_xml_key_stylized.txt
├── android_string_sorted.txt
├── android_string_sorted_final.txt
@sdex
sdex / CursorRecyclerAdapter.java
Last active August 29, 2015 14:26 — forked from quanturium/CursorRecyclerAdapter.java
A simple implementation of CursorAdapter for the new RecyclerView. It is designed to work with CursorLoaders and do not register any content observer (which can cause leaks if not handled properly)
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 ARNAUD FRUGIER
*
* 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
import android.view.View;
import android.view.ViewGroup.MarginLayoutParams;
/**
* Allows an ObjectAnimator to set/get margins of a view
* how to use:
* MarginProxy marginProxy = new MarginProxy(noteContainer);
* ObjectAnimator marginAnimation = ObjectAnimator.ofInt(marginProxy, "topMargin", oldTopMargin, newTopMargin).setDuration(300);
*/
public class MarginProxy {