Edit: This list is now maintained in the rust-anthology repo.
This file contains hidden or 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 2019 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 | |
| * | |
| * https://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software | |
| * distributed under the License is distributed on an "AS IS" BASIS, |
This file contains hidden or 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 kotterknife | |
| import android.app.Activity | |
| import android.app.Dialog | |
| import android.app.DialogFragment | |
| import android.app.Fragment | |
| import android.arch.lifecycle.Lifecycle | |
| import android.arch.lifecycle.LifecycleObserver | |
| import android.arch.lifecycle.LifecycleOwner | |
| import android.arch.lifecycle.OnLifecycleEvent |
This file contains hidden or 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
| /** | |
| _____ _____ _ | |
| | __ \ / ____| | | | |
| | | | | ___| | _ __ _ _ _ __ | |_ ___ _ __ | |
| | | | |/ _ \ | | '__| | | | '_ \| __/ _ \| '__| | |
| | |__| | __/ |____| | | |_| | |_) | || (_) | | | |
| |_____/ \___|\_____|_| \__, | .__/ \__\___/|_| | |
| __/ | | | |
| |___/|_| | |
| */ |
This file contains hidden or 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 AndroidApplication extends MultiDexApplication { | |
| public static final String TAG = AndroidApplication.class.getSimpleName(); | |
| @Override | |
| public void onCreate() { | |
| super.onCreate(); | |
| registerComponentCallbacks(new ComponentCallback()); | |
| } | |
| private class ComponentCallback implements ComponentCallbacks2 { |
This file contains hidden or 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="material_red50">#ffffebee</color> | |
| <color name="material_red100">#ffffcdd2</color> | |
| <color name="material_red200">#ffef9a9a</color> | |
| <color name="material_red300">#ffe57373</color> | |
| <color name="material_red400">#ffef5350</color> | |
| <color name="material_red500">#fff44336</color> | |
| <color name="material_red600">#ffe53935</color> | |
| <color name="material_red700">#ffd32f2f</color> |
This file contains hidden or 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 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 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or 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.app.Activity; | |
| import android.content.Context; | |
| import android.hardware.display.DisplayManager; | |
| import android.os.Bundle; | |
| import android.view.Display; | |
| /** | |
| * A base activity for watch faces that have callbacks for the various screen states (dim, awake, and off) | |
| * as well as a callback for when the watch face is removed. | |
| * <p/> |
This file contains hidden or 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
| def toCamelCase(String string) { | |
| String result = "" | |
| string.findAll("[^\\W]+") { String word -> | |
| result += word.capitalize() | |
| } | |
| return result | |
| } | |
| afterEvaluate { project -> | |
| Configuration runtimeConfiguration = project.configurations.getByName('compile') |
This file contains hidden or 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 CircularProgressDrawable extends Drawable | |
| implements Animatable { | |
| private static final Interpolator ANGLE_INTERPOLATOR = new LinearInterpolator(); | |
| private static final Interpolator SWEEP_INTERPOLATOR = new DecelerateInterpolator(); | |
| private static final int ANGLE_ANIMATOR_DURATION = 2000; | |
| private static final int SWEEP_ANIMATOR_DURATION = 600; | |
| private static final int MIN_SWEEP_ANGLE = 30; | |
| private final RectF fBounds = new RectF(); |
NewerOlder