Skip to content

Instantly share code, notes, and snippets.

View krossovochkin's full-sized avatar
👌

Vasya Drobushkov krossovochkin

👌
View GitHub Profile
@robdodson
robdodson / app.js
Created February 25, 2015 04:14
reset scroll position
document.addEventListener('template-bound', function() {
var headerPanel = document.querySelector('[main]');
var pages = document.querySelector('core-pages');
pages.addEventListener('core-select', function(e) {
// Only handle the event once
if (e.detail && e.detail.isSelected) {
headerPanel.scroller.scrollTop = 0;
@chrisbanes
chrisbanes / CollapsingTitleLayout.java
Last active March 26, 2023 11:58
CollapsingTitleLayout
/*
* 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
@dlew
dlew / themes-debug.xml
Last active March 1, 2024 15:46
With the new theming in AppCompat, a lot of assets are tinted automatically for you via theme attributes. That has often led me to wonder "where the hell did this color come from?" You can replace your normal theme with this debug theme to help figure out the source of that color.
<!-- You can change the parent around to whatever you normally use -->
<style name="DebugColors" parent="Theme.AppCompat">
<!-- System colors -->
<item name="android:windowBackground">@color/__debugWindowBackground</item>
<item name="android:colorPressedHighlight">#FF4400</item>
<item name="android:colorLongPressedHighlight">#FF0044</item>
<item name="android:colorFocusedHighlight">#44FF00</item>
<item name="android:colorActivatedHighlight">#00FF44</item>