This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="@android:color/white"> | |
<ImageView | |
android:id="@+id/head_logo" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# core {{{ | |
[core] | |
excludesfile = /Users/almozavr/.gitignore_global | |
pager=less -x4 | |
quotepath = false | |
pager = less | |
autocrlf = true | |
#}}} | |
# user {{{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
log-branch-only = "!f() { arg1=$1; if [[ $# -lt 2 ]] || [[ $2 == -* ]] ; then arg2=$arg1; arg1='HEAD'; arg3=${*:2}; else arg2=$2; arg3=${*:3}; fi; hash=`git merge-base $arg1 $arg2`; git log $hash..$arg2 $arg3; }; f" | |
[alias] | |
diff-branch-only = "!f() { arg1=$1; if [[ $# -lt 2 ]] || [[ $2 == -* ]] ; then arg2=$arg1; arg1='HEAD'; arg3=${*:2}; else arg2=$2; arg3=${*:3}; fi; hash=`git merge-base $arg1 $arg2`; git diff $hash..$arg2 $arg3; }; f" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onStart() { | |
super.onStart(); | |
App.uiBus.registerSticky(this); | |
} | |
@Override | |
protected void onStop() { | |
super.onStop(); | |
App.uiBus.unregister(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BusFragment extends Fragment { | |
@Override | |
public void onStart() { | |
super.onStart(); | |
App.uiBus.registerSticky(this); | |
} | |
@Override | |
public void onStop() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public List<Class<?>> getEventTypesBySubscriber(Object subscriber) { | |
List<SubscriberMethod> subscriberMethods = subscriberMethodFinder.findSubscriberMethods(subscriber.getClass(), defaultMethodName); | |
List<Class<?>> eventTypes = new ArrayList<Class<?>>(subscriberMethods.size()); | |
for (SubscriberMethod method : subscriberMethods) { | |
eventTypes.add(method.eventType); | |
} | |
return eventTypes; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Intent newSmsIntent(Context context, String body, String... phoneNumber) { | |
Uri smsUri; | |
if (phoneNumber == null) { | |
smsUri = Uri.parse("smsto:"); | |
} else { | |
smsUri = Uri.parse("smsto:" + Uri.encode(TextUtils.join(",", phoneNumber))); | |
} | |
Intent intent; | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { | |
intent = new Intent(Intent.ACTION_SENDTO, smsUri); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module("services").factory('ModalUrl', [ | |
'$rootScope', '$modal', '$location', '$routeParams', '$window', '$timeout', | |
($rootScope, $modal, $location, $routeParams, $window, $timeout) -> | |
modalInstance = null | |
checkModal = () -> | |
modalParam = decodeURIComponent($routeParams.modal) | |
if (modalParam != 'undefined') | |
optionsParam = decodeURIComponent($routeParams.options) | |
if (optionsParam != 'undefined') | |
options = JSON.parse(optionsParam) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package your.package; | |
import android.graphics.Bitmap; | |
import android.graphics.drawable.BitmapDrawable; | |
import android.support.annotation.NonNull; | |
import android.widget.ImageView; | |
public abstract class AndroidPaletteCallback extends PaletteCallback<ImageView> { | |
public AndroidPaletteCallback(@NonNull ImageView imageView) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PositionResizeAnimator { | |
public static Animator createAnimator(Holder srcHolder, Holder targetHolder, final View animateView) { | |
ValueAnimator heightAnimator = ValueAnimator.ofInt(srcHolder.height, targetHolder.height); | |
heightAnimator.addUpdateListener( | |
new ValueAnimator.AnimatorUpdateListener() { | |
@Override | |
public void onAnimationUpdate(ValueAnimator animation) { | |
int val = (Integer) animation.getAnimatedValue(); | |
ViewGroup.LayoutParams layoutParams = animateView.getLayoutParams(); |