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 2020 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
<!-- **NOTE** This must be in /debug/ --> | |
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.codingwithmitch.daggerhiltplayground"> | |
<application> | |
<activity | |
android:name="com.codingwithmitch.daggerhiltplayground.HiltTestActivity" | |
android:exported="false" /> | |
</application> |
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 pattern makes it easier to keep a redux store in sync with Firebase. | |
// I used Firebase firestore, but the same thing applies to the Firebase real-time database. | |
// - Flutter - | |
void main() { | |
runApp(new ShiftStudioApp()); | |
} | |
class ShiftStudioApp extends StatefulWidget { | |
@override |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<script src='https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser-polyfill.min.js'></script> | |
</head> | |
<body> |
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="action_pause">#FF8F00</color> | |
<color name="action_resume">#43A047</color> | |
</resources> |
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
/** | |
* DO WHAT YOU WANT TO PUBLIC LICENSE | |
* Version 2, December 2004 | |
* | |
* Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> | |
* | |
* Everyone is permitted to copy and distribute verbatim or modified | |
* copies of this license document, and changing it is allowed as long | |
* as the name is changed. | |
* |
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
String[] strings = getResources().getStringArray(R.array.spinner_options); | |
HintAdapter<String> hintAdapter = new HintAdapter<String>(this, android.R.layout.simple_spinner_item, strings); | |
hintAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); | |
mSpinner.setAdapter(hintAdapter); | |
mSpinner.setSelection(hintAdapter.getCount()); |
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 ColorUtils { | |
private static final double LM_RED_COEFFICIENT = 0.2126; | |
private static final double LM_GREEN_COEFFICIENT = 0.7152; | |
private static final double LM_BLUE_COEFFICIENT = 0.0722; | |
public static int calculateRelativeLuminance(int color) { | |
int red = (int) (Color.red(color) * LM_RED_COEFFICIENT); | |
int green = (int) (Color.green(color) * LM_GREEN_COEFFICIENT); | |
int blue = (int) (Color.blue(color) * LM_BLUE_COEFFICIENT); | |
return red + green + blue; |
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
# OSX files | |
.DS_Store | |
# Ignore gradle files | |
.gradle | |
.gradletasknamecache | |
# generated files | |
bin/ |
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
<provider | |
android:name=".providers.AssetProvider" | |
android:authorities="@string/provider_asset" | |
android:multiprocess="true" | |
android:exported="true"/> | |
<provider | |
android:name=".providers.AssetTagProvider" | |
android:authorities="@string/provider_assettags" | |
android:multiprocess="true" |
NewerOlder