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
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; |
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 ro.ceva; | |
/** | |
* Created by David on 9/4/2015. | |
*/ | |
import android.os.Bundle; | |
import android.support.annotation.NonNull; | |
import android.support.annotation.Nullable; | |
import android.support.v4.app.Fragment; |
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
<FrameLayout android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<include | |
layout="@layout/common_toolbar"/> | |
<FrameLayout android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<View android:layout_width="match_parent" | |
android:layout_height="4dp" |
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
interface Callback { void onSuccess(int result); } | |
public processData() { | |
List<int> ints = generateTonsOfRandomInts(); | |
addAllInts(ints, new Callback() { | |
public void onSuccess(int result) { | |
doNextThing(result, new Callback() { | |
public void onSuccess(int result) { | |
// finally do something with the results |
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.content.res.ColorStateList | |
import android.graphics.PorterDuff | |
import android.graphics.drawable.Drawable | |
import android.support.annotation.ColorInt | |
import android.support.v4.graphics.drawable.DrawableCompat | |
/** | |
* Created by David Whitman | |
*/ | |
object TintUtils { |
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 void signIn(User user) { | |
api.signIn(user, onSuccessCallback: { | |
getLinks(user); | |
}, onErrorCallback(): { | |
reauthorize(user); | |
} | |
public void getLinks(User user) { | |
api.getLinks(user, onSuccessCallback: { | |
postSuccessEvent(); |
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
/** Example of a {@link Class} declaration */ | |
public final class MyClass { | |
private boolean someBool; | |
public MyClass() { | |
} | |
public MyClass(boolean someBool) { | |
this.someBool = someBool; | |
} |
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 com.thunderclouddev.changelogs.ui | |
import android.content.Context | |
import android.os.Bundle | |
import android.support.annotation.LayoutRes | |
import android.support.annotation.StyleRes | |
import android.support.v7.app.AppCompatActivity | |
import com.thunderclouddev.changelogs.BaseApplication | |
import com.thunderclouddev.changelogs.R | |
import com.thunderclouddev.changelogs.configuration.LanguagePreference |
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 void onCreate() { | |
// Http client | |
OkHttpClient client = new OkHttpClient(); | |
// Content type | |
MediaType JSON = MediaType.parse("application/json; charset=utf-8"); | |
// Whatever you want to send, here it's json | |
RequestBody body = RequestBody.create(JSON, yourJsonString); |
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.databinding.ObservableArrayList; | |
import android.databinding.ObservableList; | |
import com.jakewharton.rxrelay.PublishRelay; | |
import java.util.List; | |
import rx.Observable; | |
/** |
OlderNewer