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 abstract class DataParcel<D> implements IDataParcel<D> { | |
protected D data; | |
public DataParcel(D data) { | |
this.data = data; | |
} | |
public DataParcel(Parcel in) { | |
readFromParcel(in); | |
} |
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
import java.util.Queue; | |
import java.util.concurrent.atomic.*; | |
import rx.*; | |
import rx.Observable.Operator; | |
import rx.exceptions.MissingBackpressureException; | |
import rx.internal.operators.*; | |
import rx.internal.util.*; | |
import rx.internal.util.atomic.SpscAtomicArrayQueue; |
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"?> | |
<resources> | |
<color name="action_pause">#FF8F00</color> | |
<color name="action_resume">#43A047</color> | |
</resources> |
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
fun String.encodeBase64ToString(): String = String(this.toByteArray().encodeBase64()) | |
fun String.encodeBase64ToByteArray(): ByteArray = this.toByteArray().encodeBase64() | |
fun ByteArray.encodeBase64ToString(): String = String(this.encodeBase64()) | |
fun String.decodeBase64(): String = String(this.toByteArray().decodeBase64()) | |
fun String.decodeBase64ToByteArray(): ByteArray = this.toByteArray().decodeBase64() | |
fun ByteArray.decodeBase64ToString(): String = String(this.decodeBase64()) | |
fun ByteArray.encodeBase64(): ByteArray { | |
val table = (CharRange('A', 'Z') + CharRange('a', 'z') + CharRange('0', '9') + '+' + '/').toCharArray() |
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
/* | |
* Copyright (C) 2014 I.C.N.H GmbH | |
* | |
* 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 |
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
mContent = (EditText) v.findViewById(R.id.dialog_item_content_EditText); | |
mContent.setText(mContentInit); | |
mContent.setRawInputType(InputType.TYPE_CLASS_TEXT); | |
mContent.setImeActionLabel(getResources().getString(R.string.done), EditorInfo.IME_ACTION_DONE); | |
mContent.setImeOptions(EditorInfo.IME_ACTION_DONE); | |
mContent.setOnEditorActionListener(new TextView.OnEditorActionListener() { | |
@Override | |
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { | |
if (event == null) { |
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"?> | |
<!-- | |
Copyright (C) 2015 The Android Open Source Project | |
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 |
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 CustomMatchers { | |
public static Matcher<View> withBackground(final int resourceId) { | |
return new TypeSafeMatcher<View>() { | |
@Override | |
public boolean matchesSafely(View view) { | |
return sameBitmap(view.getContext(), view.getBackground(), resourceId); | |
} | |
@Override |
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
/* | |
* 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 |
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
import android.annotation.SuppressLint | |
import android.content.Context | |
import android.support.annotation.AttrRes | |
import android.support.design.widget.CoordinatorLayout | |
import android.support.v4.view.NestedScrollingChild2 | |
import android.support.v4.view.NestedScrollingChildHelper | |
import android.util.AttributeSet | |
import android.view.View | |
import com.douglas.startpage.R |
OlderNewer